On Thu, 2016-03-24 at 12:44 +0000, George Dunlap wrote: > On 18/03/16 19:27, Andrew Cooper wrote: > > This avoids all this opencoded allocation/refcounting, the chance > > that > > starting a scheduler would fail for memory reasons, and one extra > > cpumask in the per-cpu data area won't break the bank. > Going a bit further, since (according to the changelog) both credit1 > and > rtds also do this, would it make sense to have schedule.c define > these, > and allow any of the schedulers to use them? > Yeah, well, I guess it could. > (Assuming that both credit1 and rtds allocate exactly one mask per > cpu.) > They do. The only difference between credit1 and the other two is that credit1 already has a per-cpu private scheduler structure (csched_pcpu, where also the runqueue is), and the mask has been put there, so it's handled a little bit differently. But it should be no problem turning it into using a mask from schedule.c, in the same way that RTDS and Credit2 will do. I like the idea, and I'm up for it for v2. Thanks and Regards, Dario -- <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)