From: Juergen Gross Subject: [PATCH] Avoid panic when adjusting sedf parameters Date: Thu, 17 Nov 2011 13:33:34 +0100 Message-ID: <7167eaa187b3cd996637.1321533214@nehalem1> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5848945970933229940==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============5848945970933229940== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit When using sedf scheduler in a cpupool the system might panic when setting sedf scheduling parameters for a domain. Signed-off-by: juergen.gross@ts.fujitsu.com 1 file changed, 4 insertions(+) xen/common/sched_sedf.c | 4 ++++ --===============5848945970933229940== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=xen-staging.hg.patch # HG changeset patch # User Juergen Gross # Date 1321533195 -3600 # Node ID 7167eaa187b3cd996637b1f995707ff9196d00d3 # Parent fd3567cafe1c7ccd0ddba0ad7fb067d435e13529 Avoid panic when adjusting sedf parameters When using sedf scheduler in a cpupool the system might panic when setting sedf scheduling parameters for a domain. Signed-off-by: juergen.gross@ts.fujitsu.com diff -r fd3567cafe1c -r 7167eaa187b3 xen/common/sched_sedf.c --- a/xen/common/sched_sedf.c Tue Nov 15 14:50:18 2011 +0100 +++ b/xen/common/sched_sedf.c Thu Nov 17 13:33:15 2011 +0100 @@ -1304,6 +1304,8 @@ static void sedf_dump_cpu_state(const st rcu_read_lock(&domlist_read_lock); for_each_domain ( d ) { + if ( (d->cpupool ? d->cpupool->sched : &sched_sedf_def) != ops ) + continue; for_each_vcpu(d, ed) { if ( !__task_on_queue(ed) && (ed->processor == i) ) @@ -1369,6 +1371,8 @@ static int sedf_adjust_weights(struct cp rcu_read_lock(&domlist_read_lock); for_each_domain( d ) { + if ( c != d->cpupool ) + continue; for_each_vcpu ( d, p ) { if ( (cpu = p->processor) >= nr_cpus ) --===============5848945970933229940== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============5848945970933229940==--