All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Turner <pjt@google.com>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Mike Galbraith <efault@gmx.de>
Subject: [patch] sched: fix unregister_fair_sched_group
Date: Mon, 29 Nov 2010 16:55:40 -0800	[thread overview]
Message-ID: <20101130005740.080828123@google.com> (raw)
In-Reply-To: 20101130005539.617388324@google.com

[-- Attachment #1: sched-fix_unregister.patch --]
[-- Type: text/plain, Size: 1069 bytes --]

In the flipping and flopping between calling unregister_fair_sched_group on a
per-cpu versus per-group basis we ended up in a bad state.

Remove from the list for the passed cpu as opposed to some arbitrary index.

(This fixes explosions w/ autogroup as well as a group creation/destruction 
stress test)

Signed-off-by: Paul Turner <pjt@google.com>
---
 kernel/sched.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Index: tip/kernel/sched.c
===================================================================
--- tip.orig/kernel/sched.c
+++ tip/kernel/sched.c
@@ -8097,7 +8097,6 @@ static inline void unregister_fair_sched
 {
 	struct rq *rq = cpu_rq(cpu);
 	unsigned long flags;
-	int i;
 
 	/*
 	* Only empty task groups can be destroyed; so we can speculatively
@@ -8107,7 +8106,7 @@ static inline void unregister_fair_sched
 		return;
 
 	raw_spin_lock_irqsave(&rq->lock, flags);
-	list_del_leaf_cfs_rq(tg->cfs_rq[i]);
+	list_del_leaf_cfs_rq(tg->cfs_rq[cpu]);
 	raw_spin_unlock_irqrestore(&rq->lock, flags);
 }
 #else /* !CONFG_FAIR_GROUP_SCHED */



       reply	other threads:[~2010-11-30  0:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20101130005539.617388324@google.com>
2010-11-30  0:55 ` Paul Turner [this message]
2010-11-30  9:09   ` [tip:sched/core] sched: Fix unregister_fair_sched_group() tip-bot for Paul Turner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101130005740.080828123@google.com \
    --to=pjt@google.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.