Re: [PATCH 09/18] io-wq: fork worker threads from original task

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 4, 2021 at 11:19 AM Jens Axboe <axboe@xxxxxxxxx> wrote:
>
> Took a quick look at this, and I agree that's _much_ better. In fact, it
> boils down to just calling copy_process() and then having the caller do
> wake_up_new_task(). So not sure if it's worth adding an
> create_io_thread() helper, or just make copy_process() available
> instead. This is ignoring the trace point for now...

I really don't want to expose copy_process() outside of kernel/fork.c.

The whole three-phase "copy - setup - activate" model is a really
really good thing, and it's how we've done things internally almost
forever, but I really don't want to expose those middle stages to any
outsiders.

So I'd really prefer a simple new "create_io_worker()", even if it's
literally just some four-line function that does

   p = copy_process(..);
   if (!IS_ERR(p)) {
      block all signals in p
      set PF_IO_WORKER flag
      wake_up_new_task(p);
   }
   return p;

I very much want that to be inside kernel/fork.c and have all these
rules about creating new threads localized there.

              Linus



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux