[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/7] xen: sched: fix locking for insert_vcpu() in credit1 and RTDS
On 08/10/15 13:52, Dario Faggioli wrote: > The insert_vcpu scheduler hook is called with an inconsistent > locking strategy. In fact, it is sometimes invoked while > holding the runqueue lock and sometimes when that is not the > case. > > For instance, in case of schedule_cpu_switch() the lock is > acquired in generic code. On the other hand, in case of > sched_move_domain(), locking is left as a responsibility > of the schedulers implementing the hook. > > This results in Credit1 and RTDS schedulers ending up (in > case of sched_move_domain()) doing runqueue manipulation > without holding any runqueue lock, which is a bug. (Credit2 > was doing the locking by itself already.) > > The right thing is to defer locking to the specific schedulers, > as it's them that know what, how and when it is best to lock > (as in: runqueue locks, vs. private scheduler locks, vs. both, > etc.). > > This patch, therefore: > - removes any locking around insert_vcpu() from generic > code; > - add proper locking in the hook implementations, for > both Credit1 and RTDS. > > Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |