[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/3] xen: sched: introduce the 'null' semi-static scheduler
On Mon, Mar 27, 2017 at 11:31 AM, George Dunlap <george.dunlap@xxxxxxxxxx> wrote: > On 17/03/17 18:42, Dario Faggioli wrote: >> In cases where one is absolutely sure that there will be >> less vCPUs than pCPUs, having to pay the cose, mostly in >> terms of overhead, of an advanced scheduler may be not >> desirable. >> >> The simple scheduler implemented here could be a solution. >> Here how it works: >> - each vCPU is statically assigned to a pCPU; >> - if there are pCPUs without any vCPU assigned, they >> stay idle (as in, the run their idle vCPU); >> - if there are vCPUs which are not assigned to any >> pCPU (e.g., because there are more vCPUs than pCPUs) >> they *don't* run, until they get assigned; >> - if a vCPU assigned to a pCPU goes away, one of the >> waiting to be assigned vCPU, if any, gets assigned >> to the pCPU and can run there. > > Hmm -- I'm not sure about this 'waitqueue' thing. If you have a > multi-vcpu VM and one vcpu hangs, what normally happens is that the rest > of the VM ends up wedging itself in an unpredictable way, and if there's > a watchdog timer or sanity check of any sort then it will hit a > bugcheck. As implemented, any number of mundane operations may cause > such a situation if you have one less pcpu or one more vcpu than you > thought. This seems like a fairly "sharp edge" to have in the interface. > > Would it be possible instead to have domain assignment, vcpu-add / > remove, pcpu remove, &c just fail (perhaps with -ENOSPC and/or -EBUSY) > if we ever reach a situation where |vcpus| > |pcpus|? > > Or, to fail as many operations *as possible* which would bring us to > that state, use the `waitqueue` idea as a backup for situations where we > can't really avoid it? I suppose one reason is that it looks like a lot of the operations can't really fail -- insert_vcpu and deinit_pdata both return void, and the scheduler isn't even directly involved in setting the hard affinity, so doesn't get a chance to object that with the new hard affinity there is nowhere to run the vcpu. I don't want to wait to re-write the interfaces to get this scheduler in, so I suppose the waitqueue thing will have to do for now. :-) -George _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |