zcache and zsmalloc
Asim
linkasim at gmail.com
Wed Jun 27 14:42:49 EDT 2012
Yeah - I see lots of BUG_ON(!irqs_disabled()) in zcache code while
placing and compressing the page(and also other places).
I am not clear what you mean when you say zcache does so for other
reasons. My guess was when clean zcache_put_page is called it holds
locks (mapping->tree_lock) that conflicts xsmalloc pool allocations.
If zsmalloc has no such issues, can these be removed?
Thanks,
Asim
- Adding the correct kernel newbies address with entire conversation
intact for reference.
On Wed, Jun 27, 2012 at 1:26 PM, Seth Jennings
<sjenning at linux.vnet.ibm.com> wrote:
> On 06/27/2012 01:04 PM, Asim wrote:
>> This query relates zcache and the new zsmalloc patches.
>>
>> I was looking through zcache code and your various zsmalloc patches. I
>> am aware the zcache disables interrupts due to xvmalloc pool
>> allocations.However, does the zsmalloc code also needs to disable
>> interrupts while placing a page in zcache?
>
> (Adding Nitin to Cc)
>
> None of the functions need interrupts/preemption to be
> disabled before calling them, even though zcache does for
> other reasons.
>
> zs_map_object() will return with page faults and preemption
> disabled by kmap_atomic() and get_cpu_var() respectively.
> This is to insure atomic access to the mapping_area
> structure. They are re-enabled in zs_unmap_object().
>
> --
> Seth
>
More information about the Kernelnewbies
mailing list