Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
xen.2142
56b0a90a-credit-update-timeslice-under-lock.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 56b0a90a-credit-update-timeslice-under-lock.patch of Package xen.2142
# Commit f2c96ac4dedf4976e46de34c69c2cd8b289c4ef2 # Date 2016-02-02 14:03:06 +0100 # Author Juergen Gross <jgross@suse.com> # Committer Jan Beulich <jbeulich@suse.com> credit: update timeslice under lock When updating the timeslice of the credit scheduler protect the scheduler's private data by it's lock. Today a possible race could result only in some weird scheduling decisions during one timeslice, but further adjustments will need the lock anyway. Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com> --- a/xen/common/sched_credit.c +++ b/xen/common/sched_credit.c @@ -1080,6 +1080,7 @@ csched_sys_cntl(const struct scheduler * int rc = -EINVAL; xen_sysctl_credit_schedule_t *params = &sc->u.sched_credit; struct csched_private *prv = CSCHED_PRIV(ops); + unsigned long flags; switch ( sc->cmd ) { @@ -1091,8 +1092,12 @@ csched_sys_cntl(const struct scheduler * || params->ratelimit_us < XEN_SYSCTL_SCHED_RATELIMIT_MIN)) || MICROSECS(params->ratelimit_us) > MILLISECS(params->tslice_ms) ) goto out; + + spin_lock_irqsave(&prv->lock, flags); __csched_set_tslice(prv, params->tslice_ms); prv->ratelimit_us = params->ratelimit_us; + spin_unlock_irqrestore(&prv->lock, flags); + /* FALLTHRU */ case XEN_SYSCTL_SCHEDOP_getinfo: params->tslice_ms = prv->tslice_ms;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor