Re: [Patch v2 1/3] iommu: match the original algorithm

2019-12-03 Thread Cong Wang
On Mon, Dec 2, 2019 at 2:55 AM John Garry wrote: > Apart from this change, did anyone ever consider kmem cache for the > magazines? You can always make any changes you want after this patch, I can't do all optimizations in one single patch. :) So, I will leave this to you. Thanks. _

Re: [Patch v2 1/3] iommu: match the original algorithm

2019-12-03 Thread Cong Wang
On Mon, Dec 2, 2019 at 8:58 AM Christoph Hellwig wrote: > > I think a subject line better describes what you change, no that > it matches an original algorithm. The fact that the fix matches > the original algorithm can go somewhere towards the commit log, > preferably with a reference to the act

Re: [Patch v2 1/3] iommu: match the original algorithm

2019-12-02 Thread Christoph Hellwig
I think a subject line better describes what you change, no that it matches an original algorithm. The fact that the fix matches the original algorithm can go somewhere towards the commit log, preferably with a reference to the actual paper. ___ iommu ma

Re: [Patch v2 1/3] iommu: match the original algorithm

2019-12-02 Thread John Garry
On 30/11/2019 05:58, Cong Wang wrote: On Fri, Nov 29, 2019 at 6:43 AM John Garry wrote: On 29/11/2019 00:48, Cong Wang wrote: The IOVA cache algorithm implemented in IOMMU code does not exactly match the original algorithm described in the paper. which paper? It's in drivers/iommu/iova.c

Re: [Patch v2 1/3] iommu: match the original algorithm

2019-11-29 Thread Cong Wang
On Fri, Nov 29, 2019 at 6:43 AM John Garry wrote: > > On 29/11/2019 00:48, Cong Wang wrote: > > The IOVA cache algorithm implemented in IOMMU code does not > > exactly match the original algorithm described in the paper. > > > > which paper? It's in drivers/iommu/iova.c, from line 769: 769 /*

Re: [Patch v2 1/3] iommu: match the original algorithm

2019-11-29 Thread John Garry
On 29/11/2019 00:48, Cong Wang wrote: The IOVA cache algorithm implemented in IOMMU code does not exactly match the original algorithm described in the paper. which paper? Particularly, it doesn't need to free the loaded empty magazine when trying to put it back to global depot. To make it w

[Patch v2 1/3] iommu: match the original algorithm

2019-11-28 Thread Cong Wang
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. To make it work, we have to pre-allocate magazines in the depot and o