public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Chris Friesen" <cfriesen@nortel.com>
To: Ingo Molnar <mingo@elte.hu>,
	Linux kernel <linux-kernel@vger.kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [bug report] sched: stop_machine() usage causes load balancer to misbehave
Date: Thu, 02 Oct 2008 17:57:25 -0600	[thread overview]
Message-ID: <48E55FE5.40108@nortel.com> (raw)

I mentioned before that ftrace (specifically the ftraced daemon) seems 
to be interfering with the load balancer.  After some experimenting, it 
appears that any regular calls to stop_machine() will end up confusing 
the load balancer.

As an experiment, I disabled ftraced (which would normally result in 
correct load balancing) but added a single kernel thread which simply 
runs the following loop, where "chrisd2" is a dummy function.

while(1) {
	set_current_state(TASK_INTERRUPTIBLE);
	schedule_timeout(HZ);
	stop_machine(chrisd2, NULL, NULL);
}

With the modified kernel, my testcase shows that the load balancer 
doesn't balance--all tasks remain on one cpu while the other one stays idle.

Most of the users of stop_machine() (kprobes on s390, cpu hotplug, 
module load/unload, numa_zonelist_order, etc.) don't seem to be called 
on a regular basis.  Only ftrace behaves this way, which is why it 
appeared to be the source of the problem.

I haven't tracked down the specific reasons for the misbehaviour, but it 
seems undesirable.

Anyone have any ideas what might be causing this?  Is it a problem with 
the load balancer, or an unavoidable consequence of what stop_machine() 
is doing?

Thanks,

Chris

             reply	other threads:[~2008-10-02 23:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-02 23:57 Chris Friesen [this message]
2008-10-03  0:02 ` [bug report] sched: stop_machine() usage causes load balancer to misbehave Steven Rostedt
2008-10-04  5:27   ` Chris Friesen

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=48E55FE5.40108@nortel.com \
    --to=cfriesen@nortel.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox