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

2 commits

  • Removes the call to get_cpu() and put_cpu() as it is not required.

    Signed-off-by: Vivek Goyal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     
  • - Kexec on panic functionality allocates memory for saving cpu registers in
    case of system crash event. Address of this allocated memory needs to be
    exported to user space, which is used by kexec-tools.

    - Previously, a single /sys/kernel/crash_notes entry was being exported as
    memory allocated was a single continuous array. Now memory allocation being
    dyanmic and per cpu based, address of per cpu buffer is exported through
    "/sys/devices/system/cpu/cpuX/crash_notes"

    Signed-off-by: Vivek Goyal
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     

05 Jan, 2006

1 commit


31 Oct, 2005

1 commit

  • Some modules creating sysfs entries under /sys/devices/system/cpu/cpuX/
    need to know the parent sysfs entry to make devices under them. This will
    just return the sysfs entry for a given cpu.

    sysfs entries showing under each cpu sysfs can be easily created if such
    entries can be created by registering a sysfs driver for cpuclass. The
    issue is when the entry is created the CPU may not be online, hence we
    would need to defer the creation until the online notification comes.

    Current users: cache entries for Intel CPU's and cpufreq subsystem.

    Signed-off-by: Ashok Raj
    Signed-off-by: Venkatesh Pallipadi
    Cc: Dave Jones
    Cc: Zwane Mwaikambo
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ashok Raj
     

29 Oct, 2005

1 commit

  • There are a number of sparse warnings from the latest sparse
    snapshot being generated from the drivers/base build. The
    main culprits are due to the initialisation functions not
    being declared in a header file.

    Also, the firmware.c file should include
    to get the prototype of firmware_register() and
    firmware_unregister().

    This patch moves the init function declerations from the
    init.c file to the base.h, and ensures it is included in
    all the relevant c sources. It also adds
    to the included headers for firmware.c.

    The patch does not solve all the sparse errors generated,
    but reduces the count significantly.

    drivers/base/core.c:161:1: warning: symbol 'devices_subsys' was not declared. Should it be static?
    drivers/base/core.c:417:12: warning: symbol 'devices_init' was not declared. Should it be static?
    drivers/base/sys.c:253:6: warning: symbol 'sysdev_shutdown' was not declared. Should it be static?
    drivers/base/sys.c:326:5: warning: symbol 'sysdev_suspend' was not declared. Should it be static?
    drivers/base/sys.c:428:5: warning: symbol 'sysdev_resume' was not declared. Should it be static?
    drivers/base/sys.c:450:12: warning: symbol 'system_bus_init' was not declared. Should it be static?
    drivers/base/bus.c:133:1: warning: symbol 'bus_subsys' was not declared. Should it be static?
    drivers/base/bus.c:667:12: warning: symbol 'buses_init' was not declared. Should it be static?
    drivers/base/class.c:759:12: warning: symbol 'classes_init' was not declared. Should it be static?
    drivers/base/platform.c:313:12: warning: symbol 'platform_bus_init' was not declared. Should it be static?
    drivers/base/cpu.c:110:12: warning: symbol 'cpu_dev_init' was not declared. Should it be static?
    drivers/base/firmware.c:17:5: warning: symbol 'firmware_register' was not declared. Should it be static?
    drivers/base/firmware.c:23:6: warning: symbol 'firmware_unregister' was not declared. Should it be static?
    drivers/base/firmware.c:28:12: warning: symbol 'firmware_init' was not declared. Should it be static?
    drivers/base/init.c:28:13: warning: symbol 'driver_init' was not declared. Should it be static?
    drivers/base/dmapool.c:174:10: warning: implicit cast from nocast type
    drivers/base/attribute_container.c:439:1: warning: symbol 'attribute_container_init' was not declared. Should it be static?
    drivers/base/power/runtime.c:76:6: warning: symbol 'dpm_set_power_state' was not declared. Should it be static?

    Signed-off-by: Ben Dooks
    Signed-off-by: Greg Kroah-Hartman

    Ben Dooks
     

26 Jun, 2005

3 commits

  • We already do kobject_hotplug for cpu offline; this adds a kobject_hotplug
    call for the online case. This is being requested by developers of an
    application which wants to be notified about both kinds of events.

    Signed-off-by: Nathan Lynch
    Cc: Rusty Russell
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nathan Lynch
     
  • I really wish smp_prepare_cpu() would disappear eventually. In the interim
    this is ideally a weak function, so we dont end up changing several places
    to define this dummy in headers.

    Today since the dummy declaration is done only in drivers/base/cpu.c but
    the function is called in kernel/power/smp.c i get undefined reference in
    my cpu hotplug code for x86_64 under development.

    Signed-off-by: Ashok Raj
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ashok Raj
     
  • Clean CPU states in order to reuse smp boot code for CPU hotplug.

    Signed-off-by: Li Shaohua
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Li Shaohua
     

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