Messages in this thread | | | From | Mateusz Guzik <> | Date | Wed, 27 Sep 2023 23:30:09 +0200 | Subject | Re: [PATCH v2] vfs: shave work on failed file open |
| |
On 9/27/23, Linus Torvalds <torvalds@linux-foundation.org> wrote: > On Wed, 27 Sept 2023 at 14:06, Mateusz Guzik <mjguzik@gmail.com> wrote: >> >> I think you attached the wrong file, it has next to no changes and in >> particular nothing for fd lookup. > > The fd lookup is already safe. > > It already does the whole "double-check the file pointer after doing > the increment" for other reasons - namely the whole "oh, the file > table can be re-allocated under us" thing. > > So the fd lookup needs rcu, but it does all the checks to make it all > work with SLAB_TYPESAFE_BY_RCU. >
Indeed, nice.
Sorry, I discounted the patch after not seeing anything for fd and file_free_rcu still being there. Looked like a WIP.
I'm going to give it a spin tomorrow along with some benching.
-- Mateusz Guzik <mjguzik gmail.com>
| |