Messages in this thread | | | Date | Mon, 30 Oct 2023 08:56:50 -0400 | Subject | Re: [POC][RFC][PATCH v2] sched: Extended Scheduler Time Slice | From | Mathieu Desnoyers <> |
| |
On 2023-10-27 12:49, Steven Rostedt wrote: > On Fri, 27 Oct 2023 12:35:56 -0400 > Mathieu Desnoyers <mathieu.desnoyers@efficios.com> wrote: > >>> Does that make more sense? >> >> Not really. >> >> Please see my other email about the need for a reference count here, for >> nested locks use-cases. > > Note, my original implementation of nested locking was done completely in > user space. > > int __thread lock_cnt; > > extend() { > if (lock_cnt++) > return; > ... > } > > unextend() { > if (--lock_cnt) > return; > ... > }
This only works if "your" lock implementation is the only user of this RSEQ feature within a process. RSEQ requires that multiple libraries can share the facilities. Therefore, the rseq field should include the nesting counter as part of the RSEQ ABI so various userspace libraries can use it collaboratively.
Thanks,
Mathieu
-- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com
| |