linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: Vitaly Wool <vitalywool@gmail.com>, Linux-MM <linux-mm@kvack.org>,
	linux-kernel@vger.kernel.org, Dan Streetman <ddstreet@ieee.org>
Subject: Re: [PATCH v3] z3fold: use per-page read/write lock
Date: Wed, 9 Nov 2016 16:32:41 -0800	[thread overview]
Message-ID: <20161109163241.c73742590270710040fdd25a@linux-foundation.org> (raw)
In-Reply-To: <20161109230117.GO26852@two.firstfloor.org>

On Wed, 9 Nov 2016 15:01:17 -0800 Andi Kleen <andi@firstfloor.org> wrote:

> On Wed, Nov 09, 2016 at 02:33:04PM -0800, Andrew Morton wrote:
> > On Wed, 9 Nov 2016 11:55:31 +0100 Vitaly Wool <vitalywool@gmail.com> wrote:
> > 
> > > Subject: [PATCH v3] z3fold: use per-page read/write lock
> > 
> > I've rewritten the title to "mm/z3fold.c: use per-page spinlock"
> > 
> > (I prefer to have "mm" in the title to easily identify it as an MM
> > patch, and using "mm: z3fold: ..." seems odd when the actual pathname
> > conveys the same info.)
> 
> Still think it needs to be raw_spinlock_t, otherwise the build bug on
> on the header size will break again. 
> 
> Better would be to fix that build bug though

Yeah, that triggers for me immediately.  We could suppress it with
something silly like

--- a/mm/z3fold.c~z3fold-use-per-page-read-write-lock-fix
+++ a/mm/z3fold.c
@@ -872,7 +872,7 @@ MODULE_ALIAS("zpool-z3fold");
 static int __init init_z3fold(void)
 {
 	/* Make sure the z3fold header will fit in one chunk */
-	BUILD_BUG_ON(sizeof(struct z3fold_header) > ZHDR_SIZE_ALIGNED);
+	BUILD_BUG_ON(sizeof(struct z3fold_header) - sizeof(spinlock_t) > ZHDR_SIZE_ALIGNED);
 	zpool_register_driver(&z3fold_zpool_driver);
 
 	return 0;

but that doesn't fix anything - the header is just too large with
lockdep enabled.

I'll drop the patch for now.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      parent reply	other threads:[~2016-11-10  0:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-09 10:55 [PATCH v3] z3fold: use per-page read/write lock Vitaly Wool
2016-11-09 22:33 ` Andrew Morton
2016-11-09 23:01   ` Andi Kleen
2016-11-09 23:22     ` Thomas Gleixner
2016-11-10  0:32     ` Andrew Morton [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=20161109163241.c73742590270710040fdd25a@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=andi@firstfloor.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).