[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <548209.1603904708@warthog.procyon.org.uk>
Date: Wed, 28 Oct 2020 17:05:08 +0000
From: David Howells <dhowells@...hat.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: dhowells@...hat.com, linux-afs@...ts.infradead.org,
kernel test robot <lkp@...el.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 11/11] afs: Fix dirty-region encoding on ppc32 with 64K pages
Matthew Wilcox <willy@...radead.org> wrote:
> > +{
> > + if (PAGE_SIZE - 1 <= __AFS_PAGE_PRIV_MASK)
> > + return 1;
> > + else
> > + return PAGE_SIZE / (__AFS_PAGE_PRIV_MASK + 1);
>
> Could this be DIV_ROUND_UP(PAGE_SIZE, __AFS_PAGE_PRIV_MASK + 1); avoiding
> a conditional? I appreciate it's calculated at compile time today, but
> it'll be dynamic with THP.
Hmmm - actually, I want a shift size, not a number of bytes as I divide by it
twice in afs_page_dirty().
David
Powered by blists - more mailing lists