lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTinjJLaDVenwNcxgN7ycr97XLN_DVi1ckXBZetZm@mail.gmail.com>
Date:	Mon, 19 Jul 2010 13:36:42 +0900
From:	Minchan Kim <minchan.kim@...il.com>
To:	ngupta@...are.org
Cc:	Pekka Enberg <penberg@...helsinki.fi>,
	Hugh Dickins <hugh.dickins@...cali.co.uk>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Greg KH <greg@...ah.com>,
	Dan Magenheimer <dan.magenheimer@...cle.com>,
	Rik van Riel <riel@...hat.com>, Avi Kivity <avi@...hat.com>,
	Christoph Hellwig <hch@...radead.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	linux-mm <linux-mm@...ck.org>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 7/8] Use xvmalloc to store compressed chunks

Hi Nitin,

On Sun, Jul 18, 2010 at 5:21 PM, Nitin Gupta <ngupta@...are.org> wrote:
> 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.

cleancache_put_page always is called with spin_lock_irq.
Couldn't we replace spin_lock_irq_save with spin_lock?

-- 
Kind regards,
Minchan Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ