linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Huacai Chen <chenhuacai@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Huacai Chen <chenhuacai@loongson.cn>,
	Luis Chamberlain <mcgrof@kernel.org>,
	 "Eric W . Biederman" <ebiederm@xmission.com>,
	Kees Cook <keescook@chromium.org>,
	linux-mm@kvack.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] kthread: Unify kernel_thread() and user_mode_thread()
Date: Sat, 13 May 2023 11:20:10 +0800	[thread overview]
Message-ID: <CAAhV-H7zbc4hH=YJ9pZdT4jZC8=UUXewq6nbDVUjsAHp-bXWAg@mail.gmail.com> (raw)
In-Reply-To: <20230512165309.896e063a9398639250eab264@linux-foundation.org>

Hi, Andrew,

On Sat, May 13, 2023 at 7:53 AM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Tue,  9 May 2023 18:41:27 +0800 Huacai Chen <chenhuacai@loongson.cn> wrote:
>
> > Commit 343f4c49f2438d8 ("kthread: Don't allocate kthread_struct for init
> > and umh") introduces a new function user_mode_thread() for init and umh.
> > But the name is a bit confusing because init and umh are indeed kernel
> > threads at creation time, the real difference is "they will become user
> > processes". So let's unify the kernel_thread() and user_mode_thread() to
> > kernel_thread() again, and add a new 'user' parameter for init and umh.
> >
> > ...
> >
> >  5 files changed, 9 insertions(+), 26 deletions(-)
> >
>
> Less code is nice.
>
> > -extern pid_t user_mode_thread(int (*fn)(void *), void *arg, unsigned long flags);
> > +                         unsigned long flags, int user);
>
> `bool user'?
OK, I will do that in the next version if the whole patch is acceptable.

Huacai
>
>


      reply	other threads:[~2023-05-13  3:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09 10:41 Huacai Chen
2023-05-10 15:44 ` Eric W. Biederman
2023-05-13  3:18   ` Huacai Chen
2023-05-15 14:41     ` Eric W. Biederman
2023-05-20  8:50       ` Huacai Chen
2023-05-12 23:53 ` Andrew Morton
2023-05-13  3:20   ` Huacai Chen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAhV-H7zbc4hH=YJ9pZdT4jZC8=UUXewq6nbDVUjsAHp-bXWAg@mail.gmail.com' \
    --to=chenhuacai@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=chenhuacai@loongson.cn \
    --cc=ebiederm@xmission.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mcgrof@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox