Re: [PATCH 10/17] prmem: documentation
From: Igor Stoppa
Date: Tue Oct 30 2018 - 17:49:19 EST
On 30/10/2018 23:35, Matthew Wilcox wrote:
On Tue, Oct 30, 2018 at 10:43:14PM +0200, Igor Stoppa wrote:
Would it be possible to do the same here?
What Andy is proposing effectively puts all rare allocations into
one pool. Although I suppose it could be generalised to multiple pools
... one mm_struct per pool. Andy, what do you think to doing that?
The reason to have pools is that, continuing the SELinux example, it
supports reloading the policyDB.
In this case it seems to me that it would be faster to drop the entire
pool in one go, and create a new one when re-initializing the rules.
Or maybe the pool could be flushed, without destroying the metadata.
One more reason for having pools is to assign certain property to the
pool and then rely on it to be applied to every subsequent allocation.
I've also been wondering if pools can be expected to have some well
One might be that they do not need to be created on the fly.
The number of pools should be known at compilation time.
At least the meta-data could be static, but I do not know how this would
work with modules.
but we'd probably wrap it in list_for_each_rare_entry(), just to be nicer.
This seems suspiciously close to the duplication of kernel interfaces that I
was roasted for :-)
Can you not see the difference between adding one syntactic sugar function
and duplicating the entire infrastructure?
And list_add()? or any of the other list related functions?
Don't they end up receiving a similar treatment?
I might have misunderstood your proposal, but it seems to me that they
too will need the same type of pairs rare_modify/rare_protect. No?
And same for hlist, including the _rcu variants.