lkml.org 
[lkml]   [2023]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [POC][RFC][PATCH v2] sched: Extended Scheduler Time Slice
From
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

\
 
 \ /
  Last update: 2023-10-30 13:57    [W:2.191 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site