[PATCH 13/27] score: Optimize SMP EDF move to ready operation

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Nov 22 06:41:28 UTC 2021


On 20/11/2021 21:09, Gedare Bloom wrote:
> On Mon, Nov 15, 2021 at 10:13 AM Sebastian Huber
> <sebastian.huber at embedded-brains.de>  wrote:
>> If a node is moved from the scheduled chain to the ready queue, then we
>> know that it is the highest priority ready node.  So, it can be
>> prepended to the ready queue without doing any comparisons.
>>
> I'm not certain on the logic here. It is possible for 2 threads X and
> Y become ready simultaneously, such that:
> 
> X is higher priority than Y. X and Y are higher priority than Z. X
> gets scheduled to replace Z, but there is no lower-priority/affine CPU
> for Y to get scheduled, so Y will be ready. Then Z is not
> higher-priority than Y so it shouldn't be directly prepended.
> 
> I think that could happen?
> 

The EDF SMP scheduler supports only one-to-one and one-to-all thread to 
processor affinities. The one-to-all threads have a separate ready queue 
and there is one ready queue for each processor owned by the scheduler 
used for the one-to-one threads. For the ordering across these queues a 
64-bit generation number is used. The restriction to one-to-one and 
one-to-all affinities is the key property which enables this optimization.

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list