[xen master] xen: in do_softirq() sample smp_processor_id() only once.
Author: Dario Faggioli <[hidden email]>
AuthorDate: Wed Aug 30 12:06:20 2017 +0100
Commit: George Dunlap <[hidden email]>
CommitDate: Wed Aug 30 12:06:20 2017 +0100
xen: in do_softirq() sample smp_processor_id() only once.
In fact, right now, we read it at every iteration of the loop.
The reason it's done like this is how context switch was handled
on IA64 (see commit ae9bfcdc, "[XEN] Various softirq cleanups" ).
1) we don't have IA64 any longer, and all the achitectures that
we do support, are ok with sampling once and for all;
2) sampling at every iteration (slightly) affect performance;
3) sampling at every iteration is misleading, as it makes people
believe that it is currently possible that SCHEDULE_SOFTIRQ
moves the execution flow on another CPU (and the comment,
by reinforcing this belief, makes things even worse!).
- do the sampling only once, and remove the comment;
- leave an ASSERT() around, so that, if context switching
logic changes (in current or new arches), we will notice.