lkml.org 
[lkml]   [2016]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v3] z3fold: use per-page read/write lock
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.

\
 
 \ /
  Last update: 2016-11-10 01:33    [W:0.039 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site