tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: vmem boundary tag manged with pool



On 11/19/2013 11:02 PM, matthew green wrote:
>> I would like to change the way vmem(9) allocates boundary tags towards
>> using a pool(9) for that.
>>
>> This de-duplicates code and makes it possible to release memory pages
>> used for boundary tags.
>>
>> early patch any comments?
> 
> i fear adding another way that vmem and pool can loop, ala my
> post a couple of weeks ago:
> 
> http://mail-index.netbsd.org/tech-kern/2013/11/01/msg015881.html
> 
> 
> .mrg.
> 

thanks for taking a look.
As time allows I'm currently looking into that matter. As far as I have
analyzed it, I think that the page_allocation in uvm_km_kmem_alloc must
have failed and from there on there is a recursion within allocating a
pool_header within pool(9) see pool_grow.
The underlying problem is that we sometimes need to allocate in order to
free memory in pool(9).

The pool used for the vmem boundary tags must be using PR_PHINPAGE and
!PR_NOTOUCH so it does not allocate on freeing and allocating "only"
requires pulling a page from vmem. So no new recursion path should emerge.

But for sure you are right, this requires careful checking and the patch
is in a early stage.

Lars



Home | Main Index | Thread Index | Old Index