Steven Smith [Thu, 16 Apr 2009 13:10:14 +0000 (14:10 +0100)]
After a page has been copy map-broken, it's still considered foreign
from the point of view of PageForeign(), even though there aren't really
any grant references backing it. Make sure we don't try to do a grant-to-grant
copy on it.
* commit 'tip/master': (1150 commits)
xen: use header for EXPORT_SYMBOL_GPL
sched: avoid flexible array member inside struct (gcc extension)
perf_counter: fix print debug irq disable
genirq: fix comment to say IRQ_WAKE_THREAD
lockdep: increase MAX_LOCKDEP_ENTRIES and MAX_LOCKDEP_CHAINS
lockdep: increase MAX_LOCKDEP_ENTRIES
lockdep: increase MAX_LOCKDEP_ENTRIES
perf_counter: call hw_perf_save_disable/restore around group_sched_in
x86: make sparse mem work in non-NUMA mode
x86: process.c, remove useless headers
x86: process.c, remove useless headers
x86: make sparse mem work in non-NUMA mode
x86: merge process.c a bit
x86: microcode: use smp_call_function_single instead of set_cpus_allowed, cleanup of synchronization logic
ntp: fix comment typos
ring-buffer: move code around to remove some branches
ring-buffer: use internal time stamp function
ring-buffer: small optimizations
x86, 32-bit: fix kernel_trap_sp()
sched: Don't export sched_mc_power_savings on multi-socket single core system
...
Randy Dunlap [Tue, 12 May 2009 20:31:40 +0000 (13:31 -0700)]
xen: use header for EXPORT_SYMBOL_GPL
mmu.c needs to #include module.h to prevent these warnings:
arch/x86/xen/mmu.c:239: warning: data definition has no type or storage class
arch/x86/xen/mmu.c:239: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
arch/x86/xen/mmu.c:239: warning: parameter names (without types) in function declaration
[ Impact: cleanup ]
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Rusty Russell [Wed, 13 May 2009 06:49:12 +0000 (16:19 +0930)]
sched: avoid flexible array member inside struct (gcc extension)
struct sched_group and struct sched_domain end in 'unsigned long
cpumask[]' which Jeff Garzik notes is not legal C to place inside
another struct. It upsets sparse and clang (LLVM's C front end).
Al Viro pointed out that a union is the Right Way to do this.
[ Impact: use more standard C code ]
Reported-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Jeff Garzik <jeff@garzik.org> Acked-by: Al Viro <viro@zeniv.linux.org.uk>
LKML-Reference: <200905131619.12880.rusty@rustcorp.com.au> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Tue, 12 May 2009 18:35:54 +0000 (14:35 -0400)]
genirq: fix comment to say IRQ_WAKE_THREAD
Trying to implement a driver to use threaded irqs, I was confused when the
return value to use that was described in the comment above
request_threaded_irq was not defined.
Turns out that the enum is IRQ_WAKE_THREAD where as the comment said
IRQ_THREAD_WAKE.
[Impact: do not confuse developers with wrong comments ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <alpine.DEB.2.00.0905121431020.13338@gandalf.stny.rr.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Paul Mackerras [Tue, 12 May 2009 11:59:01 +0000 (21:59 +1000)]
perf_counter: call hw_perf_save_disable/restore around group_sched_in
I noticed that when enabling a group via the PERF_COUNTER_IOC_ENABLE
ioctl on the group leader, the counters weren't enabled and counting
immediately on return from the ioctl, but did start counting a little
while later (presumably after a context switch).
The reason was that __perf_counter_enable calls group_sched_in which
calls hw_perf_group_sched_in, which on powerpc assumes that the caller
has called hw_perf_save_disable already. Until commit 46d686c6
("perf_counter: put whole group on when enabling group leader") it was
true that all callers of group_sched_in had called
hw_perf_save_disable first, and the powerpc hw_perf_group_sched_in
relies on that (there isn't an x86 version).
This fixes the problem by putting calls to hw_perf_save_disable /
hw_perf_restore around the calls to group_sched_in and
counter_sched_in in __perf_counter_enable. Having the calls to
hw_perf_save_disable/restore around the counter_sched_in call is
harmless and makes this call consistent with the other call sites
of counter_sched_in, which have all called hw_perf_save_disable first.
[ Impact: more precise counter group disable/enable functionality ]
Signed-off-by: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
LKML-Reference: <18953.25733.53359.147452@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* in fact, only collect_cpu_info and apply_microcode callbacks
must run on a target cpu, others will do just fine on any other.
smp_call_function_single() (as suggested by Ingo) is used to run
these callbacks on a target cpu.
* cleanup of synchronization logic of the 'microcode_core' part
The generic 'microcode_core' part guarantees that only a single cpu
(be it a full-fledged cpu, one of the cores or HT)
is being updated at any particular moment of time.
In general, there is no need for any additional sync. mechanism in
arch-specific parts (the patch removes existing spinlocks).
See also the "Synchronization" section in microcode_core.c.
* return -EINVAL instead of -1 (which is translated into -EPERM) in
microcode_write(), reload_cpu() and mc_sysdev_add(). Other suggestions
for an error code?
* use 'enum ucode_state' as return value of request_microcode_{fw, user}
to gain more flexibility by distinguishing between real error cases
and situations when an appropriate ucode was not found (which is not an
error per-se).
* some minor cleanups
Thanks a lot to Hugh Dickins for review/suggestions/testing!
john stultz [Tue, 12 May 2009 01:13:13 +0000 (18:13 -0700)]
ntp: fix comment typos
Bernhard Schiffner noticed I had a few comment typos in this patch,
(note: to save embarrassment, when making typos, avoid copying and
pasting them) so this patch corrects them.
[ Impact: cleanup ]
Reported-by: Bernhard Schiffner <bernhard@schiffner-limbach.de> Signed-off-by: John Stultz <johnstul@us.ibm.com> Cc: riel@redhat.com Cc: akpm@linux-foundation.org
LKML-Reference: <1242090794.7214.131.camel@localhost.localdomain> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Tue, 12 May 2009 02:11:05 +0000 (22:11 -0400)]
ring-buffer: move code around to remove some branches
This is a bit of micro-optimizations. But since the ring buffer is used
in tracing every function call, it is an extreme hot path. Every nanosecond
counts.
This change shows over 5% improvement in the ring-buffer-benchmark.
[ Impact: more efficient code ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Steven Rostedt [Mon, 11 May 2009 20:28:23 +0000 (16:28 -0400)]
ring-buffer: use internal time stamp function
The ring_buffer_time_stamp that is exported adds a little more overhead
than is needed for using it internally. This patch adds an internal
timestamp function that can be inlined (a single line function)
and used internally for the ring buffer.
[ Impact: a little less overhead to the ring buffer ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>