lkml.org 
[lkml]   [2021]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 4/5] iommu: Separate IOVA rcache memories from iova_domain structure
From
Date
On 20/12/2021 13:57, Robin Murphy wrote:
>> Do you have any thoughts on this patch? The decision is whether we
>> stick with a single iova domain structure or support this super
>> structure for iova domains which support the rcache. I did not try the
>> former - it would be do-able but I am not sure on how it would look.
>
> TBH I feel inclined to take the simpler approach of just splitting the
> rcache array to a separate allocation, making init_iova_rcaches() public
> (with a proper return value), and tweaking put_iova_domain() to make
> rcache cleanup conditional. A residual overhead of 3 extra pointers in
> iova_domain doesn't seem like *too* much for non-DMA-API users to bear.

OK, fine. So I tried as you suggested and it looks ok to me.

I'll send something out at rc1.

> Unless you want to try generalising the rcache mechanism completely away
> from IOVA API specifics, it doesn't seem like there's really enough to
> justify the bother of having its own distinct abstraction layer.

Yeah, I don't see that as necessary.

However something which could be useful is to separate the magazine code
out for other possible users.

Thanks!
John

\
 
 \ /
  Last update: 2021-12-22 12:53    [W:0.052 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site