iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: John Garry <john.garry@huawei.com>
Cc: iommu@lists.linux-foundation.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] iommu: match the original algorithm
Date: Thu, 28 Nov 2019 11:30:20 -0800	[thread overview]
Message-ID: <CAM_iQpVqs2zLxnwC3p81qv-n8tq8vQ6DJRGE9zwMJNm-vULZAA@mail.gmail.com> (raw)
In-Reply-To: <9ac29292-bc3d-ae57-daff-5b3264020fe2@huawei.com>

On Wed, Nov 27, 2019 at 10:01 AM John Garry <john.garry@huawei.com> wrote:
>
> On 21/11/2019 00:13, Cong Wang wrote:
> > The IOVA cache algorithm implemented in IOMMU code does not
> > exactly match the original algorithm described in the paper.
> >
> > Particularly, it doesn't need to free the loaded empty magazine
> > when trying to put it back to global depot.
> >
> > This patch makes it exactly match the original algorithm.
> >
>
> I haven't gone into the details, but this patch alone is giving this:
>
> root@(none)$ [  123.857024] kmemleak: 8 new suspected memory leaks (see
> /sys/kernel/debug/kmemleak)

Ah, thanks for catching it! I see what I missed, I should pre-allocate those
empty entries in order to make it work correctly.

I didn't catch this because this was tested on a production machine where
we can't afford CONFIG_DEBUG_KMEMLEAK=y for obvious performance
concerns.

Anyway, I will fix this and send v2.

Thanks!
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  parent reply	other threads:[~2019-11-28 19:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21  0:13 [PATCH 0/3] iommu: reduce spinlock contention on fast path Cong Wang
2019-11-21  0:13 ` [PATCH 1/3] iommu: match the original algorithm Cong Wang
2019-11-27 18:00   ` John Garry
2019-11-27 18:38     ` Qian Cai
2019-11-28 19:30     ` Cong Wang [this message]
2019-11-21  0:13 ` [PATCH 2/3] iommu: optimize iova_magazine_free_pfns() Cong Wang
2019-11-21  0:13 ` [PATCH 3/3] iommu: avoid taking iova_rbtree_lock twice Cong Wang

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=CAM_iQpVqs2zLxnwC3p81qv-n8tq8vQ6DJRGE9zwMJNm-vULZAA@mail.gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=john.garry@huawei.com \
    --cc=linux-kernel@vger.kernel.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).