DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jens Freimann <jfreimann@redhat.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: yliu@fridaylinux.org, tiwei.bie@intel.com,
	jianfeng.tan@intel.com, ferruh.yigit@intel.com, dev@dpdk.org,
	stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] vhost: fix iotlb pool out-of-memory handling
Date: Fri, 26 Jan 2018 13:40:33 +0100	[thread overview]
Message-ID: <20180126124033.qawyksgcgja2kb32@dhcp-192-241.str.redhat.com> (raw)
In-Reply-To: <20180125150653.32284-1-maxime.coquelin@redhat.com>

On Thu, Jan 25, 2018 at 04:06:53PM +0100, Maxime Coquelin wrote:
>In the unlikely case the IOTLB memory pool runs out of memory,
>an issue may happen if all entries are used by the IOTLB cache,
>and an IOTLB miss happen. If the iotlb pending list is empty,
>then no memory is freed and allocation fails a second time.
>
>This patch fixes this by doing an IOTLB cache random evict if
>the IOTLB pending list is empty, ensuring the second allocation
>try will succeed.
>
>In the same spirit, the opposite is done when inserting an
>IOTLB entry in the IOTLB cache fails due to out of memory. In
>this case, the IOTLB pending is flushed if the IOTLB cache is
>empty to ensure the new entry can be inserted.
>
>Fixes: d012d1f293f4 ("vhost: add IOTLB helper functions")
>Fixes: f72c2ad63aeb ("vhost: add pending IOTLB miss request list and helpers")
>
>Cc: stable@dpdk.org
>Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>---
> lib/librte_vhost/iotlb.c | 18 +++++++++++++-----
> 1 file changed, 13 insertions(+), 5 deletions(-)
>

Reviewed-by: Jens Freimann <jfreimann@redhat.com>

regards,
Jens 

      parent reply	other threads:[~2018-01-26 12:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-25 15:06 Maxime Coquelin
2018-01-26  8:03 ` Tiwei Bie
2018-01-26 15:23   ` Maxime Coquelin
2018-01-26 12:40 ` Jens Freimann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180126124033.qawyksgcgja2kb32@dhcp-192-241.str.redhat.com \
    --to=jfreimann@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jianfeng.tan@intel.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=stable@dpdk.org \
    --cc=tiwei.bie@intel.com \
    --cc=yliu@fridaylinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).