[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGudoHEWJqJf4mhcs1+Oes3qK1zFOYnb8Dnkj0aQD52yjMO=ZQ@mail.gmail.com>
Date: Mon, 3 Feb 2025 20:33:07 +0100
From: Mateusz Guzik <mjguzik@...il.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: ebiederm@...ssion.com, brauner@...nel.org, akpm@...ux-foundation.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 3/6] exit: postpone tty_kref_put() until after
tasklist_lock is dropped
On Mon, Feb 3, 2025 at 7:07 PM Oleg Nesterov <oleg@...hat.com> wrote:
>
> On 02/01, Mateusz Guzik wrote:
> >
> > Instead of smuggling the tty pointer directly, use a struct so that more
> > things can be added later.
>
> I am not sure this particular change worth the effort, but I won't argue.
> I'd like to know what Eric thinks.
>
it trivially whacks an atomic from an area protected by a global lock
> OTOH, if we do this, then perhaps we can do more "call tty_kref_put()
> lockless" changes later. And perhaps even add the new
>
> void tty_kref_put_sync(struct tty_struct *tty)
> {
> if (tty)
> kref_put(&tty->kref, release_one_tty);
> }
>
> helper. With this change release_task() doesn't need to abuse
> schedule_work(), and this helper can have more users.
>
> Nevermind, this is almost off-topic.
>
I have no interest in messing with ttys, regardless I agree this is
definitely something to consider *after* this patch is sorted out.
--
Mateusz Guzik <mjguzik gmail.com>
Powered by blists - more mailing lists