Richard Weinberger <[email protected]> writes:

> Philippe,
>
> ----- Ursprüngliche Mail -----
>> Von: "Philippe Gerum" <[email protected]>
>>> Why is this "special" cpu-affinity necessary? What would happen if we
>>> remove that? Asking because I want to make sure that we do not miss any
>>> concurrency problems by adding this constraint.
>>>
>> 
>> The reason to pin the threads on the same CPU is to guarantee an ideal
>> execution sequence for some tests provided the scheduling policy and/or
>> the synchronization mechanisms do behave as intended. Concurrency on
>> multiple CPU would break the assumptions about that ideal sequence.
>> 
>> For instance, you could not resort to any inter-thread synchronization
>> to prevent unwanted SMP concurrency when checking that a scheduling
>> policy is properly undergone, that would make the test irrelevant by
>> papering over local preemption issues if any.  So we pin all the threads
>> on the same CPU to exclude SMP, and only that.
>
> So the tests have assumptions about the scheduling order of threads?
> I always thought even with a single CPU such assumptions can break.
>

Not if the scheduling core Xenomai provides does its job properly.

-- 
Philippe.

Reply via email to