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] [day] [month] [year] [list]
Message-ID: <20161108150800.GL26852@two.firstfloor.org>
Date:   Tue, 8 Nov 2016 07:08:00 -0800
From:   Andi Kleen <andi@...stfloor.org>
To:     Vitaly Wool <vitalywool@...il.com>
Cc:     Linux-MM <linux-mm@...ck.org>, linux-kernel@...r.kernel.org,
        Dan Streetman <ddstreet@...e.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Andi Kleen <andi@...stfloor.org>
Subject: Re: [PATCH/RFC v2] z3fold: use per-page read/write lock

On Tue, Nov 08, 2016 at 01:58:34PM +0100, Vitaly Wool wrote:
> Most of z3fold operations are in-page, such as modifying z3fold
> page header or moving z3fold objects within a page. Taking
> per-pool spinlock to protect per-page objects is therefore
> suboptimal, and the idea of having a per-page spinlock (or rwlock)
> has been around for some time. However, adding one directly to the
> z3fold header makes the latter quite big on some systems so that
> it won't fit in a signle chunk.
> 
> This patch implements spinlock-based per-page locking mechanism
> which is lightweight enough to fit into the z3fold header.
> 
> Changes from v1 [1]:
> - custom locking mechanism changed to spinlocks
> - no read/write locks, just per-page spinlock

Looks good.

BTW the spinlock could still grow when debug options  like
lockdep are enabled. So something would still need to be done about
that BUILD_BUG_ON(). Otherwise would need to force a raw spin lock.

-Andi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ