22 Jul, 2007

1 commit


05 Mar, 2007

1 commit

  • Remove the SMT-nice feature which idles sibling cpus on SMT cpus to
    facilitiate nice working properly where cpu power is shared. The idling of
    cpus in the presence of runnable tasks is considered too fragile, easy to
    break with outside code, and the complexity of managing this system if an
    architecture comes along with many logical cores sharing cpu power will be
    unworkable.

    Remove the associated per_cpu_gain variable in sched_domains used only by
    this code.

    Also:

    The reason is that with dynticks enabled, this code breaks without yet
    further tweaks so dynticks brought on the rapid demise of this code. So
    either we tweak this code or kill it off entirely. It was Ingo's preference
    to kill it off. Either way this needs to happen for 2.6.21 since dynticks
    has gone in.

    Signed-off-by: Con Kolivas
    Acked-by: Ingo Molnar
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Con Kolivas
     

11 Dec, 2006

1 commit

  • Large sched domains can be very expensive to scan. Add an option SD_SERIALIZE
    to the sched domain flags. If that flag is set then we make sure that no
    other such domain is being balanced.

    [akpm@osdl.org: build fix]
    Signed-off-by: Christoph Lameter
    Cc: Peter Williams
    Cc: Nick Piggin
    Cc: Christoph Lameter
    Cc: "Siddha, Suresh B"
    Cc: "Chen, Kenneth W"
    Acked-by: Ingo Molnar
    Cc: KAMEZAWA Hiroyuki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

03 Oct, 2006

1 commit

  • Introduce the child field in sched_domain struct and use it in
    sched_balance_self().

    We will also use this field in cleaning up the sched group cpu_power
    setup(done in a different patch) code.

    Signed-off-by: Suresh Siddha
    Acked-by: Ingo Molnar
    Acked-by: Nick Piggin
    Cc: Paul Jackson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Siddha, Suresh B
     

28 Jun, 2006

1 commit

  • sysfs entries 'sched_mc_power_savings' and 'sched_smt_power_savings' in
    /sys/devices/system/cpu/ control the MC/SMT power savings policy for the
    scheduler.

    Based on the values (1-enable, 0-disable) for these controls, sched groups
    cpu power will be determined for different domains. When power savings
    policy is enabled and under light load conditions, scheduler will minimize
    the physical packages/cpu cores carrying the load and thus conserving
    power(with a perf impact based on the workload characteristics... see OLS
    2005 CMP kernel scheduler paper for more details..)

    Signed-off-by: Suresh Siddha
    Cc: Ingo Molnar
    Cc: Nick Piggin
    Cc: Con Kolivas
    Cc: "Chen, Kenneth W"
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Siddha, Suresh B
     

27 Jun, 2006

2 commits


26 Apr, 2006

1 commit


28 Mar, 2006

1 commit

  • Add a new sched domain for representing multi-core with shared caches
    between cores. Consider a dual package system, each package containing two
    cores and with last level cache shared between cores with in a package. If
    there are two runnable processes, with this appended patch those two
    processes will be scheduled on different packages.

    On such systems, with this patch we have observed 8% perf improvement with
    specJBB(2 warehouse) benchmark and 35% improvement with CFP2000 rate(with 2
    users).

    This new domain will come into play only on multi-core systems with shared
    caches. On other systems, this sched domain will be removed by domain
    degeneration code. This new domain can be also used for implementing power
    savings policy (see OLS 2005 CMP kernel scheduler paper for more details..
    I will post another patch for power savings policy soon)

    Most of the arch/* file changes are for cpu_coregroup_map() implementation.

    Signed-off-by: Suresh Siddha
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Siddha, Suresh B
     

04 Feb, 2006

1 commit

  • The patch implements cpu topology exportation by sysfs.

    Items (attributes) are similar to /proc/cpuinfo.

    1) /sys/devices/system/cpu/cpuX/topology/physical_package_id:
    represent the physical package id of cpu X;
    2) /sys/devices/system/cpu/cpuX/topology/core_id:
    represent the cpu core id to cpu X;
    3) /sys/devices/system/cpu/cpuX/topology/thread_siblings:
    represent the thread siblings to cpu X in the same core;
    4) /sys/devices/system/cpu/cpuX/topology/core_siblings:
    represent the thread siblings to cpu X in the same physical package;

    To implement it in an architecture-neutral way, a new source file,
    driver/base/topology.c, is to export the 5 attributes.

    If one architecture wants to support this feature, it just needs to
    implement 4 defines, typically in file include/asm-XXX/topology.h.
    The 4 defines are:
    #define topology_physical_package_id(cpu)
    #define topology_core_id(cpu)
    #define topology_thread_siblings(cpu)
    #define topology_core_siblings(cpu)

    The type of **_id is int.
    The type of siblings is cpumask_t.

    To be consistent on all architectures, the 4 attributes should have
    deafult values if their values are unavailable. Below is the rule.

    1) physical_package_id: If cpu has no physical package id, -1 is the
    default value.

    2) core_id: If cpu doesn't support multi-core, its core id is 0.

    3) thread_siblings: Just include itself, if the cpu doesn't support
    HT/multi-thread.

    4) core_siblings: Just include itself, if the cpu doesn't support
    multi-core and HT/Multi-thread.

    So be careful when declaring the 4 defines in include/asm-XXX/topology.h.

    If an attribute isn't defined on an architecture, it won't be exported.

    Thank Nathan, Greg, Andi, Paul and Venki.

    The patch provides defines for i386/x86_64/ia64.

    Signed-off-by: Zhang, Yanmin
    Cc: Ingo Molnar
    Cc: Nick Piggin
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zhang, Yanmin
     

13 Jan, 2006

1 commit

  • )

    From: Ingo Molnar

    This is the latest version of the scheduler cache-hot-auto-tune patch.

    The first problem was that detection time scaled with O(N^2), which is
    unacceptable on larger SMP and NUMA systems. To solve this:

    - I've added a 'domain distance' function, which is used to cache
    measurement results. Each distance is only measured once. This means
    that e.g. on NUMA distances of 0, 1 and 2 might be measured, on HT
    distances 0 and 1, and on SMP distance 0 is measured. The code walks
    the domain tree to determine the distance, so it automatically follows
    whatever hierarchy an architecture sets up. This cuts down on the boot
    time significantly and removes the O(N^2) limit. The only assumption
    is that migration costs can be expressed as a function of domain
    distance - this covers the overwhelming majority of existing systems,
    and is a good guess even for more assymetric systems.

    [ People hacking systems that have assymetries that break this
    assumption (e.g. different CPU speeds) should experiment a bit with
    the cpu_distance() function. Adding a ->migration_distance factor to
    the domain structure would be one possible solution - but lets first
    see the problem systems, if they exist at all. Lets not overdesign. ]

    Another problem was that only a single cache-size was used for measuring
    the cost of migration, and most architectures didnt set that variable
    up. Furthermore, a single cache-size does not fit NUMA hierarchies with
    L3 caches and does not fit HT setups, where different CPUs will often
    have different 'effective cache sizes'. To solve this problem:

    - Instead of relying on a single cache-size provided by the platform and
    sticking to it, the code now auto-detects the 'effective migration
    cost' between two measured CPUs, via iterating through a wide range of
    cachesizes. The code searches for the maximum migration cost, which
    occurs when the working set of the test-workload falls just below the
    'effective cache size'. I.e. real-life optimized search is done for
    the maximum migration cost, between two real CPUs.

    This, amongst other things, has the positive effect hat if e.g. two
    CPUs share a L2/L3 cache, a different (and accurate) migration cost
    will be found than between two CPUs on the same system that dont share
    any caches.

    (The reliable measurement of migration costs is tricky - see the source
    for details.)

    Furthermore i've added various boot-time options to override/tune
    migration behavior.

    Firstly, there's a blanket override for autodetection:

    migration_cost=1000,2000,3000

    will override the depth 0/1/2 values with 1msec/2msec/3msec values.

    Secondly, there's a global factor that can be used to increase (or
    decrease) the autodetected values:

    migration_factor=120

    will increase the autodetected values by 20%. This option is useful to
    tune things in a workload-dependent way - e.g. if a workload is
    cache-insensitive then CPU utilization can be maximized by specifying
    migration_factor=0.

    I've tested the autodetection code quite extensively on x86, on 3
    P3/Xeon/2MB, and the autodetected values look pretty good:

    Dual Celeron (128K L2 cache):

    ---------------------
    migration cost matrix (max_cache_size: 131072, cpu: 467 MHz):
    ---------------------
    [00] [01]
    [00]: - 1.7(1)
    [01]: 1.7(1) -
    ---------------------
    cacheflush times [2]: 0.0 (0) 1.7 (1784008)
    ---------------------

    Here the slow memory subsystem dominates system performance, and even
    though caches are small, the migration cost is 1.7 msecs.

    Dual HT P4 (512K L2 cache):

    ---------------------
    migration cost matrix (max_cache_size: 524288, cpu: 2379 MHz):
    ---------------------
    [00] [01] [02] [03]
    [00]: - 0.4(1) 0.0(0) 0.4(1)
    [01]: 0.4(1) - 0.4(1) 0.0(0)
    [02]: 0.0(0) 0.4(1) - 0.4(1)
    [03]: 0.4(1) 0.0(0) 0.4(1) -
    ---------------------
    cacheflush times [2]: 0.0 (33900) 0.4 (448514)
    ---------------------

    Here it can be seen that there is no migration cost between two HT
    siblings (CPU#0/2 and CPU#1/3 are separate physical CPUs). A fast memory
    system makes inter-physical-CPU migration pretty cheap: 0.4 msecs.

    8-way P3/Xeon [2MB L2 cache]:

    ---------------------
    migration cost matrix (max_cache_size: 2097152, cpu: 700 MHz):
    ---------------------
    [00] [01] [02] [03] [04] [05] [06] [07]
    [00]: - 19.2(1) 19.2(1) 19.2(1) 19.2(1) 19.2(1) 19.2(1) 19.2(1)
    [01]: 19.2(1) - 19.2(1) 19.2(1) 19.2(1) 19.2(1) 19.2(1) 19.2(1)
    [02]: 19.2(1) 19.2(1) - 19.2(1) 19.2(1) 19.2(1) 19.2(1) 19.2(1)
    [03]: 19.2(1) 19.2(1) 19.2(1) - 19.2(1) 19.2(1) 19.2(1) 19.2(1)
    [04]: 19.2(1) 19.2(1) 19.2(1) 19.2(1) - 19.2(1) 19.2(1) 19.2(1)
    [05]: 19.2(1) 19.2(1) 19.2(1) 19.2(1) 19.2(1) - 19.2(1) 19.2(1)
    [06]: 19.2(1) 19.2(1) 19.2(1) 19.2(1) 19.2(1) 19.2(1) - 19.2(1)
    [07]: 19.2(1) 19.2(1) 19.2(1) 19.2(1) 19.2(1) 19.2(1) 19.2(1) -
    ---------------------
    cacheflush times [2]: 0.0 (0) 19.2 (19281756)
    ---------------------

    This one has huge caches and a relatively slow memory subsystem - so the
    migration cost is 19 msecs.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Ashok Raj
    Signed-off-by: Ken Chen
    Cc:
    Signed-off-by: John Hawkes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    akpm@osdl.org
     

25 Dec, 2005

1 commit

  • Fixes a compiler error in node_to_first_cpu, __ffs expects unsigned long as
    a parameter; instead cpumask_t was being passed. The macro
    node_to_first_cpu was not yet used in x86_64 and ia64 arches, and so we never
    hit this. This patch replaces __ffs with first_cpu macro, similar to other
    arches.

    Signed-off-by: Alok N Kataria
    Signed-off-by: Ravikiran G Thirumalai
    Signed-off-by: Shai Fultheim
    Signed-off-by: Linus Torvalds

    Ravikiran G Thirumalai
     

15 Nov, 2005

1 commit


13 Sep, 2005

1 commit


26 Jun, 2005

4 commits

  • Do some basic initial tuning.

    Signed-off-by: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Reimplement the balance on exec balancing to be sched-domains aware. Use this
    to also do balance on fork balancing. Make x86_64 do balance on fork over the
    NUMA domain.

    The problem that the non sched domains aware blancing became apparent on dual
    core, multi socket opterons. What we want is for the new tasks to be sent to
    a different socket, but more often than not, we would first load up our
    sibling core, or fill two cores of a single remote socket before selecting a
    new one.

    This gives large improvements to STREAM on such systems.

    Signed-off-by: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Remove the very aggressive idle stuff that has recently gone into 2.6 - it is
    going against the direction we are trying to go. Hopefully we can regain
    performance through other methods.

    Signed-off-by: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Do CPU load averaging over a number of different intervals. Allow each
    interval to be chosen by sending a parameter to source_load and target_load.
    0 is instantaneous, idx > 0 returns a decaying average with the most recent
    sample weighted at 2^(idx-1). To a maximum of 3 (could be easily increased).

    So generally a higher number will result in more conservative balancing.

    Signed-off-by: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

24 Jun, 2005

2 commits

  • Define pcibus_to_node to be able to figure out which NUMA node contains a
    given PCI device. This defines pcibus_to_node(bus) in
    include/linux/topology.h and adjusts the macros for i386 and x86_64 that
    already provided a way to determine the cpumask of a pci device.

    x86_64 was changed to not build an array of cpumasks anymore. Instead an
    array of nodes is build which can be used to generate the cpumask via
    node_to_cpumask.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • In order to use the alternative sparsemem implmentation for NUMA kernels,
    we need to reorganize the config options. This patch effectively abstracts
    out the CONFIG_DISCONTIGMEM options to CONFIG_NUMA in most cases. Thus,
    the discontigmem implementation may be employed as always, but the
    sparsemem implementation may be used alternatively.

    Signed-off-by: Matt Tolentino
    Signed-off-by: Dave Hansen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt Tolentino
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds