From: Shaohua Li Subject: Re: [PATCH V2 0/4]IOMMU: avoid lock contention in iova allocation Date: Wed, 20 Jan 2016 13:14:35 -0800 Message-ID: <20160120211421.GA684235@devbig084.prn1.facebook.com> References: <20160110225610.GA16778@cs.technion.ac.il> <20160111033749.GA1811285@devbig084.prn1.facebook.com> <20160120122103.GE18805@8bytes.org> <20160120180956.GA230160@devbig084.prn1.facebook.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Adam Morrison Cc: Kernel-team-b10kYP2dOMg@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: iommu@lists.linux-foundation.org On Wed, Jan 20, 2016 at 10:47:45PM +0200, Adam Morrison wrote: > On Wed, Jan 20, 2016 at 8:10 PM, Shaohua Li wrote: > > On Wed, Jan 20, 2016 at 01:21:03PM +0100, Joerg Roedel wrote: > >> On Sun, Jan 10, 2016 at 07:37:59PM -0800, Shaohua Li wrote: > >> > I don't know you already posted one. Roughly looked at the patches. We > >> > are using exactly the same idea. I'm happy we pursue your patches. At > >> > the first look, the per-cpu allocation in your patch doesn't check > >> > pfn_limit, that could be wrong, but should be easy to fix. I'll take a > >> > close look tomorrow. > >> > >> Sounds great. Your approaches with the per-cpu are pretty similar, so I > >> would appreciate if you two come up with a combined patch-set? > > > > I'll do this if Adam doesn't object. > > My understanding from the above is that the only issue with our > patchset was not dealing with pfn_limit. I can just fix that and > repost, sounds good? Sure, please do it. For the patches, I'm not comformatable about the per-cpu deferred invalidation. One important benefit of IOMMU is isolation. Deferred invalidation already loose the isolation, per-cpu invalidation loose further. It would be better we can flush all per-cpu invalidation entries if one cpu hits its per-cpu limit. Also you'd better look at CPU hotplug. We don't want to lose the invalidation entries if one cpu is hot removed. The per-cpu iova implementation looks unnecessary complicated. I know you are referring the paper, but the whole point is batch allocation/free. Please cc me if you post the patches again. I don't subscribe the iommu list. Thanks, Shaohua