lkml.org 
[lkml]   [2010]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 7/8] Use xvmalloc to store compressed chunks
On 07/18/2010 01:23 PM, Pekka Enberg wrote:
> Nitin Gupta wrote:
>> @@ -528,17 +581,32 @@ static int zcache_store_page(struct zcache_inode_rb *znode,
>> goto out;
>> }
>>
>> - dest_data = kmap_atomic(zpage, KM_USER0);
>> + local_irq_save(flags);
>
> Does xv_malloc() required interrupts to be disabled? If so, why doesn't the function do it by itself?
>


xvmalloc itself doesn't require disabling interrupts but zcache needs that since
otherwise, we can have deadlock between xvmalloc pool lock and mapping->tree_lock
which zcache_put_page() is called. OTOH, zram does not require this disabling of
interrupts. So, interrupts are disable separately for zcache case.

Thanks,
Nitin


\
 
 \ /
  Last update: 2010-07-18 10:23    [W:0.105 / U:0.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site