[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whB2Cnmr2u8g5h57i8JfUoS3Qe=Pz7Bd8or3=ndJnQaWw@mail.gmail.com>
Date: Thu, 24 Aug 2023 08:02:51 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>, peterz@...hat.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/2] introduce __next_thread(), change next_thread()
On Thu, 24 Aug 2023 at 07:32, Oleg Nesterov <oleg@...hat.com> wrote:
>
> After document-while_each_thread-change-first_tid-to-use-for_each_thread.patch
> in mm tree + this series
Looking at your patch 2/2, I started looking at users ("Maybe we
*want* NULL for the end case, and make next_thread() and __next_thread
be the same?").
One of the main users is while_each_thread(), which certainly wants
that NULL case, both for an easier loop condition, but also because
the only user that uses the 't' pointer after the loop is
fs/proc/base.c, which wants it to be NULL.
And kernel/bpf/task_iter.c seems to *expect* NULL at the end?
End result: if you're changing next_thread() anyway, please just
change it to be a completely new thing that returns NULL at the end,
which is what everybody really seems to want, and don't add a new
__next_thread() helper. Ok?
Linus
Powered by blists - more mailing lists