Question regarding process context

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

 



Hello,

I added a new operation for signalfd() and got it working. However,
the kernel's signalfd implementation uses "current" to get process
context details and adds the current process to a wait queue. When
trying to wake up, however, it gets called from the io_wqe_worker
context and the wake up would not normally happen since current now
resolves to io_wqe_worker. I've taken care of this by saving "current"
in the struct file's private_data when submitting and using that
instead during completion from the signalfd code. It works.
Essentially, current resolves to different tasks in the submission and
completion paths and this had to be taken care of for signalfd.

However, under io_uring, there are many cases where current will not
resolve to the user space process. For example, when being called from
io_sq_thread.

Since io_uring deals with calling code that originally implements
paths that are called from various system calls, they might internally
use current. What is the general strategy to handle the fact that
current can point to different tasks when submitting and completing?

Thanks!
-- 
Shuveb Hussain



[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