[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpXbjf8MuL17kZhxawXYBJm6t5-ho77F_VWR30L-9FS4Kg@mail.gmail.com>
Date: Tue, 21 Jan 2020 09:29:12 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: Robin Murphy <robin.murphy@....com>
Cc: iommu@...ts.linux-foundation.org,
LKML <linux-kernel@...r.kernel.org>,
Joerg Roedel <joro@...tes.org>,
John Garry <john.garry@...wei.com>
Subject: Re: [Patch v3 2/3] iommu: optimize iova_magazine_free_pfns()
On Tue, Jan 21, 2020 at 1:52 AM Robin Murphy <robin.murphy@....com> wrote:
>
> On 18/12/2019 4:39 am, Cong Wang wrote:
> > If the magazine is empty, iova_magazine_free_pfns() should
> > be a nop, however it misses the case of mag->size==0. So we
> > should just call iova_magazine_empty().
> >
> > This should reduce the contention on iovad->iova_rbtree_lock
> > a little bit, not much at all.
>
> Have you measured that in any way? AFAICS the only time this can get
> called with a non-full magazine is in the CPU hotplug callback, where
> the impact of taking the rbtree lock and immediately releasing it seems
> unlikely to be significant on top of everything else involved in that
> operation.
This patchset is only tested as a whole, it is not easy to deploy
each to production and test it separately.
Is there anything wrong to optimize a CPU hotplug path? :) And,
it is called in alloc_iova_fast() too when, for example, over-cached.
Thanks.
Powered by blists - more mailing lists