public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Max Krasnyansky <maxk@qualcomm.com>
Cc: heiko.carstens@de.ibm.com, oleg@tv-sign.ru,
	akpm@linux-foundation.org, ego@in.ibm.com, menage@google.com,
	peterz@infradead.org, vegard.nossum@gmail.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] S390 topology: don't use kthread() for arch_reinit_sched_domains()
Date: Mon, 30 Jun 2008 15:28:38 -0500	[thread overview]
Message-ID: <20080630152838.e793cb10.pj@sgi.com> (raw)
In-Reply-To: <486938C1.90907@qualcomm.com>

Max wrote:
> When a CPU goes off line overall partitioning does not change we just 
> need to update current domains and remove the CPU that is no longer 
> available.

I don't believe that this is correct.

If one had say just the following three cpusets in a system:

	/dev/cpuset		# sched_load_balance == 0
	/dev/cpuset/alpha	# sched_load_balance == 1
	/dev/cpuset/beta	# sched_load_balance == 1

where the 'cpus' of alpha and beta overlapped by a single CPU,
and if one then took that single CPU offline, then the overall
partitioning of the system would change, from a single sched
domain covering the combined 'cpus' of alpha and beta, to two
separate sched domains, handling the 'cpus' of alpha and beta
separately.

> When a CPU goes online it always ends up in the root cpuset, 
> which means it can be added to the first load-balanced sched domain.

Also not correct, but at least in this case, one might be able
to avoid doing a full fledged 'rebuild_sched_domains()' call,
by the following reasoning.

    When bringing CPUs online, either the top cpuset has
    sched_load_balance set (1) or off (0).  If it is set, then one
    has a single sched domain covering all online CPUs, and yes one
    could just add the new CPU to that sched domain.  If off, then
    the newly online CPU would only be in the top cpuset, which does
    not by itself put that CPU in any sched domain, and that new CPU
    should not be added to -any- cpuset.

However, since we have to handle the offline case as well as the online
case, and since that case requires (to the best of my understanding)
calling rebuild_sched_domains(), I think it is best to just call that
routine in all cases.

An earlier version of this sched domain code always attempted to
incrementally adjust sched domains to online and offline events,
and that code ended up being a maintenance nightmare.  I will be most
reluctant to attempt to go back to such calculations.

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.940.382.4214

  reply	other threads:[~2008-06-30 20:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-29 16:51 [PATCH 2/2] S390 topology: don't use kthread() for arch_reinit_sched_domains() Oleg Nesterov
2008-06-30 13:45 ` Heiko Carstens
2008-06-30 19:01   ` Max Krasnyansky
2008-06-30 19:33     ` Paul Jackson
2008-06-30 19:49       ` Max Krasnyansky
2008-06-30 20:28         ` Paul Jackson [this message]
2008-06-30 20:47           ` Max Krasnyansky

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=20080630152838.e793cb10.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=ego@in.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxk@qualcomm.com \
    --cc=menage@google.com \
    --cc=oleg@tv-sign.ru \
    --cc=peterz@infradead.org \
    --cc=vegard.nossum@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox