Re: [Lse-tech] Bug in sys_sched_yield

george anzinger
2001-04-12T16:10:14Z

Hubertus Franke wrote:
>
> In the recent optimizations to sys_sched_yield a bug was introduced.
> In the current implementation of sys_sched_yield()
> the aligned_data and idle_tasks are indexed by logical cpu-#.
>
> They should however be indexed by physical cpu-#.
> Since logical==physical on the x86 platform, it doesn't matter there,
> for other platforms where this is not true it will matter.
> Below is the fix.
>
Uh... I do know about this map, but I wonder if it is at all needed.
What is the real difference between a logical cpu and the physical one.
Or is this only interesting if the machine is not Smp, i.e. all the cpus
are not the same? It just seems to me that introducing an additional
mapping just slows things down and, if all the cpus are the same, does
not really do anything. Of course, I am assuming that ALL usage would
be to the logical :)

George