Re: [RFC PATCH 6/9] sched: Treat try_to_block_task with pending signal as wakeup
From: Gabriele Monaco
Date: Tue Apr 15 2025 - 07:36:28 EST
2025-04-15T11:05:06Z Nam Cao <namcao@xxxxxxxxxxxxx>:
> On Mon, Apr 14, 2025 at 12:31:12PM +0200, Gabriele Monaco wrote:
>> Mmh, that's a good point.
>> The thing is: this happens when the signal is generated while we are
>> scheduling (on different CPUs), so we take a short-cut and put the task
>> to running directly.
>> This thing is already racy, so we may or may not see the waking/wakeup.
>>
>> Now probably waking shouldn't be there for the reason you said, but I'm
>> not sure a wakeup not following a waking would be correct either.
>> I might be missing something here, though.
>
> I'm not familiar with signal and sched, so I don't have anything more to
> add, sorry.
>
No worries, that was helpful already!
> I presume this is to make the srs monitor works? Perhaps it is possible to
> modify the model so that this patch is not required? Let me stare at srs,
> maybe I will have something..
Yeah, that's another option, we could have a special case just for that, but I wanted to avoid it.
But still, let me know if you got a good idea how to rearrange it!
Thanks,
Gabriele