08 Jan, 2013
1 commit
-
Export cpu_topology symbol, so it's available for modules.
Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky
23 Nov, 2012
1 commit
-
Mainly merge all different per-cpu arrays into a single array which
holds all topology information per logical cpu.
Also fix the broken core vs socket variable naming and simplify the
locking a bit.
When running in environments without topology information also
invent book, socket and core ids, so that not all ids are zero.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky
12 Nov, 2012
1 commit
-
The current topology code confuses core id vs physical package id.
In other words /sys/devices/system/cpu/cpuX/topology/core_id
displays the physical_package_id (aka socket id) instead of the
core id.
The physical_package_id sysfs attribute always displays "-1"
instead of the socket id.Fix this mix-up with a small patch which defines and initializes
topology_physical_package_id correctly and fixes the broken
core id handling.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky
26 Sep, 2012
4 commits
-
Use for_each_set_bit() to simplify the code.
spatch with a semantic match is used to found this.
(http://coccinelle.lip6.fr/)Signed-off-by: Wei Yongjun
Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky -
The cpu polarization member is the only per cpu state that is not part
of the pcpu structure. So add it there and have everything in one place.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky -
The maximum nesting of the cpu topology is evaluated when /proc/sysinfo
is the first time read. This happens without a lock and a concurrent
reader on a different cpu can see and use an invalid intermediate value.
Besides the fact that this race is quite unlikely the worst thing that
could happen is that /proc/sysinfo would contain bogus information about
the machine's cpu topology.
Nevertheless this should be fixed. So move the detection code to the
early machine detection code and since now the value is early available
use it in the topology code as well.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky -
Any change to sysinfo.h causes a whole kernel recompile since sysinfo.h is
included by topology.h, which again is used nearly everywhere.
So remove that include and add a forward declaration instead.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky
20 Jul, 2012
1 commit
-
Remove the file name from the comment at top of many files. In most
cases the file name was wrong anyway, so it's rather pointless.Also unify the IBM copyright statement. We did have a lot of sightly
different statements and wanted to change them one after another
whenever a file gets touched. However that never happened. Instead
people start to take the old/"wrong" statements to use as a template
for new files.
So unify all of them in one go.Signed-off-by: Heiko Carstens
11 Mar, 2012
1 commit
-
Define struct pcpu and merge some of the NR_CPUS arrays into it, including
__cpu_logical_map, current_set and smp_cpu_state. Split smp related
functions to those operating on physical cpus and the functions operating
on a logical cpu number. Make the functions for physical cpus use a
pointer to a struct pcpu. This hides the knowledge about cpu addresses in
smp.c, entry[64].S and swsusp_asm64.S, thus remove the sigp.h header.The PSW restart mechanism is used to start secondary cpus, calling a
function on an online cpu, calling a function on the ipl cpu, and for
the nmi signal. Replace the different assembler functions with a
single function restart_int_handler. The new entry point calls a function
whose pointer is stored in the lowcore of the target cpu and it can wait
for the source cpu to stop. This covers all existing use cases.Overall the code is now simpler and there are ~380 lines less code.
Reviewed-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky
10 Jan, 2012
1 commit
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (31 commits)
[S390] disassembler: mark exception causing instructions
[S390] Enable exception traces by default
[S390] return address of compat signals
[S390] sysctl: get rid of dead declaration
[S390] dasd: fix fixpoint divide exception in define_extent
[S390] dasd: add sanity check to detect path connection error
[S390] qdio: fix kernel panic for zfcp 31-bit
[S390] Add s390x description to Documentation/kdump/kdump.txt
[S390] Add VMCOREINFO_SYMBOL(high_memory) to vmcoreinfo
[S390] dasd: fix expiration handling for recovery requests
[S390] outstanding interrupts vs. smp_send_stop
[S390] ipc: call generic sys_ipc demultiplexer
[S390] zcrypt: Fix error return codes.
[S390] zcrypt: Rework length parameter checking.
[S390] cleanup trap handling
[S390] Remove Kerntypes leftovers
[S390] topology: increase poll frequency if change is anticipated
[S390] entry[64].S improvements
[S390] make arch/s390 subdirectories depend on config option
[S390] kvm: move cmf host id constant out of lowcore
...Fix up conflicts in arch/s390/kernel/{smp.c,topology.c} due to the
sysdev removal clashing with "topology: get rid of ifdefs" which moved
some of that code around.
07 Jan, 2012
1 commit
-
This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file,
and it fixes the build error in the arch/x86/kernel/microcode_core.c
file, that the merge did not catch.The microcode_core.c patch was provided by Stephen Rothwell
who was invaluable in the merge issues involved
with the large sysdev removal process in the driver-core tree.Signed-off-by: Greg Kroah-Hartman
27 Dec, 2011
3 commits
-
Increase cpu topology change poll frequency if a change is anticipated.
Otherwise a user might be a bit confused to have to wait up to a minute
in order to see a change this should be visible immediatly.
However there is no guarantee that the change will happen during the
time frame the poll frequency is increased.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky -
Cleanup z10 topology handling. This adds some more code but hopefully
the result is more readable and easier to maintain.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky -
Remove all ifdefs from topology code and also only compile it for the
CONFIG_SCHED_BOOK case. The new code selects SCHED_MC if SCHED_BOOK is
selected. SCHED_MC without SCHED_BOOK is not possible anymore.
Furthermore various sysfs attributes are not available anymore for the
!SCHED_BOOK case. In particular all attributes that correspond to
CPU polarization.
But since all real world kernels have SCHED_BOOK selected anyway this
doesn't matter too much.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky
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
14 Nov, 2011
1 commit
-
Make sure that all cpus in a book on a z10 appear as book siblings
and not as core siblings. This fixes some performance regressions that
appeared after the book scheduling domain got introduced.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky
30 Oct, 2011
1 commit
-
Fix this warning:
WARNING: vmlinux.o(.text+0x199b6): Section mismatch in reference from
the function alloc_masks() to the function .init.text:__alloc_bootmem()Signed-off-by: Sebastian Ott
Signed-off-by: Martin Schwidefsky
26 May, 2011
1 commit
-
Merge irq.c and s390_ext.c into irq.c. That way all external interrupt
related functions are together.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky
23 May, 2011
1 commit
-
Adapt new API.
Signed-off-by: KOSAKI Motohiro
Signed-off-by: Martin Schwidefsky
29 Oct, 2010
1 commit
-
Fix cpu masks for 'topology=off' case. Folding of the scheduling domains
happen in such a way that everything belongs to the MC domain instead
of the CPU doimain.
This should fix a performance regression introduced with
eafd2b6d "[S390] topology: use default MC domain initializer" and also
makes sure we have the same behavious as if CONFIG_SCHED_MC was not
selected at all.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky
25 Oct, 2010
5 commits
-
Export the cpu configuration topology via sysinfo. Two new lines are
introduced:CPU Topology HW: 0 0 0 4 6 4
CPU Topology SW: 0 0 0 0 4 24The HW line describes the cpu topology nesting levels when the maximum
nesting level is used to get the corresponding SYSIB.
The SW line describes what Linux is actually using. In this case it
supports only two levels (CONFIG_SCHED_BOOK off) and therefore the
hardware folded the two lower levels in the SYSIB response block.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky -
Move the topology sysinfo SYSIB definitions to the proper place in
asm/sysinfo.h where they should be.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky -
Move cpu topology facility detection to early setup code where it
should be.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky -
Store the facility list once at system startup with stfl/stfle and
reuse the result for all facility tests.Signed-off-by: Martin Schwidefsky
-
Switch default value of the kernel parameter 'topology' from off to on.
Various performance measurements have finally shown that there are no
(known) regressions anywhere.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky
10 Sep, 2010
1 commit
-
Use the extended cpu topology information that z11 machines provide
to improve the scheduler's decision making.Signed-off-by: Heiko Carstens
Signed-off-by: Peter Zijlstra
LKML-Reference:
Signed-off-by: Ingo Molnar
17 May, 2010
1 commit
-
Provide a topology_core_id define which makes sure that the contents of
/sys/devices/system/cpu/cpuX/topology/core_id
indeed do contain the core id and not always 0.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky
09 Apr, 2010
1 commit
-
In the default case the lock is not unlocked. The return is
converted to a goto, to share the unlock at the end of the function.A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr/)//
@r exists@
expression E1;
identifier f;
@@f (...) { }
//Signed-off-by: Julia Lawall
Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky
14 Jan, 2010
1 commit
-
Finally move it to the place where it belongs to and make get rid of
it for !CONFIG_SMP.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky
26 Mar, 2009
1 commit
-
Impact: cleanup
cpu_coregroup_mask is the New Hotness.
As S/390 uses theirs internally, so we just make it static.
Signed-off-by: Rusty Russell
Signed-off-by: Martin Schwidefsky
30 Dec, 2008
1 commit
29 Dec, 2008
1 commit
-
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (85 commits)
[S390] provide documentation for hvc_iucv kernel parameter.
[S390] convert ctcm printks to dev_xxx and pr_xxx macros.
[S390] convert zfcp printks to pr_xxx macros.
[S390] convert vmlogrdr printks to pr_xxx macros.
[S390] convert zfcp dumper printks to pr_xxx macros.
[S390] convert cpu related printks to pr_xxx macros.
[S390] convert qeth printks to dev_xxx and pr_xxx macros.
[S390] convert sclp printks to pr_xxx macros.
[S390] convert iucv printks to dev_xxx and pr_xxx macros.
[S390] convert ap_bus printks to pr_xxx macros.
[S390] convert dcssblk and extmem printks messages to pr_xxx macros.
[S390] convert monwriter printks to pr_xxx macros.
[S390] convert s390 debug feature printks to pr_xxx macros.
[S390] convert monreader printks to pr_xxx macros.
[S390] convert appldata printks to pr_xxx macros.
[S390] convert setup printks to pr_xxx macros.
[S390] convert hypfs printks to pr_xxx macros.
[S390] convert time printks to pr_xxx macros.
[S390] convert cpacf printks to pr_xxx macros.
[S390] convert cio printks to pr_xxx macros.
...
26 Dec, 2008
1 commit
-
Like cpu_coregroup_map, but returns a (const) pointer.
Compile-tested on s390 (defconfig).
Signed-off-by: Rusty Russell
Signed-off-by: Mike Travis
25 Dec, 2008
5 commits
-
Signed-off-by: Martin Schwidefsky
-
Interrupts haven't been implemented. So remove the dead code.
Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky -
Introduce a topology=[on|off] kernel parameter which allows to switch
cpu topology on/off. Default will be off, since it looks like that for
some workloards this doesn't behave very well (on s390).Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky -
Call rebuild_sched_domains instead of arch_reinit_sched_domains if
cpu topology changes. This leaves cpu sets alone which otherwise would
be destroyed.
If and how it makes sense to define cpu sets on a virtualized
architecture is another question.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky -
Common code doesn't call arch_update_cpu_topology() anymore on
cpu hotplug. But our architecture backend relied on that in order to
update the cpu_core_map. For machines without cpu topology support
this leads uninitialized cpu_core_maps for later on added cpus.To solve this just initialize the maps with cpu_possible_map, since
that will be always valid for machines without topology support.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky
12 Dec, 2008
1 commit
-
Change arch_update_cpu_topology so it returns 1 if the cpu topology changed
and 0 if it didn't change. This will be useful for the next patch which adds
a call to this function in partition_sched_domains.Signed-off-by: Heiko Carstens
Signed-off-by: Ingo Molnar
15 Nov, 2008
1 commit
-
cpu_coregroup_map used to grab a mutex on s390 since it was only
called from process context.
Since c7c22e4d5c1fdebfac4dba76de7d0338c2b0d832 "block: add support
for IO CPU affinity" this is not true anymore.
It now also gets called from softirq context.To prevent possible deadlocks change this in architecture code and
use a spinlock instead of a mutex.Cc: stable@kernel.org
Cc: Jens Axboe
Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky