12 Jan, 2012

2 commits

  • frv, h8300, m68k, microblaze, openrisc, score, um and xtensa currently
    do not register a CPU device. Add the config option GENERIC_CPU_DEVICES
    which causes a generic CPU device to be registered for each present CPU,
    and make all these architectures select it.

    Richard Weinberger covered UML and suggested using
    per_cpu.

    Signed-off-by: Ben Hutchings
    Signed-off-by: Linus Torvalds

    Ben Hutchings
     
  • cpu_dev_init() is only called from driver_init(), which does not check
    its return value. Therefore make cpu_dev_init() return void.

    We must register the CPU subsystem, so panic if this fails.

    If sched_create_sysfs_power_savings_entries() fails, the damage is
    contained, so ignore this (as before).

    Signed-off-by: Ben Hutchings
    Signed-off-by: Linus Torvalds

    Ben Hutchings
     

08 Jan, 2012

1 commit

  • * 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (73 commits)
    arm: fix up some samsung merge sysdev conversion problems
    firmware: Fix an oops on reading fw_priv->fw in sysfs loading file
    Drivers:hv: Fix a bug in vmbus_driver_unregister()
    driver core: remove __must_check from device_create_file
    debugfs: add missing #ifdef HAS_IOMEM
    arm: time.h: remove device.h #include
    driver-core: remove sysdev.h usage.
    clockevents: remove sysdev.h
    arm: convert sysdev_class to a regular subsystem
    arm: leds: convert sysdev_class to a regular subsystem
    kobject: remove kset_find_obj_hinted()
    m86k: gpio - convert sysdev_class to a regular subsystem
    mips: txx9_sram - convert sysdev_class to a regular subsystem
    mips: 7segled - convert sysdev_class to a regular subsystem
    sh: dma - convert sysdev_class to a regular subsystem
    sh: intc - convert sysdev_class to a regular subsystem
    power: suspend - convert sysdev_class to a regular subsystem
    power: qe_ic - convert sysdev_class to a regular subsystem
    power: cmm - convert sysdev_class to a regular subsystem
    s390: time - convert sysdev_class to a regular subsystem
    ...

    Fix up conflicts with 'struct sysdev' removal from various platform
    drivers that got changed:
    - arch/arm/mach-exynos/cpu.c
    - arch/arm/mach-exynos/irq-eint.c
    - arch/arm/mach-s3c64xx/common.c
    - arch/arm/mach-s3c64xx/cpu.c
    - arch/arm/mach-s5p64x0/cpu.c
    - arch/arm/mach-s5pv210/common.c
    - arch/arm/plat-samsung/include/plat/cpu.h
    - arch/powerpc/kernel/sysfs.c
    and fix up cpu_is_hotpluggable() as per Greg in include/linux/cpu.h

    Linus Torvalds
     

22 Dec, 2011

1 commit

  • This moves the 'cpu sysdev_class' over to a regular 'cpu' subsystem
    and converts the devices to regular devices. The sysdev drivers are
    implemented as subsystem interfaces now.

    After all sysdev classes are ported to regular driver core entities, the
    sysdev implementation will be entirely removed from the kernel.

    Userspace relies on events and generic sysfs subsystem infrastructure
    from sysdev devices, which are made available with this conversion.

    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Arnd Bergmann
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Borislav Petkov
    Cc: Tigran Aivazian
    Cc: Len Brown
    Cc: Zhang Rui
    Cc: Dave Jones
    Cc: Peter Zijlstra
    Cc: Russell King
    Cc: Andrew Morton
    Cc: Arjan van de Ven
    Cc: "Rafael J. Wysocki"
    Cc: "Srivatsa S. Bhat"
    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

12 Dec, 2011

1 commit

  • When architectures register CPUs, they indicate whether the CPU allows
    hotplugging; notably, x86 and ARM don't allow hotplugging CPU 0.
    Userspace can easily query the hotpluggability of a CPU via sysfs;
    however, the kernel has no convenient way of accessing that property in
    an architecture-independent way. While the kernel can simply try it and
    see, some code needs to distinguish between "hotplug failed" and
    "hotplug has no hope of working on this CPU"; for example, rcutorture's
    CPU hotplug tests want to avoid drowning out real hotplug failures with
    expected failures.

    Expose this property via a new cpu_is_hotpluggable function, so that the
    rest of the kernel can access it in an architecture-independent way.

    Signed-off-by: Josh Triplett
    Signed-off-by: Paul E. McKenney

    Josh Triplett
     

22 May, 2010

1 commit


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

19 Mar, 2010

1 commit


08 Mar, 2010

5 commits

  • These should be sysdev attributes, not class attributes. This patch
    should resolve the problem.

    Thanks to Stephen Rothwell for pointing out the problem.

    Reported-by: Stephen Rothwell
    Cc: Andi Kleen
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Passing the attribute to the low level IO functions allows all kinds
    of cleanups, by sharing low level IO code without requiring
    an own function for every piece of data.

    Also drivers can extend the attributes with own data fields
    and use that in the low level function.

    This makes the class attributes the same as sysdev_class attributes
    and plain attributes.

    This will allow further cleanups in drivers.

    Full tree sweep converting all users.

    Signed-off-by: Andi Kleen
    Signed-off-by: Greg Kroah-Hartman

    Andi Kleen
     
  • Use sysdev_class attribute arrays in node driver

    Convert the node driver to sysdev_class attribute arrays. This
    greatly cleans up the code and remove a lot of code.

    Signed-off-by: Andi Kleen
    Signed-off-by: Greg Kroah-Hartman

    Andi Kleen
     
  • Using the new attribute argument convert the cpu driver class attributes
    to carry the node state. Then use a shared function to do what a lot of
    individual functions did before.

    This eliminates an ugly macro.

    Signed-off-by: Andi Kleen
    Signed-off-by: Greg Kroah-Hartman

    Andi Kleen
     
  • Passing the attribute to the low level IO functions allows all kinds
    of cleanups, by sharing low level IO code without requiring
    an own function for every piece of data.

    Also drivers can extend the attributes with own data fields
    and use that in the low level function.

    Similar to sysdev_attributes and normal attributes.

    This is a tree-wide sweep, converting everything in one go.

    No functional changes in this patch other than passing the new
    argument everywhere.

    Tested on x86, the non x86 parts are uncompiled.

    Signed-off-by: Andi Kleen
    Signed-off-by: Greg Kroah-Hartman

    Andi Kleen
     

15 Dec, 2009

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (34 commits)
    m68k: rename global variable vmalloc_end to m68k_vmalloc_end
    percpu: add missing per_cpu_ptr_to_phys() definition for UP
    percpu: Fix kdump failure if booted with percpu_alloc=page
    percpu: make misc percpu symbols unique
    percpu: make percpu symbols in ia64 unique
    percpu: make percpu symbols in powerpc unique
    percpu: make percpu symbols in x86 unique
    percpu: make percpu symbols in xen unique
    percpu: make percpu symbols in cpufreq unique
    percpu: make percpu symbols in oprofile unique
    percpu: make percpu symbols in tracer unique
    percpu: make percpu symbols under kernel/ and mm/ unique
    percpu: remove some sparse warnings
    percpu: make alloc_percpu() handle array types
    vmalloc: fix use of non-existent percpu variable in put_cpu_var()
    this_cpu: Use this_cpu_xx in trace_functions_graph.c
    this_cpu: Use this_cpu_xx for ftrace
    this_cpu: Use this_cpu_xx in nmi handling
    this_cpu: Use this_cpu operations in RCU
    this_cpu: Use this_cpu ops for VM statistics
    ...

    Fix up trivial (famous last words) global per-cpu naming conflicts in
    arch/x86/kvm/svm.c
    mm/slab.c

    Linus Torvalds
     

09 Dec, 2009

2 commits

  • Currently the cpu-allocation/deallocation process comprises of two steps:
    - Set the indicators and to update the device tree with DLPAR node
    information.

    - Online/offline the allocated/deallocated CPU.

    This is achieved by writing to the sysfs tunables "probe" during allocation
    and "release" during deallocation.

    At the sametime, the userspace can independently online/offline the CPUs of
    the system using the sysfs tunable "online".

    It is quite possible that when a userspace tool offlines a CPU
    for the purpose of deallocation and is in the process of updating the device
    tree, some other userspace tool could bring the CPU back online by writing to
    the "online" sysfs tunable thereby causing the deallocate process to fail.

    The solution to this is to serialize writes to the "probe/release" sysfs
    tunable with the writes to the "online" sysfs tunable.

    This patch employs a mutex to provide this serialization, which is a no-op on
    all architectures except PPC_PSERIES

    Signed-off-by: Gautham R Shenoy
    Acked-by: Vaidyanathan Srinivasan
    Signed-off-by: Benjamin Herrenschmidt

    Gautham R Shenoy
     
  • Version 3 of this patch is updated with documentation added to
    Documentation/ABI. There are no changes to any of the C code from v2
    of the patch.

    In order to support kernel DLPAR of CPU resources we need to provide an
    interface to add (probe) and remove (release) the resource from the system.
    This patch Creates new generic probe and release sysfs files to facilitate
    cpu probe/release. The probe/release interface provides for allowing each
    arch to supply their own routines for implementing the backend of adding
    and removing cpus to/from the system.

    This also creates the powerpc specific stubs to handle the arch callouts
    from writes to the sysfs files.

    The creation and use of these files is regulated by the
    CONFIG_ARCH_CPU_PROBE_RELEASE option so that only architectures that need the
    capability will have the files created.

    Signed-off-by: Nathan Fontenot
    Signed-off-by: Benjamin Herrenschmidt

    Nathan Fontenot
     

25 Nov, 2009

1 commit

  • o kdump functionality reserves a per cpu area at boot time and exports the
    physical address of that area to user space through sys interface. This
    area stores some dump related information like cpu register states etc
    at the time of crash.

    o We were assuming that per cpu area always come from linearly mapped meory
    region and using __pa() to determine physical address.
    With percpu_alloc=page, per cpu area can come from vmalloc region also and
    __pa() breaks.

    o This patch implments a new function to convert per cpu address to
    physical address.

    Before the patch, crash_notes addresses looked as follows.

    cpu0 60fffff49800
    cpu1 60fffff60800
    cpu2 60fffff77800

    These are bogus phsyical addresses.

    After the patch, address are following.

    cpu0 13eb44000
    cpu1 13eb43000
    cpu2 13eb42000
    cpu3 13eb41000

    These look fine. I got 4G of memory and /proc/iomem tell me following.

    100000000-13fffffff : System RAM

    tj: * added missing asm/io.h include reported by Stephen Rothwell
    * repositioned per_cpu_ptr_phys() in percpu.c and added comment.

    Signed-off-by: Vivek Goyal
    Signed-off-by: Tejun Heo
    Cc: Stephen Rothwell

    Vivek Goyal
     

30 Mar, 2009

1 commit


12 Jan, 2009

1 commit

  • Impact: use new cpumask API.

    Convert misc driver functions to use struct cpumask.

    To Do:
    - Convert iucv_buffer_cpumask to cpumask_var_t.

    Signed-off-by: Rusty Russell
    Signed-off-by: Mike Travis
    Acked-by: Dean Nelson
    Cc: Robert Richter
    Cc: oprofile-list@lists.sf.net
    Cc: Jeremy Fitzhardinge
    Cc: Chris Wright
    Cc: virtualization@lists.osdl.org
    Cc: xen-devel@lists.xensource.com
    Cc: Ursula Braun
    Cc: linux390@de.ibm.com
    Cc: linux-s390@vger.kernel.org

    Rusty Russell
     

04 Jan, 2009

1 commit


19 Dec, 2008

1 commit

  • Impact: add new sysfs files.

    Add sysfs files "kernel_max" and "offline" to display the max CPU index
    allowed (NR_CPUS-1), and the map of cpus that are offline.

    Cpus can be offlined via HOTPLUG, disabled by the BIOS ACPI tables, or
    if they exceed the number of cpus allowed by the NR_CPUS config option,
    or the "maxcpus=NUM" kernel start parameter.

    The "possible_cpus=NUM" parameter can also extend the number of possible
    cpus allowed, in which case the cpus not present at startup will be
    in the offline state. (These cpus can be HOTPLUGGED ON after system
    startup [pending a follow-on patch to provide the capability via the
    /sys/devices/sys/cpu/cpuN/online mechanism to bring them online.])

    By design, the "offlined cpus > possible cpus" display will always
    use the following formats:

    * all possible cpus online: "x$" or "x-y$"
    * some possible cpus offline: ".*,x$" or ".*,x-y$"

    where:
    x == number of possible cpus (nr_cpu_ids); and
    y == number of cpus >= NR_CPUS or maxcpus (if y > x).

    One use of this feature is for distros to select (or configure) the
    appropriate kernel to install for the resident system.

    Notes:
    * cpus offlined possible cpus will only be printed for arches that
    set 'total_cpus' [X86 only in this patch].

    Based on tip/cpus4096 + .../rusty/linux-2.6-for-ingo.git/master +
    x86-only-patches sent 12/15.

    Signed-off-by: Mike Travis
    Signed-off-by: Rusty Russell

    Mike Travis
     

13 Dec, 2008

1 commit

  • …t_scnprintf to take pointers.

    Impact: change calling convention of existing cpumask APIs

    Most cpumask functions started with cpus_: these have been replaced by
    cpumask_ ones which take struct cpumask pointers as expected.

    These four functions don't have good replacement names; fortunately
    they're rarely used, so we just change them over.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    Signed-off-by: Mike Travis <travis@sgi.com>
    Acked-by: Ingo Molnar <mingo@elte.hu>
    Cc: paulus@samba.org
    Cc: mingo@redhat.com
    Cc: tony.luck@intel.com
    Cc: ralf@linux-mips.org
    Cc: Greg Kroah-Hartman <gregkh@suse.de>
    Cc: cl@linux-foundation.org
    Cc: srostedt@redhat.com

    Rusty Russell
     

24 Jul, 2008

1 commit

  • * 'cpus4096-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (31 commits)
    NR_CPUS: Replace NR_CPUS in speedstep-centrino.c
    cpumask: Provide a generic set of CPUMASK_ALLOC macros, FIXUP
    NR_CPUS: Replace NR_CPUS in cpufreq userspace routines
    NR_CPUS: Replace per_cpu(..., smp_processor_id()) with __get_cpu_var
    NR_CPUS: Replace NR_CPUS in arch/x86/kernel/genapic_flat_64.c
    NR_CPUS: Replace NR_CPUS in arch/x86/kernel/genx2apic_uv_x.c
    NR_CPUS: Replace NR_CPUS in arch/x86/kernel/cpu/proc.c
    NR_CPUS: Replace NR_CPUS in arch/x86/kernel/cpu/mcheck/mce_64.c
    cpumask: Optimize cpumask_of_cpu in lib/smp_processor_id.c, fix
    cpumask: Use optimized CPUMASK_ALLOC macros in the centrino_target
    cpumask: Provide a generic set of CPUMASK_ALLOC macros
    cpumask: Optimize cpumask_of_cpu in lib/smp_processor_id.c
    cpumask: Optimize cpumask_of_cpu in kernel/time/tick-common.c
    cpumask: Optimize cpumask_of_cpu in drivers/misc/sgi-xp/xpc_main.c
    cpumask: Optimize cpumask_of_cpu in arch/x86/kernel/ldt.c
    cpumask: Optimize cpumask_of_cpu in arch/x86/kernel/io_apic_64.c
    cpumask: Replace cpumask_of_cpu with cpumask_of_cpu_ptr
    Revert "cpumask: introduce new APIs"
    cpumask: make for_each_cpu_mask a bit smaller
    net: Pass reference to cpumask variable in net/sunrpc/svc.c
    ...

    Fix up trivial conflicts in drivers/cpufreq/cpufreq.c manually

    Linus Torvalds
     

22 Jul, 2008

1 commit

  • This allow to dynamically generate attributes and share show/store
    functions between attributes. Right now most attributes are generated
    by special macros and lots of duplicated code. With the attribute
    passed it's instead possible to attach some data to the attribute
    and then use that in shared low level functions to do different things.

    I need this for the dynamically generated bank attributes in the x86
    machine check code, but it'll allow some further cleanups.

    I converted all users in tree to the new show/store prototype. It's a single
    huge patch to avoid unbisectable sections.

    Runtime tested: x86-32, x86-64
    Compiled only: ia64, powerpc
    Not compile tested/only grep converted: sh, arm, avr32

    Signed-off-by: Andi Kleen
    Signed-off-by: Greg Kroah-Hartman

    Andi Kleen
     

24 May, 2008

1 commit


01 May, 2008

1 commit


22 Apr, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6: (36 commits)
    SCSI: convert struct class_device to struct device
    DRM: remove unused dev_class
    IB: rename "dev" to "srp_dev" in srp_host structure
    IB: convert struct class_device to struct device
    memstick: convert struct class_device to struct device
    driver core: replace remaining __FUNCTION__ occurrences
    sysfs: refill attribute buffer when reading from offset 0
    PM: Remove destroy_suspended_device()
    Firmware: add iSCSI iBFT Support
    PM: Remove legacy PM (fix)
    Kobject: Replace list_for_each() with list_for_each_entry().
    SYSFS: Explicitly include required header file slab.h.
    Driver core: make device_is_registered() work for class devices
    PM: Convert wakeup flag accessors to inline functions
    PM: Make wakeup flags available whenever CONFIG_PM is set
    PM: Fix misuse of wakeup flag accessors in serial core
    Driver core: Call device_pm_add() after bus_add_device() in device_add()
    PM: Handle device registrations during suspend/resume
    block: send disk "change" event for rescan_partitions()
    sysdev: detect multiple driver registrations
    ...

    Fixed trivial conflict in include/linux/memory.h due to semaphore header
    file change (made irrelevant by the change to mutex).

    Linus Torvalds
     

20 Apr, 2008

2 commits

  • Fix following warning:
    WARNING: vmlinux.o(.text+0x64609c): Section mismatch in reference from the function store_online() to the function .cpuinit.text:cpu_up()

    store_online() is defined inside a HOTPLUG_CPU block so references are OK.
    Ignore references by annotating store_online() with __ref.

    Note: This is needed because cpu_up() most likely should not have been
    __cpuinit but all the hotplug cpu code misuses the __cpuinit annotation.

    Signed-off-by: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Sam Ravnborg
     
  • * Add cpu_sysdev_class functions to display the following maps
    with cpulist_scnprintf().

    cpu_online_map
    cpu_present_map
    cpu_possible_map

    * Small change to include/linux/sysdev.h to allow the attribute
    name and label to be different (to avoid collision with the
    "attr_online" entry for bringing cpus on- and off-line.)

    Cc: H. Peter Anvin
    Signed-off-by: Mike Travis
    Signed-off-by: Ingo Molnar

    Mike Travis
     

07 Feb, 2008

1 commit


25 Jan, 2008

1 commit


01 Aug, 2007

1 commit

  • Is there a reason why the "online" file in the subdirectories for the CPUs
    in /sys/devices/system isn't world-readable? I cannot imagine it to be
    security relevant especially now that a getcpu() syscall can be used to
    determine what CPUa thread runs on.

    The file is useful to correctly implement the sysconf() function to return
    the number of online CPUs. In the presence of hotplug we currently cannot
    provide this information. The patch below should to it.

    Signed-off-by: Ulrich Drepper
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ulrich Drepper
     

18 Feb, 2007

1 commit


07 Dec, 2006

1 commit


04 Dec, 2006

1 commit


28 Jun, 2006

2 commits

  • 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
     
  • With Goto-san's patch, we can add new pgdat/node at runtime. I'm now
    considering node-hot-add with cpu + memory on ACPI.

    I found acpi container, which describes node, could evaluate cpu before
    memory. This means cpu-hot-add occurs before memory hot add.

    In most part, cpu-hot-add doesn't depend on node hot add. But register_cpu(),
    which creates symbolic link from node to cpu, requires that node should be
    onlined before register_cpu(). When a node is onlined, its pgdat should be
    there.

    This patch-set holds off creating symbolic link from node to cpu
    until node is onlined.

    This removes node arguments from register_cpu().

    Now, register_cpu() requires 'struct node' as its argument. But the array of
    struct node is now unified in driver/base/node.c now (By Goto's node hotplug
    patch). We can get struct node in generic way. So, this argument is not
    necessary now.

    This patch also guarantees add cpu under node only when node is onlined. It
    is necessary for node-hot-add vs. cpu-hot-add patch following this.

    Moreover, register_cpu calculates cpu->node_id by cpu_to_node() without regard
    to its 'struct node *root' argument. This patch removes it.

    Also modify callers of register_cpu()/unregister_cpu, whose args are changed
    by register-cpu-remove-node-struct patch.

    [Brice.Goglin@ens-lyon.org: fix it]
    Signed-off-by: KAMEZAWA Hiroyuki
    Cc: Yasunori Goto
    Cc: Ashok Raj
    Cc: Dave Hansen
    Signed-off-by: Brice Goglin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     

26 Mar, 2006

1 commit

  • - Moved check for online cpu out of smp_prepare_cpu()

    - Moved default declaration of smp_prepare_cpu() to kernel/cpu.c

    - Removed lock_cpu_hotplug() from smp_prepare_cpu() to around it, since
    its called from cpu_up() as well now.

    - Removed clearing from cpu_present_map during cpu_offline as it breaks
    using cpu_up() directly during a subsequent online operation.

    Signed-off-by: Ashok Raj
    Cc: Srivatsa Vaddagiri
    Cc: "Li, Shaohua"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ashok Raj
     

21 Mar, 2006

1 commit


11 Jan, 2006

1 commit