lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 21 Aug 2023 13:51:36 +0900
From:   Byungchul Park <byungchul@...com>
To:     Matthew Wilcox <willy@...radead.org>
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 05:25:41AM +0100, Matthew Wilcox wrote:
> 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?

Yeah. I need to make it more folio-based. I will work on it. Thank you.

> >  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 ;-)

Okay then, I will assume this will never be used. So are you asking me
to get rid of this part, right?

> >  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().

Haha Okay. Lemme know when you get done on it. Thanks.

	Byungchul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ