All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Oleg Nesterov <oleg@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [BUG] events process running on wrong cpu
Date: Mon, 21 Sep 2009 11:02:56 +0200	[thread overview]
Message-ID: <1253523777.8439.155.camel@twins> (raw)
In-Reply-To: <20090921085155.GB4649@osiris.boeblingen.de.ibm.com>

On Mon, 2009-09-21 at 10:51 +0200, Heiko Carstens wrote:
> Hi,
> 
> with todays git from time to time I get this (s390 defconfig):

Yep, I messed up..

Does your kernel contain the below?


---
commit 3f04e8cd5b24727a2500f8ab8f3de730ba47b02c
Author: Mike Galbraith <efault@gmx.de>
Date:   Sat Sep 19 16:52:35 2009 +0200

    sched: Re-add lost cpu_allowed check to sched_fair.c::select_task_rq_fair()
    
    While doing some testing, I pinned mplayer, only to find it
    following X around like a puppy. Looking at commit c88d591, I found
    a cpu_allowed check that went AWOL.  I plugged it back in where it
    looks like it needs to go, and now when I say "sit, stay!", mplayer
    obeys again.
    
    'c88d591 sched: Merge select_task_rq_fair() and
    sched_balance_self()' accidentally dropped the check, causing
    wake_affine() to pull pinned tasks - put it back.
    
    [ v2: use a cheaper version from Peter ]
    
    Signed-off-by: Mike Galbraith <efault@gmx.de>
    Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    LKML-Reference: <new-submission>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 29b35a7..566e3bb 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1339,7 +1339,8 @@ static int select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flag
 	int sync = wake_flags & WF_SYNC;
 
 	if (sd_flag & SD_BALANCE_WAKE) {
-		if (sched_feat(AFFINE_WAKEUPS))
+		if (sched_feat(AFFINE_WAKEUPS) &&
+		    cpumask_test_cpu(cpu, &p->cpus_allowed))
 			want_affine = 1;
 		new_cpu = prev_cpu;
 	}



  reply	other threads:[~2009-09-21  9:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-21  8:51 [BUG] events process running on wrong cpu Heiko Carstens
2009-09-21  9:02 ` Peter Zijlstra [this message]
2009-09-21  9:03   ` Ingo Molnar
2009-09-21  9:08     ` Heiko Carstens
2009-09-21  9:06 ` [PATCH] Always show Cpus_allowed field in /proc/<pid>/status Heiko Carstens
2009-09-21  9:17   ` Heiko Carstens
2009-09-21 22:33     ` Paul Menage
2009-09-21 12:52   ` [tip:sched/core] sched: " tip-bot for Heiko Carstens

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=1253523777.8439.155.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=oleg@redhat.com \
    /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.