lkml.org 
[lkml]   [2020]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 11/11] afs: Fix dirty-region encoding on ppc32 with 64K pages
Date
Matthew Wilcox <willy@infradead.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

\
 
 \ /
  Last update: 2020-10-28 23:08    [W:0.054 / U:1.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site