Re: [PATCHSET 0/2] PF_IO_WORKER signal tweaks

2021-03-22 Thread Oleg Nesterov
On 03/20, Jens Axboe wrote: > > Hi, > > Been trying to ensure that we do the right thing wrt signals and > PF_IO_WORKER threads OMG. Am I understand correctly? create_io_thread() can create a sub- thread of userspace process which acts as a kernel thread? Looks like this is the recent feature I

Re: [PATCHSET 0/2] PF_IO_WORKER signal tweaks

2021-03-21 Thread Jens Axboe
On 3/21/21 9:18 AM, Eric W. Biederman wrote: > Jens Axboe writes: > >> On 3/20/21 4:08 PM, Eric W. Biederman wrote: >>> >>> Added criu because I just realized that io_uring (which can open files >>> from an io worker thread) looks to require some special handling for >>> stopping and freezing

Re: [PATCHSET 0/2] PF_IO_WORKER signal tweaks

2021-03-21 Thread Eric W. Biederman
Jens Axboe writes: > On 3/20/21 4:08 PM, Eric W. Biederman wrote: >> >> Added criu because I just realized that io_uring (which can open files >> from an io worker thread) looks to require some special handling for >> stopping and freezing processes. If not in the SIGSTOP case in the >>

Re: [PATCHSET 0/2] PF_IO_WORKER signal tweaks

2021-03-20 Thread Jens Axboe
On 3/20/21 1:18 PM, Linus Torvalds wrote: > On Sat, Mar 20, 2021 at 10:51 AM Linus Torvalds > wrote: >> >> Alternatively, make it not use >> CLONE_SIGHAND|CLONE_THREAD at all, but that would make it >> unnecessarily allocate its own signal state, so that's "cleaner" but >> not great either. > >

Re: [PATCHSET 0/2] PF_IO_WORKER signal tweaks

2021-03-20 Thread Jens Axboe
On 3/20/21 4:08 PM, Eric W. Biederman wrote: > > Added criu because I just realized that io_uring (which can open files > from an io worker thread) looks to require some special handling for > stopping and freezing processes. If not in the SIGSTOP case in the > related cgroup freezer case. > >

Re: [PATCHSET 0/2] PF_IO_WORKER signal tweaks

2021-03-20 Thread Eric W. Biederman
Added criu because I just realized that io_uring (which can open files from an io worker thread) looks to require some special handling for stopping and freezing processes. If not in the SIGSTOP case in the related cgroup freezer case. Linus Torvalds writes: > On Sat, Mar 20, 2021 at 10:51

Re: [PATCHSET 0/2] PF_IO_WORKER signal tweaks

2021-03-20 Thread Linus Torvalds
On Sat, Mar 20, 2021 at 10:51 AM Linus Torvalds wrote: > > Alternatively, make it not use > CLONE_SIGHAND|CLONE_THREAD at all, but that would make it > unnecessarily allocate its own signal state, so that's "cleaner" but > not great either. Thinking some more about that, it would be problematic

Re: [PATCHSET 0/2] PF_IO_WORKER signal tweaks

2021-03-20 Thread kernel test robot
Hi Jens, I love your patch! Yet something to improve: [auto build test ERROR on linux/master] [also build test ERROR on tip/sched/core linus/master v5.12-rc3 next-20210319] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use

Re: [PATCHSET 0/2] PF_IO_WORKER signal tweaks

2021-03-20 Thread Linus Torvalds
On Sat, Mar 20, 2021 at 9:27 AM Eric W. Biederman wrote: > > That makes me uneasy. Because especially the SIGSTOP changes feels like > it is the wrong thing semantically. The group_send_sig_info change > simply feels like it is unnecessary. SIGSTOP handling is fundamentally done at signal

Re: [PATCHSET 0/2] PF_IO_WORKER signal tweaks

2021-03-20 Thread kernel test robot
Hi Jens, I love your patch! Yet something to improve: [auto build test ERROR on linux/master] [also build test ERROR on tip/sched/core linus/master v5.12-rc3 next-20210319] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use

Re: [PATCHSET 0/2] PF_IO_WORKER signal tweaks

2021-03-20 Thread kernel test robot
Hi Jens, I love your patch! Yet something to improve: [auto build test ERROR on linux/master] [also build test ERROR on tip/sched/core linus/master v5.12-rc3 next-20210319] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use

Re: [PATCHSET 0/2] PF_IO_WORKER signal tweaks

2021-03-20 Thread Eric W. Biederman
Jens Axboe writes: > Hi, > > Been trying to ensure that we do the right thing wrt signals and > PF_IO_WORKER threads, and I think there are two cases we need to handle > explicitly: > > 1) Just don't allow signals to them in general. We do mask everything >as blocked, outside of SIGKILL, so

[PATCHSET 0/2] PF_IO_WORKER signal tweaks

2021-03-20 Thread Jens Axboe
Hi, Been trying to ensure that we do the right thing wrt signals and PF_IO_WORKER threads, and I think there are two cases we need to handle explicitly: 1) Just don't allow signals to them in general. We do mask everything as blocked, outside of SIGKILL, so things like wants_signal() will