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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 15 Apr 2023 16:27:39 +0000
From:   SeongJae Park <sj@...nel.org>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     SeongJae Park <sj@...nel.org>, akpm@...ux-foundation.org,
        vbabka@...e.cz, paulmck@...nel.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] mm/slab: break up RCU readers on SLAB_TYPESAFE_BY_RCU example code

On Sat, 15 Apr 2023 04:49:44 +0100 Matthew Wilcox <willy@...radead.org> wrote:

> On Sat, Apr 15, 2023 at 03:31:59AM +0000, SeongJae Park wrote:
> > The SLAB_TYPESAFE_BY_RCU example code snippet is having not tiny RCU
> > read-side critical section.  'Documentation/RCU/rculist_nulls.rst' has
> > similar example code snippet, and commit da82af04352b ("doc: Update and
> > wordsmith rculist_nulls.rst") has broken it.  Apply the change to
> > SLAB_TYPESAFE_BY_RCU example code snippet, too.
> 
> so the page cache (eg find_get_entry()) does not follow this "split
> the RCU critical section" pattern.  Should it?  What's the benefit?

The benefit would be shorter RCU grace period that allows lower memory
footprint, iiuc.

Whether it should split the section or not would depend on the lookup speed and
number of retries, I think.  If the total lookup takes a time that long enough
to make the grace period too long and therefore the amount of RCU-protected
objects that cannot freed due to the grace priod is huge, I think it would
better to follow the pattern.


Thanks,
SJ

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ