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] [thread-next>] [day] [month] [year] [list]
Message-ID: <YnKwBeRAWwIlEVqy@casper.infradead.org>
Date:   Wed, 4 May 2022 17:55:33 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Minchan Kim <minchan@...nel.org>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-mm <linux-mm@...ck.org>,
        Suren Baghdasaryan <surenb@...gle.com>,
        Michal Hocko <mhocko@...e.com>,
        John Dias <joaodias@...gle.com>,
        Tim Murray <timmurray@...gle.com>
Subject: Re: [PATCH] mm: don't be stuck to rmap lock on reclaim path

On Wed, May 04, 2022 at 08:52:13AM -0700, Minchan Kim wrote:
> On Wed, May 04, 2022 at 07:09:37AM +0100, Matthew Wilcox wrote:
> > On Tue, May 03, 2022 at 09:30:38PM -0700, Minchan Kim wrote:
> > > On Wed, May 04, 2022 at 04:32:13AM +0100, Matthew Wilcox wrote:
> > > > On Tue, May 03, 2022 at 10:03:41AM -0700, Minchan Kim wrote:
> > > > > -void rmap_walk(struct folio *folio, const struct rmap_walk_control *rwc);
> > > > > -void rmap_walk_locked(struct folio *folio, const struct rmap_walk_control *rwc);
> > > > > +void rmap_walk(struct folio *folio, struct rmap_walk_control *rwc);
> > > > > +void rmap_walk_locked(struct folio *folio, struct rmap_walk_control *rwc);
> > > > 
> > > > I see the build bot already beat me to pointing out why this is wrong,
> > > > but do you not look at git log to figure out why code was changed to be
> > > > the way it is now, before you change it back?
> > > 
> > > This patch added a new field as out param like compact_control so
> > > the rmap_walk_control is not immutable.
> > 
> > ... but we have a user which treats it as if it is.
> 
> True. I don't think it will show sizable benefit on runtime overhead
> since rmap_walk is already one of the most expensive operation in MM.
> 
> I could reintroduce the typecast for page_idle_clear_pte_refs to remove
> the const as we had several years.
> 
> If your concern was to make rmap_walk_control mutable back, I could
> change rmap_walk function having return value or adding a addtional
> new out param. However, I thought rmap_walk_control is more readable/
> easier than them.

I haven't thought deeply about it, but I suspect the right approach is
to remove the rather dubious optimisation in page_idle_clear_pte_refs().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ