[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3ac68b3be0f62cfcd930ee84b87fbdc8244fe45e.camel@surriel.com>
Date: Wed, 25 Oct 2023 21:34:15 -0400
From: Rik van Riel <riel@...riel.com>
To: Gregory Price <gourry.memverge@...il.com>, linux-mm@...ck.org
Cc: akpm@...ux-foundation.org, willy@...radead.org, david@...hat.com,
vbabka@...e.cz, naoya.horiguchi@...ux.dev,
linux-kernel@...r.kernel.org,
Gregory Price <gregory.price@...verge.com>
Subject: Re: [PATCH] kpageflags: respect folio head-page flag placement
On Wed, 2023-10-25 at 16:12 -0400, Gregory Price wrote:
>
> +++ b/fs/proc/page.c
> @@ -188,20 +188,31 @@ u64 stable_page_flags(struct page *page)
> u |= 1 << KPF_SLAB;
>
> u |= kpf_copy_bit(k, KPF_ERROR, PG_error);
> - u |= kpf_copy_bit(k, KPF_DIRTY, PG_dirty);
> +
> + if (PageDirty(page))
> + u |= 1 << KPF_DIRTY;
> +
> u |= kpf_copy_bit(k, KPF_UPTODATE, PG_uptodate);
> u |= kpf_copy_bit(k, KPF_WRITEBACK, PG_writeback);
>
> - u |= kpf_copy_bit(k, KPF_LRU, PG_lru);
> - u |= kpf_copy_bit(k, KPF_REFERENCED, PG_referenced);
> - u |= kpf_copy_bit(k, KPF_ACTIVE, PG_active);
> + if (PageLRU(page))
> + u |= 1 << KPF_LRU;
> +
> + if (PageReferenced(page))
> + u |= 1 << KPF_REFERENCED;
> +
> + if (PageActive(page))
> + u |= 1 << KPF_ACTIVE;
> +
> 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);
>
Aren't PG_locked, PG_reclaim, and PG_swapbacked also maintained only on
the folio/head?
Would it make sense to convert those over as well?
--
All Rights Reversed.
Powered by blists - more mailing lists