From: Trond Myklebust <trondmy@hammerspace.com>
To: "bfields@redhat.com" <bfields@redhat.com>,
"tj@kernel.org" <tj@kernel.org>
Cc: "torvalds@linux-foundation.org" <torvalds@linux-foundation.org>,
"jlayton@redhat.com" <jlayton@redhat.com>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"shli@fb.com" <shli@fb.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"dhowells@redhat.com" <dhowells@redhat.com>,
"oleg@redhat.com" <oleg@redhat.com>
Subject: Re: [PATCH 0/4] allow multiple kthreadd's
Date: Fri, 1 May 2020 19:05:46 +0000 [thread overview]
Message-ID: <d937c9956c0edb0d6fefb9f7dc826367015db4aa.camel@hammerspace.com> (raw)
In-Reply-To: <20200501184935.GD9191@pick.fieldses.org>
On Fri, 2020-05-01 at 14:49 -0400, J. Bruce Fields wrote:
> On Fri, May 01, 2020 at 02:21:54PM -0400, Tejun Heo wrote:
> > Hello,
> >
> > On Fri, May 01, 2020 at 10:59:24AM -0700, Linus Torvalds wrote:
> > > Which kind of makes me want to point a finger at Tejun. But it's
> > > been
> > > mostly PeterZ touching this file lately..
> >
> > Looks fine to me too. I don't quite understand the usecase tho. It
> > looks
> > like all it's being used for is to tag some kthreads as belonging
> > to the
> > same group.
>
> Pretty much.
>
Wen running an instance of knfsd from inside a container, you want to
be able to have the knfsd kthreads be parented to the container init
process so that they get killed off when the container is killed.
Right now, we can easily leak those kernel threads simply by killing
the container.
> > Can't that be done with kthread_data()?
>
> Huh, maybe so, thanks.
>
> I need to check this from generic file locking code that could be run
> by
> any task--but I assume there's an easy way I can check if I'm a
> kthread
> before calling kthread_data(current).
>
> I do expect to expose a delegation interface for userspace servers
> eventually too. But we could do the tgid check for them and still
> use
> kthread_data() for nfsd. That might work.
>
> --b.
>
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com
next prev parent reply other threads:[~2020-05-01 19:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-01 16:01 [PATCH 0/4] allow multiple kthreadd's J. Bruce Fields
2020-05-01 16:01 ` [PATCH 1/4] kthreads: minor kthreadd refactoring J. Bruce Fields
2020-05-01 16:01 ` [PATCH 2/4] kthreads: Simplify tsk_fork_get_node J. Bruce Fields
2020-05-01 16:01 ` [PATCH 3/4] kthreads: allow multiple kthreadd's J. Bruce Fields
2020-05-01 16:01 ` [PATCH 4/4] kthreads: allow cloning threads with different flags J. Bruce Fields
2020-05-01 17:59 ` [PATCH 0/4] allow multiple kthreadd's Linus Torvalds
2020-05-01 18:21 ` Tejun Heo
2020-05-01 18:30 ` Linus Torvalds
2020-05-01 19:02 ` J. Bruce Fields
2020-05-01 18:49 ` J. Bruce Fields
2020-05-01 19:05 ` Trond Myklebust [this message]
2020-05-01 19:20 ` tj
2020-05-01 19:22 ` J. Bruce Fields
2020-05-05 2:15 ` J. Bruce Fields
2020-05-05 15:54 ` Tejun Heo
2020-05-05 16:23 ` J. Bruce Fields
2020-05-05 21:01 ` J. Bruce Fields
2020-05-05 21:09 ` Tejun Heo
2020-05-05 21:25 ` J. Bruce Fields
2020-05-06 15:36 ` J. Bruce Fields
2020-05-06 15:39 ` Tejun Heo
2020-05-06 15:54 ` J. Bruce Fields
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=d937c9956c0edb0d6fefb9f7dc826367015db4aa.camel@hammerspace.com \
--to=trondmy@hammerspace.com \
--cc=bfields@redhat.com \
--cc=dhowells@redhat.com \
--cc=jlayton@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=shli@fb.com \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.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