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@xxxxxxxxxxxxxxxxxx> 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 > _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies