Re: [PATCH 0/4] allow multiple kthreadd's

2020-05-06 Thread J. Bruce Fields
On Wed, May 06, 2020 at 11:39:20AM -0400, Tejun Heo wrote: > Hello, Bruce. > > On Wed, May 06, 2020 at 11:36:58AM -0400, J. Bruce Fields wrote: > > On Tue, May 05, 2020 at 05:25:27PM -0400, J. Bruce Fields wrote: > > > On Tue, May 05, 2020 at 05:09:56PM -0400, Tejun Heo wrote: > > > > It's not the

Re: [PATCH 0/4] allow multiple kthreadd's

2020-05-06 Thread Tejun Heo
Hello, Bruce. On Wed, May 06, 2020 at 11:36:58AM -0400, J. Bruce Fields wrote: > On Tue, May 05, 2020 at 05:25:27PM -0400, J. Bruce Fields wrote: > > On Tue, May 05, 2020 at 05:09:56PM -0400, Tejun Heo wrote: > > > It's not the end of the world but a bit hacky. I wonder whether something > > > lik

Re: [PATCH 0/4] allow multiple kthreadd's

2020-05-06 Thread J. Bruce Fields
On Tue, May 05, 2020 at 05:25:27PM -0400, J. Bruce Fields wrote: > On Tue, May 05, 2020 at 05:09:56PM -0400, Tejun Heo wrote: > > It's not the end of the world but a bit hacky. I wonder whether something > > like the following would work better for identifying worker type so that you > > can do sth

Re: [PATCH 0/4] allow multiple kthreadd's

2020-05-05 Thread J. Bruce Fields
On Tue, May 05, 2020 at 05:09:56PM -0400, Tejun Heo wrote: > Hello, > > On Tue, May 05, 2020 at 05:01:18PM -0400, J. Bruce Fields wrote: > > On Mon, May 04, 2020 at 10:15:14PM -0400, J. Bruce Fields wrote: > > > Though now I'm feeling greedy: it would be nice to have both some kind > > > of global

Re: [PATCH 0/4] allow multiple kthreadd's

2020-05-05 Thread Tejun Heo
Hello, On Tue, May 05, 2020 at 05:01:18PM -0400, J. Bruce Fields wrote: > On Mon, May 04, 2020 at 10:15:14PM -0400, J. Bruce Fields wrote: > > Though now I'm feeling greedy: it would be nice to have both some kind > > of global flag, *and* keep kthread->data pointing to svc_rqst (as that > > would

Re: [PATCH 0/4] allow multiple kthreadd's

2020-05-05 Thread J. Bruce Fields
On Mon, May 04, 2020 at 10:15:14PM -0400, J. Bruce Fields wrote: > Though now I'm feeling greedy: it would be nice to have both some kind > of global flag, *and* keep kthread->data pointing to svc_rqst (as that > would give me a simpler and quicker way to figure out which client is > conflicting).

Re: [PATCH 0/4] allow multiple kthreadd's

2020-05-05 Thread J. Bruce Fields
On Tue, May 05, 2020 at 11:54:05AM -0400, Tejun Heo wrote: > Hello, Bruce. > > On Mon, May 04, 2020 at 10:15:14PM -0400, J. Bruce Fields wrote: > > We're currently using it to pass the struct svc_rqst that a new nfsd > > thread needs. But once the new thread has gotten that, I guess it could > >

Re: [PATCH 0/4] allow multiple kthreadd's

2020-05-05 Thread Tejun Heo
Hello, Bruce. On Mon, May 04, 2020 at 10:15:14PM -0400, J. Bruce Fields wrote: > We're currently using it to pass the struct svc_rqst that a new nfsd > thread needs. But once the new thread has gotten that, I guess it could > set kthread->data to some global value that it uses to say "I'm a knfsd

Re: [PATCH 0/4] allow multiple kthreadd's

2020-05-04 Thread J. Bruce Fields
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 u

Re: [PATCH 0/4] allow multiple kthreadd's

2020-05-01 Thread J. Bruce Fields
On Fri, May 01, 2020 at 07:05:46PM +, Trond Myklebust wrote: > 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

Re: [PATCH 0/4] allow multiple kthreadd's

2020-05-01 Thread t...@kernel.org
Hello, On Fri, May 01, 2020 at 07:05:46PM +, Trond Myklebust wrote: > 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,

Re: [PATCH 0/4] allow multiple kthreadd's

2020-05-01 Thread Trond Myklebust
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 P

Re: [PATCH 0/4] allow multiple kthreadd's

2020-05-01 Thread J. Bruce Fields
On Fri, May 01, 2020 at 11:30:38AM -0700, Linus Torvalds wrote: > On Fri, May 1, 2020 at 11:22 AM Tejun Heo wrote: > > > > 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. Can't tha

Re: [PATCH 0/4] allow multiple kthreadd's

2020-05-01 Thread J. Bruce Fields
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 u

Re: [PATCH 0/4] allow multiple kthreadd's

2020-05-01 Thread Linus Torvalds
On Fri, May 1, 2020 at 11:22 AM Tejun Heo wrote: > > 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. Can't that be done with kthread_data()? I _think_ Bruce wants the signal handling

Re: [PATCH 0/4] allow multiple kthreadd's

2020-05-01 Thread Tejun Heo
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 ta

Re: [PATCH 0/4] allow multiple kthreadd's

2020-05-01 Thread Linus Torvalds
On Fri, May 1, 2020 at 9:02 AM J. Bruce Fields wrote: > > Anyway, does this multiple kthreadd approach look reasonable? I don't see anything that looks alarming. My main reaction was that I don't like the "kthreadd" name, but that's because for some reason I always read it as "kthre add". That m

[PATCH 0/4] allow multiple kthreadd's

2020-05-01 Thread J. Bruce Fields
From: "J. Bruce Fields" These patches allow a caller to create its own kthreadd. The motivation is file delegations: currently any write operation from a client breaks all delegations, even delegations held by the same client. To fix that, we need to know which client is performing a given oper