Re: [PATCH net-next v1 1/3] connector/cn_proc: Add hash table for threads

2024-10-14 Thread Anjali Kulkarni
On 10/14/24, 1:28 AM, "Peter Zijlstra" mailto:pet...@infradead.org>> wrote: On Sun, Oct 13, 2024 at 10:06:15AM -0700, Anjali Kulkarni wrote: > + if (unlikely(task->flags & PF_EXIT_NOTIFY)) { > + task_lock(task); > + task->flags &= ~PF_EXIT_NOTIFY; > + task_unlock(task); > + > @@ -413,6 +44

Re: [PATCH net-next v1 1/3] connector/cn_proc: Add hash table for threads

2024-10-14 Thread Peter Zijlstra
On Sun, Oct 13, 2024 at 10:06:15AM -0700, Anjali Kulkarni wrote: > + if (unlikely(task->flags & PF_EXIT_NOTIFY)) { > + task_lock(task); > + task->flags &= ~PF_EXIT_NOTIFY; > + task_unlock(task); > + > @@ -413,6 +440,15 @@ static void cn_proc_mcast_ctl(struc

[PATCH net-next v1 1/3] connector/cn_proc: Add hash table for threads

2024-10-13 Thread Anjali Kulkarni
Add a new type PROC_CN_MCAST_NOTIFY to proc connector API, which allows a thread to notify the kernel that is going to exit with a non-zero exit code and specify the exit code in it. When thread exits in the kernel, it will send this exit code as a proc filter notification to any listening process.