Messages in this thread | | | Subject | Re: [PATCH] sched/fair: vruntime should normalize when switching from fair | From | Dietmar Eggemann <> | Date | Mon, 10 Sep 2018 23:24:49 -0700 |
| |
On 09/07/2018 12:58 AM, Vincent Guittot wrote: > On Fri, 7 Sep 2018 at 09:16, Juri Lelli <juri.lelli@gmail.com> wrote: >> >> On 06/09/18 16:25, Dietmar Eggemann wrote: >>> Hi Juri, >>> >>> On 08/23/2018 11:54 PM, Juri Lelli wrote: >>>> On 23/08/18 18:52, Dietmar Eggemann wrote: >>>>> Hi, >>>>> >>>>> On 08/21/2018 01:54 AM, Miguel de Dios wrote: >>>>>> On 08/17/2018 11:27 AM, Steve Muckle wrote: >>>>>>> From: John Dias <joaodias@google.com>
[...]
>>> Adding semaphores is possible but rt-app has no easy way to initialize >>> individual objects, e.g. sem_init(..., value). The only way I see is via the >>> global section, like "pi_enabled". But then, this is true for all objects of >>> this kind (in this case mutexes)? >> >> Right, global section should work fine. Why do you think this is a >> problem/limitation? > > keep in mind that rt-app still have "ressources" section. This one is > optional and almost never used as resources can be created on the fly > but it's still there and can be used to initialize resources if needed > like semaphore
I wasn't aware of that but this will do the job AFAICS. I just have to re-introduce the direct calls to init_foo_resource() (in this case init_sem_resource()) in init_resource_data() and call that instead of init_resource_data() for semaphores listed in the global resources section.
Example for a semaphore b_sem with initial value eq. 1:
"resources" : { "b_sem" : { "type" : "sem_wait", "value" : 1 } }
[...]
| |