From: Andi Kleen <andi@firstfloor.org>
To: Vitaly Wool <vitalywool@gmail.com>
Cc: Linux-MM <linux-mm@kvack.org>,
linux-kernel@vger.kernel.org, Dan Streetman <ddstreet@ieee.org>,
Andrew Morton <akpm@linux-foundation.org>,
Andi Kleen <andi@firstfloor.org>
Subject: Re: [PATCH/RFC v2] z3fold: use per-page read/write lock
Date: Tue, 8 Nov 2016 07:08:00 -0800 [thread overview]
Message-ID: <20161108150800.GL26852@two.firstfloor.org> (raw)
In-Reply-To: <20161108135834.d0b57fa435393c64f358980a@gmail.com>
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
prev parent reply other threads:[~2016-11-08 15:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-08 12:58 [PATCH/RFC v2] z3fold: use per-page read/write lock Vitaly Wool
2016-11-08 15:08 ` Andi Kleen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161108150800.GL26852@two.firstfloor.org \
--to=andi@firstfloor.org \
--cc=akpm@linux-foundation.org \
--cc=ddstreet@ieee.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=vitalywool@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).