lkml.org 
[lkml]   [2008]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 04/10] sched: Add arch_update_cpu_topology hook.
    From: Heiko Carstens <heiko.carstens@de.ibm.com>

    Will be called each time the scheduling domains are rebuild.
    Needed for architectures that don't have a static cpu topology.

    Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
    Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
    ---

    include/linux/topology.h | 2 ++
    kernel/sched.c | 5 +++++
    2 files changed, 7 insertions(+)

    Index: quilt-2.6/include/linux/topology.h
    ===================================================================
    --- quilt-2.6.orig/include/linux/topology.h
    +++ quilt-2.6/include/linux/topology.h
    @@ -50,6 +50,8 @@
    for_each_online_node(node) \
    if (nr_cpus_node(node))

    +void arch_update_cpu_topology(void);
    +
    /* Conform to ACPI 2.0 SLIT distance definitions */
    #define LOCAL_DISTANCE 10
    #define REMOTE_DISTANCE 20
    Index: quilt-2.6/kernel/sched.c
    ===================================================================
    --- quilt-2.6.orig/kernel/sched.c
    +++ quilt-2.6/kernel/sched.c
    @@ -6804,6 +6804,10 @@ static int ndoms_cur; /* number of sche
    */
    static cpumask_t fallback_doms;

    +void __attribute__((weak)) arch_update_cpu_topology(void)
    +{
    +}
    +
    /*
    * Set up scheduler domains and groups. Callers must hold the hotplug lock.
    * For now this just excludes isolated cpus, but could be used to
    @@ -6813,6 +6817,7 @@ static int arch_init_sched_domains(const
    {
    int err;

    + arch_update_cpu_topology();
    ndoms_cur = 1;
    doms_cur = kmalloc(sizeof(cpumask_t), GFP_KERNEL);
    if (!doms_cur)
    --
    blue skies,
    Martin.

    "Reality continues to ruin my life." - Calvin.



    \
     
     \ /
      Last update: 2008-03-12 18:37    [W:0.022 / U:0.108 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site