[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 1/4] xen: add real time scheduler rtds

On Thu, 2014-09-18 at 17:08 +0100, George Dunlap wrote:
> On 09/14/2014 10:37 PM, Meng Xu wrote:

> +static void
> +rt_dump_pcpu(const struct scheduler *ops, int cpu)
> +{
> +    struct rt_vcpu *svc = rt_vcpu(curr_on_cpu(cpu));
> +
> +    rt_dump_vcpu(ops, svc);
> +}
> These svc structures are allocated dynamically and may disappear at any 
> time... I think you need the lock to cover this as well.
About locking, I agree with George that we need these functions to be
protected. Right now, this scheduler only uses one lock for everything,
so that would mean grabbing that lock here too.

This far from optimal, e.g., with scalability in mind (although, dumping
is going to be pretty rare an operation), but I think it'd be fine for

In future (after 4.5), we may want to have a dedicated lock for all the
operations that manipulates the list of domains, as pretty much all our
other schedulers are doing.


<<This happens because I choose it to happen!>> (Raistlin Majere)
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

Attachment: signature.asc
Description: This is a digitally signed message part

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.