On 11/15/2021 7:49 PM, Prakash Sangappa wrote:
Here are some use cases received from our Databases(Oracle) group.
Thank you Prakash for providing the potential use cases. This would really help with the design and validation of the UINTR APIs.
Aim is to use user interrupts as one mechanism, for fast IPC and to signal target thread blocked in the kernel in a system call. i.e replace use of signals with user interrupts.
Mimicking this signal behavior would likely add some complexity to the implementation. Since there is interest, we'll work on prototyping this to evaluate tradeoffs and present them here.
Following enhancements with respect to sharing UITT table will be beneficial. Oracle DB creates large number of multithreaded processes. A thread in a process may need to communicate(using user interrupts) with another thread in any other process. Current proposal of receiver sending an FD per vector to each of the sender will be an overhead. Also every sender process/thread allocating a sender table for storing same receiver UPIDs will be duplication resulting in wasted memory. > In addition to the current FD based registration approach, having a way for a group of DB processes to share a sender(UITT) table and allowing each of the receiver threads to directly register itself in the shared UITT table, will be efficient. For this the receiver need not create an fd. The receiver’s UPID index in UITT got from the registration will be shared with all senders via shared memory(IPC).
Sharing the UITT between tasks of the same process would be relatively easier compared to the sharing the UITT across processes. We would need a scalable mechanism to authenticate the sharing of this kernel resource across the process boundary.
I am working on a proposal for this. I'll send it out once I have something concrete.
DB maintains a process table of all the DB processes/threads in the shared memory. The receiver can register itself in the shared UITT table and store its UPID index in the process table. Sender will lookup target process from the process table to get the UITT index and send the user interrupt.
Thanks, Sohil