#
c055da9f |
| 14-May-2013 |
Igor Mammedov <imammedo@redhat.com> |
cpu: fix "crash_notes" and "crash_notes_size" leaks in register_cpu()
"crash_notes" and "crash_notes_size" are dynamically created with device_create_file() but aren't deleted anywhere. Define "cras
cpu: fix "crash_notes" and "crash_notes_size" leaks in register_cpu()
"crash_notes" and "crash_notes_size" are dynamically created with device_create_file() but aren't deleted anywhere. Define "crash_notes" and "crash_notes_size" statically via attribute groups so that device_register would create them automatically and files would be destroyed when CPU is destroyed.
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
Revision tags: v3.10-rc1 |
|
#
ac212b69 |
| 02-May-2013 |
Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
ACPI / processor: Use common hotplug infrastructure
Split the ACPI processor driver into two parts, one that is non-modular, resides in the ACPI core and handles the enumeration and hotplug of proce
ACPI / processor: Use common hotplug infrastructure
Split the ACPI processor driver into two parts, one that is non-modular, resides in the ACPI core and handles the enumeration and hotplug of processors and one that implements the rest of the existing processor driver functionality.
The non-modular part uses an ACPI scan handler object to enumerate processors on the basis of information provided by the ACPI namespace and to hook up with the common ACPI hotplug infrastructure. It also populates the ACPI handle of each processor device having a corresponding object in the ACPI namespace, which allows the driver proper to bind to those devices, and makes the driver bind to them if it is readily available (i.e. loaded) when the scan handler's .attach() routine is running.
There are a few reasons to make this change.
First, switching the ACPI processor driver to using the common ACPI hotplug infrastructure reduces code duplication and size considerably, even though a new file is created along with a header comment etc.
Second, since the common hotplug code attempts to offline devices before starting the (non-reversible) removal procedure, it will abort (and possibly roll back) hot-remove operations involving processors if cpu_down() returns an error code for one of them instead of continuing them blindly (if /sys/firmware/acpi/hotplug/force_remove is unset). That is a more desirable behavior than what the current code does.
Finally, the separation of the scan/hotplug part from the driver proper makes it possible to simplify the driver's .remove() routine, because it doesn't need to worry about the possible cleanup related to processor removal any more (the scan/hotplug part is responsible for that now) and can handle device removal and driver removal symmetricaly (i.e. as appropriate).
Some user-visible changes in sysfs are made (for example, the 'sysdev' link from the ACPI device node to the processor device's directory is gone and a 'physical_node' link is present instead and a corresponding 'firmware_node' is present in the processor device's directory, the processor driver is now visible under /sys/bus/cpu/drivers/ and bound to the processor device), but that shouldn't affect the functionality that users care about (frequency scaling, C-states and thermal management).
Tested on my venerable Toshiba Portege R500.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Toshi Kani <toshi.kani@hp.com>
show more ...
|
#
0902a904 |
| 02-May-2013 |
Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
Driver core: Use generic offline/online for CPU offline/online
Rework the CPU hotplug code in drivers/base/cpu.c to use the generic offline/online support introduced previously instead of its own CP
Driver core: Use generic offline/online for CPU offline/online
Rework the CPU hotplug code in drivers/base/cpu.c to use the generic offline/online support introduced previously instead of its own CPU-specific code.
For this purpose, modify cpu_subsys to provide offline and online callbacks for CONFIG_HOTPLUG_CPU set and remove the code handling the CPU-specific 'online' sysfs attribute.
This modification is not supposed to change the user-observable behavior of the kernel (i.e. the 'online' attribute will be present in exactly the same place in sysfs and should trigger exactly the same actions as before).
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Toshi Kani <toshi.kani@hp.com>
show more ...
|
#
34640468 |
| 29-Apr-2013 |
Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> |
numa, cpu hotplug: change links of CPU and node when changing node number by onlining CPU
When booting x86 system contains memoryless node, node numbers of CPUs on memoryless node were changed to ne
numa, cpu hotplug: change links of CPU and node when changing node number by onlining CPU
When booting x86 system contains memoryless node, node numbers of CPUs on memoryless node were changed to nearest online node number by init_cpu_to_node() because the node is not online.
In my system, node numbers of cpu#30-44 and 75-89 were changed from 2 to 0 as follows:
$ numactl --hardware available: 2 nodes (0-1) node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 node 0 size: 32394 MB node 0 free: 27898 MB node 1 cpus: 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 node 1 size: 32768 MB node 1 free: 30335 MB
If we hot add memory to memoryless node and offine/online all CPUs on the node, node numbers of these CPUs are changed to correct node numbers by srat_detect_node() because the node become online.
In this case, node numbers of cpu#30-44 and 75-89 were changed from 0 to 2 in my system as follows:
$ numactl --hardware available: 3 nodes (0-2) node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 node 0 size: 32394 MB node 0 free: 27218 MB node 1 cpus: 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 node 1 size: 32768 MB node 1 free: 30014 MB node 2 cpus: 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 node 2 size: 16384 MB node 2 free: 16384 MB
But "cpu to node" and "node to cpu" links were not changed as follows:
$ ls /sys/devices/system/cpu/cpu30/|grep node node0 $ ls /sys/devices/system/node/node0/|grep cpu30 cpu30
"numactl --hardware" shows that cpu30 belongs to node 2. But sysfs links does not change.
This patch changes "cpu to node" and "node to cpu" links when node number changed by onlining CPU.
Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
Revision tags: v3.9, v3.9-rc8, v3.9-rc7, v3.9-rc6 |
|
#
bcfb87fb |
| 03-Apr-2013 |
Arnd Bergmann <arnd@arndb.de> |
sysfs: fix crash_notes_size build warning
commit eca4549f57 "sysfs: Add crash_notes_size to export percpu note size" adds a printk that outputs a size_t value as %lu when it should be %zu, resulting
sysfs: fix crash_notes_size build warning
commit eca4549f57 "sysfs: Add crash_notes_size to export percpu note size" adds a printk that outputs a size_t value as %lu when it should be %zu, resulting in this warning.
drivers/base/cpu.c: In function 'show_crash_notes_size': drivers/base/cpu.c:142:2: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat=]
Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Zhang Yanfei <zhangyanfei@cn.fujitsu.com> Cc: Simon Horman <horms@verge.net.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
Revision tags: v3.9-rc5 |
|
#
eca4549f |
| 28-Mar-2013 |
Zhang Yanfei <zhangyanfei@cn.fujitsu.com> |
sysfs: Add crash_notes_size to export percpu note size
For percpu notes, we are exporting only address and not size. So the userspace tool kexec-tools is putting an upper limit of 1024 and putting t
sysfs: Add crash_notes_size to export percpu note size
For percpu notes, we are exporting only address and not size. So the userspace tool kexec-tools is putting an upper limit of 1024 and putting the value in p_memsz and p_filesz fields. So the patch add the new sysfile crash_notes_size to export the exact percpu note size and let the kexec-tools parse it intead of using 1024.
The idea came from Vivek Goyal. And a later patch will be sent to kexec-tools to let it parse the size.
Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com> Acked-by: Simon Horman <horms@verge.net.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
Revision tags: v3.9-rc4, v3.9-rc3, v3.9-rc2, v3.9-rc1, v3.8, v3.8-rc7, v3.8-rc6, v3.8-rc5, v3.8-rc4 |
|
#
30a4840a |
| 15-Jan-2013 |
Ralf Baechle <ralf@linux-mips.org> |
drivers/base/cpu.c: Fix typo in comment
[ We should make fun of people who can't speel too, but then we'd have no time for any real work at all - Linus ]
Signed-off-by: Linus Torvalds <torvalds@
drivers/base/cpu.c: Fix typo in comment
[ We should make fun of people who can't speel too, but then we'd have no time for any real work at all - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
Revision tags: v3.8-rc3, v3.8-rc2, v3.8-rc1, v3.7, v3.7-rc8, v3.7-rc7, v3.7-rc6, v3.7-rc5, v3.7-rc4, v3.7-rc3, v3.7-rc2, v3.7-rc1, v3.6, v3.6-rc7, v3.6-rc6, v3.6-rc5, v3.6-rc4, v3.6-rc3, v3.6-rc2, v3.6-rc1, v3.5, v3.5-rc7, v3.5-rc6, v3.5-rc5, v3.5-rc4, v3.5-rc3, v3.5-rc2, v3.5-rc1, v3.4, v3.4-rc7, v3.4-rc6, v3.4-rc5, v3.4-rc4, v3.4-rc3, v3.4-rc2, v3.4-rc1, v3.3, v3.3-rc7, v3.3-rc6, v3.3-rc5, v3.3-rc4, v3.3-rc3, v3.3-rc2, v3.3-rc1 |
|
#
8e7fbcbc |
| 09-Jan-2012 |
Peter Zijlstra <peterz@infradead.org> |
sched: Remove stale power aware scheduling remnants and dysfunctional knobs
It's been broken forever (i.e. it's not scheduling in a power aware fashion), as reported by Suresh and others sending pat
sched: Remove stale power aware scheduling remnants and dysfunctional knobs
It's been broken forever (i.e. it's not scheduling in a power aware fashion), as reported by Suresh and others sending patches, and nobody cares enough to fix it properly ... so remove it to make space free for something better.
There's various problems with the code as it stands today, first and foremost the user interface which is bound to topology levels and has multiple values per level. This results in a state explosion which the administrator or distro needs to master and almost nobody does.
Furthermore large configuration state spaces aren't good, it means the thing doesn't just work right because it's either under so many impossibe to meet constraints, or even if there's an achievable state workloads have to be aware of it precisely and can never meet it for dynamic workloads.
So pushing this kind of decision to user-space was a bad idea even with a single knob - it's exponentially worse with knobs on every node of the topology.
There is a proposal to replace the user interface with a single 3 state knob:
sched_balance_policy := { performance, power, auto }
where 'auto' would be the preferred default which looks at things like Battery/AC mode and possible cpufreq state or whatever the hw exposes to show us power use expectations - but there's been no progress on it in the past many months.
Aside from that, the actual implementation of the various knobs is known to be broken. There have been sporadic attempts at fixing things but these always stop short of reaching a mergable state.
Therefore this wholesale removal with the hopes of spurring people who care to come forward once again and work on a coherent replacement.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Suresh Siddha <suresh.b.siddha@intel.com> Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: Vincent Guittot <vincent.guittot@linaro.org> Cc: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Andrew Morton <akpm@linux-foundation.org> Link: http://lkml.kernel.org/r/1326104915.2442.53.camel@twins Signed-off-by: Ingo Molnar <mingo@kernel.org>
show more ...
|
#
29bb5d4f |
| 08-Feb-2012 |
Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
driver-core: cpu: fix kobject warning when hotplugging a cpu
Due to the sysdev conversion to struct device, the cpu objects get reused when adding a cpu after offlining it, which causes a big warnin
driver-core: cpu: fix kobject warning when hotplugging a cpu
Due to the sysdev conversion to struct device, the cpu objects get reused when adding a cpu after offlining it, which causes a big warning that the kobject portion is not properly initialized.
So clear out the object before we register it again, so all is quiet.
Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
2885e25c |
| 02-Feb-2012 |
Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
driver core: cpu: remove kernel warning when removing a cpu
With the movement of the cpu sysdev code to be real stuct devices, now when we remove a cpu from the system, the driver core rightfully co
driver core: cpu: remove kernel warning when removing a cpu
With the movement of the cpu sysdev code to be real stuct devices, now when we remove a cpu from the system, the driver core rightfully complains that there is not a release method for this device.
For now, paper over this issue by quieting the driver core, but comment this in detail. This will be resolved in future kernels to be solved properly.
Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
fad12ac8 |
| 25-Jan-2012 |
Thomas Renninger <trenn@suse.de> |
CPU: Introduce ARCH_HAS_CPU_AUTOPROBE and X86 parts
This patch is based on Andi Kleen's work: Implement autoprobing/loading of modules serving CPU specific features (x86cpu autoloading).
And Kay Si
CPU: Introduce ARCH_HAS_CPU_AUTOPROBE and X86 parts
This patch is based on Andi Kleen's work: Implement autoprobing/loading of modules serving CPU specific features (x86cpu autoloading).
And Kay Siever's work to get rid of sysdev cpu structures and making use of struct device instead.
Before, the cpuid driver had to be loaded to get the x86cpu autoloading feature. With this patch autoloading works through the /sys/devices/system/cpu object
Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Dave Jones <davej@redhat.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Huang Ying <ying.huang@intel.com> Cc: Len Brown <lenb@kernel.org> Acked-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Thomas Renninger <trenn@suse.de> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
show more ...
|
#
9f13a1fd |
| 09-Jan-2012 |
Ben Hutchings <ben@decadent.org.uk> |
cpu: Register a generic CPU device on architectures that currently do not
frv, h8300, m68k, microblaze, openrisc, score, um and xtensa currently do not register a CPU device. Add the config option
cpu: Register a generic CPU device on architectures that currently do not
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 <richard@nod.at> covered UML and suggested using per_cpu.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
#
024f7846 |
| 09-Jan-2012 |
Ben Hutchings <ben@decadent.org.uk> |
cpu: Do not return errors from cpu_dev_init() which will be ignored
cpu_dev_init() is only called from driver_init(), which does not check its return value. Therefore make cpu_dev_init() return voi
cpu: Do not return errors from cpu_dev_init() which will be ignored
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 <ben@decadent.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
Revision tags: v3.2, v3.2-rc7 |
|
#
8a25a2fd |
| 21-Dec-2011 |
Kay Sievers <kay.sievers@vrfy.org> |
cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem
This moves the 'cpu sysdev_class' over to a regular 'cpu' subsystem and converts the devices to regular devices. The sysdev
cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem
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 <hskinnemoen@gmail.com> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Borislav Petkov <bp@amd64.org> Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk> Cc: Len Brown <lenb@kernel.org> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Dave Jones <davej@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
show more ...
|
Revision tags: v3.2-rc6, v3.2-rc5 |
|
#
2987557f |
| 03-Dec-2011 |
Josh Triplett <josh@joshtriplett.org> |
driver-core/cpu: Expose hotpluggability to the rest of the kernel
When architectures register CPUs, they indicate whether the CPU allows hotplugging; notably, x86 and ARM don't allow hotplugging CPU
driver-core/cpu: Expose hotpluggability to the rest of the kernel
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 <josh@joshtriplett.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
show more ...
|
Revision tags: v3.2-rc4, v3.2-rc3, v3.2-rc2, v3.2-rc1, v3.1, v3.1-rc10, v3.1-rc9, v3.1-rc8, v3.1-rc7, v3.1-rc6, v3.1-rc5, v3.1-rc4, v3.1-rc3, v3.1-rc2, v3.1-rc1, v3.0, v3.0-rc7, v3.0-rc6, v3.0-rc5, v3.0-rc4, v3.0-rc3, v3.0-rc2, v3.0-rc1, v2.6.39, v2.6.39-rc7, v2.6.39-rc6, v2.6.39-rc5, v2.6.39-rc4, v2.6.39-rc3, v2.6.39-rc2, v2.6.39-rc1, v2.6.38, v2.6.38-rc8, v2.6.38-rc7, v2.6.38-rc6, v2.6.38-rc5, v2.6.38-rc4, v2.6.38-rc3, v2.6.38-rc2, v2.6.38-rc1, v2.6.37, v2.6.37-rc8, v2.6.37-rc7, v2.6.37-rc6, v2.6.37-rc5, v2.6.37-rc4, v2.6.37-rc3, v2.6.37-rc2, v2.6.37-rc1, v2.6.36, v2.6.36-rc8, v2.6.36-rc7, v2.6.36-rc6, v2.6.36-rc5, v2.6.36-rc4, v2.6.36-rc3, v2.6.36-rc2, v2.6.36-rc1, v2.6.35, v2.6.35-rc6, v2.6.35-rc5, v2.6.35-rc4, v2.6.35-rc3, v2.6.35-rc2, v2.6.35-rc1, v2.6.34, v2.6.34-rc7, v2.6.34-rc6 |
|
#
cdc6e3d3 |
| 27-Apr-2010 |
Jan Beulich <JBeulich@novell.com> |
drivers/base/cpu.c: fix the output from /sys/devices/system/cpu/offline
Without CONFIG_CPUMASK_OFFSTACK, simply inverting cpu_online_mask leads to CPUs beyond nr_cpu_ids to be displayed twice and CP
drivers/base/cpu.c: fix the output from /sys/devices/system/cpu/offline
Without CONFIG_CPUMASK_OFFSTACK, simply inverting cpu_online_mask leads to CPUs beyond nr_cpu_ids to be displayed twice and CPUs not even possible to be displayed as offline.
Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
show more ...
|
Revision tags: v2.6.34-rc5, v2.6.34-rc4, v2.6.34-rc3 |
|
#
5a0e3ad6 |
| 24-Mar-2010 |
Tejun Heo <tj@kernel.org> |
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being included when bu
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit 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>
show more ...
|
Revision tags: v2.6.34-rc2 |
|
#
67fc233f |
| 15-Mar-2010 |
Stephen Rothwell <sfr@canb.auug.org.au> |
sysdev: the cpu probe/release attributes should be sysdev_class_attributes
This fixes these warnings:
drivers/base/cpu.c:264: warning: initialization from incompatible pointer type drivers/base/cpu
sysdev: the cpu probe/release attributes should be sysdev_class_attributes
This fixes these warnings:
drivers/base/cpu.c:264: warning: initialization from incompatible pointer type drivers/base/cpu.c:265: warning: initialization from incompatible pointer type
Cc: Andi Kleen <andi@firstfloor.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
show more ...
|
Revision tags: v2.6.34-rc1, v2.6.33, v2.6.33-rc8, v2.6.33-rc7, v2.6.33-rc6, v2.6.33-rc5 |
|
#
6c1733ac |
| 21-Jan-2010 |
Greg Kroah-Hartman <gregkh@suse.de> |
sysdev: fix up the probe/release attributes
These should be sysdev attributes, not class attributes. This patch should resolve the problem.
Thanks to Stephen Rothwell for pointing out the problem.
sysdev: fix up the probe/release attributes
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 <sfr@canb.auug.org.au> Cc: Andi Kleen <andi@firstfloor.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
show more ...
|
Revision tags: v2.6.33-rc4, v2.6.33-rc3 |
|
#
28812fe1 |
| 05-Jan-2010 |
Andi Kleen <andi@firstfloor.org> |
driver-core: Add attribute argument to class_attribute show/store
Passing the attribute to the low level IO functions allows all kinds of cleanups, by sharing low level IO code without requiring an
driver-core: Add attribute argument to class_attribute show/store
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 <ak@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
show more ...
|
#
e1a7e29a |
| 05-Jan-2010 |
Andi Kleen <andi@firstfloor.org> |
sysdev: Convert node driver
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.
Sig
sysdev: Convert node driver
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 <ak@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
show more ...
|
#
265d2e2e |
| 05-Jan-2010 |
Andi Kleen <andi@firstfloor.org> |
sysdev: Convert cpu driver sysdev class attributes
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 in
sysdev: Convert cpu driver sysdev class attributes
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 <ak@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
show more ...
|
#
c9be0a36 |
| 05-Jan-2010 |
Andi Kleen <andi@firstfloor.org> |
sysdev: Pass attribute in sysdev_class attributes show/store
Passing the attribute to the low level IO functions allows all kinds of cleanups, by sharing low level IO code without requiring an own f
sysdev: Pass attribute in sysdev_class attributes show/store
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 <ak@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
show more ...
|
Revision tags: v2.6.33-rc2, v2.6.33-rc1, v2.6.32 |
|
#
51badebd |
| 26-Nov-2009 |
Gautham R Shenoy <ego@in.ibm.com> |
powerpc/pseries: Serialize cpu hotplug operations during deactivate Vs deallocate
Currently the cpu-allocation/deallocation process comprises of two steps: - Set the indicators and to update the dev
powerpc/pseries: Serialize cpu hotplug operations during deactivate Vs deallocate
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 <ego@in.ibm.com> Acked-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
show more ...
|
#
12633e80 |
| 25-Nov-2009 |
Nathan Fontenot <nfont@austin.ibm.com> |
sysfs/cpu: Add probe/release files
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 sup
sysfs/cpu: Add probe/release files
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 <nfont@austin.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
show more ...
|