[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZOLnRSdH4Wcrl67L@casper.infradead.org>
Date: Mon, 21 Aug 2023 05:25:41 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Byungchul Park <byungchul@...com>
Cc: linux-kernel@...r.kernel.org, kernel_team@...ynix.com,
torvalds@...ux-foundation.org, damien.lemoal@...nsource.wdc.com,
linux-ide@...r.kernel.org, adilger.kernel@...ger.ca,
linux-ext4@...r.kernel.org, mingo@...hat.com, peterz@...radead.org,
will@...nel.org, tglx@...utronix.de, rostedt@...dmis.org,
joel@...lfernandes.org, sashal@...nel.org, daniel.vetter@...ll.ch,
duyuyang@...il.com, johannes.berg@...el.com, tj@...nel.org,
tytso@....edu, david@...morbit.com, amir73il@...il.com,
gregkh@...uxfoundation.org, kernel-team@....com,
linux-mm@...ck.org, akpm@...ux-foundation.org, mhocko@...nel.org,
minchan@...nel.org, hannes@...xchg.org, vdavydov.dev@...il.com,
sj@...nel.org, jglisse@...hat.com, dennis@...nel.org, cl@...ux.com,
penberg@...nel.org, rientjes@...gle.com, vbabka@...e.cz,
ngupta@...are.org, linux-block@...r.kernel.org,
josef@...icpanda.com, linux-fsdevel@...r.kernel.org,
viro@...iv.linux.org.uk, jack@...e.cz, jlayton@...nel.org,
dan.j.williams@...el.com, hch@...radead.org, djwong@...nel.org,
dri-devel@...ts.freedesktop.org, rodrigosiqueiramelo@...il.com,
melissa.srw@...il.com, hamohammed.sa@...il.com,
42.hyeyoo@...il.com, chris.p.wilson@...el.com,
gwan-gyeong.mun@...el.com, max.byungchul.park@...il.com,
boqun.feng@...il.com, longman@...hat.com, hdanton@...a.com,
her0gyugyu@...il.com
Subject: Re: [RESEND PATCH v10 25/25] dept: Track the potential waits of
PG_{locked,writeback}
On Mon, Aug 21, 2023 at 12:46:37PM +0900, Byungchul Park wrote:
> @@ -377,44 +421,88 @@ static __always_inline int Page##uname(struct page *page) \
> #define SETPAGEFLAG(uname, lname, policy) \
> static __always_inline \
> void folio_set_##lname(struct folio *folio) \
> -{ set_bit(PG_##lname, folio_flags(folio, FOLIO_##policy)); } \
> +{ \
> + set_bit(PG_##lname, folio_flags(folio, FOLIO_##policy)); \
> + dept_page_set_bit(&folio->page, PG_##lname); \
The PG_locked and PG_writeback bits only actually exist in the folio;
the ones in struct page are just legacy and never actually used.
Perhaps we could make the APIs more folio-based and less page-based?
> static __always_inline void SetPage##uname(struct page *page) \
> -{ set_bit(PG_##lname, &policy(page, 1)->flags); }
> +{ \
> + set_bit(PG_##lname, &policy(page, 1)->flags); \
> + dept_page_set_bit(page, PG_##lname); \
> +}
I don't think we ever call this for PG_writeback or PG_locked. If
I'm wrong, we can probably fix that ;-)
> static __always_inline void __SetPage##uname(struct page *page) \
> -{ __set_bit(PG_##lname, &policy(page, 1)->flags); }
> +{ \
> + __set_bit(PG_##lname, &policy(page, 1)->flags); \
> + dept_page_set_bit(page, PG_##lname); \
> +}
Umm. We do call __SetPageLocked() though ... I'll fix those up to
be __set_folio_locked().
Powered by blists - more mailing lists