public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: mingo@elte.hu, akpm@linux-foundation.org, menage@google.com,
	linux-kernel@vger.kernel.org, dino@in.ibm.com, cpw@sgi.com
Subject: Re: [patch] sched: fix sched-domains partitioning by cpusets
Date: Wed, 3 Oct 2007 02:21:08 -0700	[thread overview]
Message-ID: <20071003022108.5a8e310e.pj@sgi.com> (raw)
In-Reply-To: <200710030146.30162.nickpiggin@yahoo.com.au>

Nick wrote:
> Sorry for the confusion: I only meant the sched.c part of that
> patch, not the full thing.

Ah - ok.  We're getting closer then.  Good.

Let me be sure I've got this right then.

You prefer the interface from your proposed patch, by which the
cpuset code passes sched domain requests to the scheduler code a single
cpumask that will define a sched domain:

    int partition_sched_domains(cpumask_t *partition)

and I am suggesting instead a new and different interface:

    void partition_sched_domains(int ndoms_new, cpumask_t *doms_new)

In the first API, one cpumask is passed in, and a single sched
domain is formed, taking those CPUs from any sched domain they
might have already been a member of, into this new sched domain.

In the second API, the entire flat partitioning is passed in,
giving an array of masks, one mask for each desired sched domain.
The passed in masks do not overlap, but might not cover all CPUs.

Question -- how does one turn off load balancing on some CPUs
using the first API?

    Does one do this by forming singleton sched domains of one
    CPU each?  Is there any downside to doing this?

    The simplest cpuset code to work with this would end up exposing
    this method of disabling load balancing to user space, forcing
    users to create cpusets with one CPU each to be able do disable
    load balancing.

    However a little bit of additional kernel cpuset code could hide
    this detail from user space, by recognizing when the user had
    asked to turn off load balancing on some larger cpuset, and by
    then calling partition_sched_domains() multiple times, once for
    each CPU in that cpuset.

There might be an even simpler way.  If the kernel/sched.c routines
detach_destroy_domains() and build_sched_domains() were exposed as
external routines, then the cpuset code could call them directly,
removing the partition_sched_domains() routine from sched.c entirely.
Would this be worth persuing?

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

  reply	other threads:[~2007-10-03  9:21 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-30 10:44 [PATCH] cpuset and sched domains: sched_load_balance flag Paul Jackson
2007-09-29 19:21 ` Nick Piggin
2007-09-30 18:07   ` Paul Jackson
2007-09-30  3:34     ` Nick Piggin
2007-10-01  3:42       ` Paul Jackson
2007-10-02 13:05         ` Nick Piggin
2007-10-03  6:58           ` Paul Jackson
2007-10-02 16:09             ` Nick Piggin
2007-10-03  9:55               ` Paul Jackson
2007-10-02 17:56                 ` Nick Piggin
2007-10-03 11:38                   ` Paul Jackson
2007-10-02 19:25                     ` Nick Piggin
2007-10-03 12:14                       ` Paul Jackson
2007-10-02 19:53                         ` Nick Piggin
2007-10-03 12:41                           ` Paul Jackson
2007-10-02 20:30                             ` Nick Piggin
2007-10-03 17:46                               ` Paul Jackson
2007-10-03 12:17                   ` Paul Jackson
2007-10-02 20:31                     ` Nick Piggin
2007-10-03 17:44                       ` Paul Jackson
2007-10-01 18:15       ` Paul Jackson
2007-10-02 13:35         ` Nick Piggin
2007-10-03  6:22           ` [patch] sched: fix sched-domains partitioning by cpusets Ingo Molnar
2007-10-03  6:56             ` Paul Jackson
2007-10-02 15:46               ` Nick Piggin
2007-10-03  9:21                 ` Paul Jackson [this message]
2007-10-02 17:23                   ` Nick Piggin
2007-10-03 10:08                     ` Paul Jackson
2007-10-03  9:35                   ` Ingo Molnar
2007-10-03  9:39                     ` Paul Jackson
2007-10-02 17:29                       ` Nick Piggin
2007-10-03  7:20               ` Ingo Molnar
2007-10-03  7:25           ` [PATCH] cpuset and sched domains: sched_load_balance flag Paul Jackson
2007-10-02 16:14             ` Nick Piggin
2007-09-30 10:44 ` [PATCH] cpuset decrustify update and validate masks Paul Jackson
2007-09-30 17:33 ` [PATCH] cpuset and sched domains: sched_load_balance flag Ingo Molnar
2007-10-02 20:22 ` Randy Dunlap
2007-10-02 20:57   ` Paul Jackson

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=20071003022108.5a8e310e.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=cpw@sgi.com \
    --cc=dino@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    /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