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

Re: [Xen-devel] [RFC/RFT][PATCH 1 of 3] Move locking into pluggable schedulers.



On Wed, 2011-11-23 at 15:07 +0000, Dario Faggioli wrote:
> Pluggable schedulers' code knows what (and when) to lock better than
> generic code, let's delegate to them all the concurrency related issues.
> 
> Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
> 
> diff -r 84b3e46aa7d2 xen/common/sched_credit.c
> --- a/xen/common/sched_credit.c       Wed Nov 23 12:03:37 2011 +0000
> +++ b/xen/common/sched_credit.c       Wed Nov 23 15:09:14 2011 +0100
> @@ -161,6 +161,7 @@ struct csched_dom {
>   * System-wide private data
>   */
>  struct csched_private {
> +    /* lock for the whole pluggable scheduler, nests inside cpupool_lock */
>      spinlock_t lock;
>      struct list_head active_sdom;
>      uint32_t ncpus;

Given that every scheduler plugin is going to need this lock perhaps it
could be provided globally (but still have the responsibility for using
it fall on the plugin)?

I was mainly thinking of the sedf case where you add and maintain the
whole structure for just that lock. Perhaps you have future plans which
involve having to do that anyway in which case maybe my suggestion
doesn't make sense.

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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