lkml.org 
[lkml]   [2023]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] kpageflags: respect folio head-page flag placement
On Mon, Oct 30, 2023 at 02:00:05PM -0400, Gregory Price wrote:
> kpageflags reads page-flags directly from the page, even when the
> respective flag is only updated on the headpage of a folio.
>
> Update bitchecks to use PAGEFLAG() interfaces to check folio for the
> referenced, dirty, lru, active, and unevictable bits.

But uptodate, writeback and reclaim (amongst others) are also defined
only on the head page.

> u |= kpf_copy_bit(k, KPF_UPTODATE, PG_uptodate);
> u |= kpf_copy_bit(k, KPF_WRITEBACK, PG_writeback);
>
> u |= kpf_copy_bit(k, KPF_RECLAIM, PG_reclaim);
>
> if (PageSwapCache(page))
> u |= 1 << KPF_SWAPCACHE;
> u |= kpf_copy_bit(k, KPF_SWAPBACKED, PG_swapbacked);
>
> u |= kpf_copy_bit(k, KPF_MLOCKED, PG_mlocked);

\
 
 \ /
  Last update: 2023-10-31 00:23    [W:0.044 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site