2008-10-22 22:26:29 -07:00
|
|
|
|
|
|
|
|
|
2008-01-30 13:30:15 +01:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
x86: APIC: remove apic_write_around(); use alternatives
Use alternatives to select the workaround for the 11AP Pentium erratum
for the affected steppings on the fly rather than build time. Remove the
X86_GOOD_APIC configuration option and replace all the calls to
apic_write_around() with plain apic_write(), protecting accesses to the
ESR as appropriate due to the 3AP Pentium erratum. Remove
apic_read_around() and all its invocations altogether as not needed.
Remove apic_write_atomic() and all its implementing backends. The use of
ASM_OUTPUT2() is not strictly needed for input constraints, but I have
used it for readability's sake.
I had the feeling no one else was brave enough to do it, so I went ahead
and here it is. Verified by checking the generated assembly and tested
with both a 32-bit and a 64-bit configuration, also with the 11AP
"feature" forced on and verified with gdb on /proc/kcore to work as
expected (as an 11AP machines are quite hard to get hands on these days).
Some script complained about the use of "volatile", but apic_write() needs
it for the same reason and is effectively a replacement for writel(), so I
have disregarded it.
I am not sure what the policy wrt defconfig files is, they are generated
and there is risk of a conflict resulting from an unrelated change, so I
have left changes to them out. The option will get removed from them at
the next run.
Some testing with machines other than mine will be needed to avoid some
stupid mistake, but despite its volume, the change is not really that
intrusive, so I am fairly confident that because it works for me, it will
everywhere.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-16 19:15:30 +01:00
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:52 -07:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
2011-07-26 16:09:06 -07:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:52 -07:00
|
|
|
|
x86, trace: Introduce entering/exiting_irq()
When implementing tracepoints in interrupt handers, if the tracepoints are
simply added in the performance sensitive path of interrupt handers,
it may cause potential performance problem due to the time penalty.
To solve the problem, an idea is to prepare non-trace/trace irq handers and
switch their IDTs at the enabling/disabling time.
So, let's introduce entering_irq()/exiting_irq() for pre/post-
processing of each irq handler.
A way to use them is as follows.
Non-trace irq handler:
smp_irq_handler()
{
entering_irq(); /* pre-processing of this handler */
__smp_irq_handler(); /*
* common logic between non-trace and trace handlers
* in a vector.
*/
exiting_irq(); /* post-processing of this handler */
}
Trace irq_handler:
smp_trace_irq_handler()
{
entering_irq(); /* pre-processing of this handler */
trace_irq_entry(); /* tracepoint for irq entry */
__smp_irq_handler(); /*
* common logic between non-trace and trace handlers
* in a vector.
*/
trace_irq_exit(); /* tracepoint for irq exit */
exiting_irq(); /* post-processing of this handler */
}
If tracepoints can place outside entering_irq()/exiting_irq() as follows,
it looks cleaner.
smp_trace_irq_handler()
{
trace_irq_entry();
smp_irq_handler();
trace_irq_exit();
}
But it doesn't work.
The problem is with irq_enter/exit() being called. They must be called before
trace_irq_enter/exit(), because of the rcu_irq_enter() must be called before
any tracepoints are used, as tracepoints use rcu to synchronize.
As a possible alternative, we may be able to call irq_enter() first as follows
if irq_enter() can nest.
smp_trace_irq_hander()
{
irq_entry();
trace_irq_entry();
smp_irq_handler();
trace_irq_exit();
irq_exit();
}
But it doesn't work, either.
If irq_enter() is nested, it may have a time penalty because it has to check if it
was already called or not. The time penalty is not desired in performance sensitive
paths even if it is tiny.
Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com>
Link: http://lkml.kernel.org/r/51C3238D.9040706@hds.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
2013-06-20 11:45:17 -04:00
|
|
|
|
2008-01-30 13:30:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-11 11:27:39 +01:00
|
|
|
|
2008-01-30 13:30:15 +01:00
|
|
|
|
2009-02-11 11:27:39 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-30 13:30:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-14 18:44:51 +01:00
|
|
|
|
2008-01-30 13:30:15 +01:00
|
|
|
|
|
|
|
|
|
2008-06-20 16:11:20 -07:00
|
|
|
|
2011-11-10 13:42:40 +00:00
|
|
|
|
2009-01-28 17:16:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-09-15 11:12:30 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-30 13:30:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-11 11:20:03 +02:00
|
|
|
|
2008-01-30 13:30:15 +01:00
|
|
|
|
2008-07-23 17:13:14 +05:30
|
|
|
|
2008-03-20 00:41:16 -07:00
|
|
|
|
2008-07-10 11:16:49 -07:00
|
|
|
|
2008-01-30 13:30:15 +01:00
|
|
|
|
x86: APIC: remove apic_write_around(); use alternatives
Use alternatives to select the workaround for the 11AP Pentium erratum
for the affected steppings on the fly rather than build time. Remove the
X86_GOOD_APIC configuration option and replace all the calls to
apic_write_around() with plain apic_write(), protecting accesses to the
ESR as appropriate due to the 3AP Pentium erratum. Remove
apic_read_around() and all its invocations altogether as not needed.
Remove apic_write_atomic() and all its implementing backends. The use of
ASM_OUTPUT2() is not strictly needed for input constraints, but I have
used it for readability's sake.
I had the feeling no one else was brave enough to do it, so I went ahead
and here it is. Verified by checking the generated assembly and tested
with both a 32-bit and a 64-bit configuration, also with the 11AP
"feature" forced on and verified with gdb on /proc/kcore to work as
expected (as an 11AP machines are quite hard to get hands on these days).
Some script complained about the use of "volatile", but apic_write() needs
it for the same reason and is effectively a replacement for writel(), so I
have disregarded it.
I am not sure what the policy wrt defconfig files is, they are generated
and there is risk of a conflict resulting from an unrelated change, so I
have left changes to them out. The option will get removed from them at
the next run.
Some testing with machines other than mine will be needed to avoid some
stupid mistake, but despite its volume, the change is not really that
intrusive, so I am fairly confident that because it works for me, it will
everywhere.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-16 19:15:30 +01:00
|
|
|
|
2008-01-30 13:30:15 +01:00
|
|
|
|
2014-06-18 00:06:23 +02:00
|
|
|
|
x86: APIC: remove apic_write_around(); use alternatives
Use alternatives to select the workaround for the 11AP Pentium erratum
for the affected steppings on the fly rather than build time. Remove the
X86_GOOD_APIC configuration option and replace all the calls to
apic_write_around() with plain apic_write(), protecting accesses to the
ESR as appropriate due to the 3AP Pentium erratum. Remove
apic_read_around() and all its invocations altogether as not needed.
Remove apic_write_atomic() and all its implementing backends. The use of
ASM_OUTPUT2() is not strictly needed for input constraints, but I have
used it for readability's sake.
I had the feeling no one else was brave enough to do it, so I went ahead
and here it is. Verified by checking the generated assembly and tested
with both a 32-bit and a 64-bit configuration, also with the 11AP
"feature" forced on and verified with gdb on /proc/kcore to work as
expected (as an 11AP machines are quite hard to get hands on these days).
Some script complained about the use of "volatile", but apic_write() needs
it for the same reason and is effectively a replacement for writel(), so I
have disregarded it.
I am not sure what the policy wrt defconfig files is, they are generated
and there is risk of a conflict resulting from an unrelated change, so I
have left changes to them out. The option will get removed from them at
the next run.
Some testing with machines other than mine will be needed to avoid some
stupid mistake, but despite its volume, the change is not really that
intrusive, so I am fairly confident that because it works for me, it will
everywhere.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-16 19:15:30 +01:00
|
|
|
|
|
|
|
|
|
2008-01-30 13:30:15 +01:00
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:49 -07:00
|
|
|
|
2008-01-30 13:30:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-16 23:02:14 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-15 21:22:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-03 17:15:50 +08:00
|
|
|
|
2009-03-17 10:16:54 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:52 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-16 19:03:58 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:52 -07:00
|
|
|
|
|
|
|
|
|
2010-11-08 22:20:29 +01:00
|
|
|
|
2008-07-10 11:16:52 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-11-08 22:20:29 +01:00
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:52 -07:00
|
|
|
|
|
|
|
|
|
2009-02-16 23:02:14 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-15 21:22:11 +00:00
|
|
|
|
2009-04-20 13:02:27 -07:00
|
|
|
|
2015-01-15 21:22:17 +00:00
|
|
|
|
2015-01-15 21:22:26 +00:00
|
|
|
|
2008-09-03 16:58:31 -07:00
|
|
|
|
|
|
|
|
|
2015-01-15 21:22:09 +00:00
|
|
|
|
2008-09-03 16:58:31 -07:00
|
|
|
|
2009-04-20 13:02:27 -07:00
|
|
|
|
|
|
|
|
|
2008-09-03 16:58:31 -07:00
|
|
|
|
2015-01-15 21:22:19 +00:00
|
|
|
|
2015-01-15 21:22:26 +00:00
|
|
|
|
2015-01-15 21:22:19 +00:00
|
|
|
|
2009-03-16 17:05:00 -07:00
|
|
|
|
2015-01-15 21:22:11 +00:00
|
|
|
|
|
|
|
|
|
2008-07-11 18:41:54 -07:00
|
|
|
|
2008-07-10 11:16:49 -07:00
|
|
|
|
2009-04-17 16:42:14 +08:00
|
|
|
|
|
|
|
|
|
2008-01-30 13:30:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-12-07 00:55:17 -08:00
|
|
|
|
2008-01-30 13:30:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-02 20:27:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-02-25 16:09:31 +01:00
|
|
|
|
2015-02-02 20:27:11 +01:00
|
|
|
|
2008-01-30 13:30:15 +01:00
|
|
|
|
2015-01-15 21:22:44 +00:00
|
|
|
|
2015-01-15 21:22:40 +00:00
|
|
|
|
|
|
|
|
|
2008-01-30 13:30:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-01 11:43:34 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-30 13:30:15 +01:00
|
|
|
|
|
|
|
|
|
2010-10-06 12:27:54 +02:00
|
|
|
|
2008-01-30 13:30:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-06-27 01:41:56 -07:00
|
|
|
|
2008-11-11 14:33:44 +01:00
|
|
|
|
2009-08-19 12:35:53 +02:00
|
|
|
|
|
|
|
|
|
2008-01-30 13:30:15 +01:00
|
|
|
|
|
|
|
|
|
2009-01-28 17:36:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-17 16:28:46 +01:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-14 15:17:34 +08:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-10 01:06:59 +03:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
2012-06-25 13:38:28 -07:00
|
|
|
|
|
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
2009-11-10 01:06:59 +03:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-10 01:06:59 +03:00
|
|
|
|
2009-08-31 15:18:40 +02:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-07 15:15:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-26 13:51:40 +01:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
2014-02-04 23:55:01 -08:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-16 19:03:52 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-23 14:37:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
2009-02-26 12:47:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-17 16:28:46 +01:00
|
|
|
|
2009-02-26 12:47:40 +01:00
|
|
|
|
2011-05-20 17:51:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-04 17:11:42 -07:00
|
|
|
|
2011-05-20 17:51:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-26 12:47:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-25 20:50:49 -08:00
|
|
|
|
|
|
|
|
|
2009-02-26 12:47:40 +01:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
2010-03-17 13:37:00 +03:00
|
|
|
|
2011-12-13 11:51:53 +09:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-16 19:03:52 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-15 15:56:46 +03:00
|
|
|
|
|
|
|
|
|
2010-03-17 13:37:00 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-16 19:03:52 +03:00
|
|
|
|
2010-03-17 13:37:00 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-15 15:56:46 +03:00
|
|
|
|
2010-03-17 13:37:00 +03:00
|
|
|
|
|
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-16 19:03:52 +03:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-08 15:55:09 +02:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-30 23:53:27 -07:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
2014-07-30 23:53:27 -07:00
|
|
|
|
|
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
2009-02-25 20:50:49 -08:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-08-31 15:18:40 +02:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
2011-09-28 16:44:54 +01:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-05 13:23:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
x86: Add read_mostly declaration/definition to variables from smp.h
Add "read-mostly" qualifier to the following variables in
smp.h:
- cpu_sibling_map
- cpu_core_map
- cpu_llc_shared_map
- cpu_llc_id
- cpu_number
- x86_cpu_to_apicid
- x86_bios_cpu_apicid
- x86_cpu_to_logical_apicid
As long as all the variables above are only written during the
initialization, this change is meant to prevent the false
sharing. More specifically, on vSMP Foundation platform
x86_cpu_to_apicid shared the same internode_cache_line with
frequently written lapic_events.
From the analysis of the first 33 per_cpu variables out of 219
(memories they describe, to be more specific) the 8 have read_mostly
nature (tlb_vector_offset, cpu_loops_per_jiffy, xen_debug_irq, etc.)
and 25 are frequently written (irq_stack_union, gdt_page,
exception_stacks, idt_desc, etc.).
Assuming that the spread of the rest of the per_cpu variables is
similar, identifying the read mostly memories will make more sense
in terms of long-term code maintenance comparing to identifying
frequently written memories.
Signed-off-by: Vlad Zolotarov <vlad@scalemp.com>
Acked-by: Shai Fultheim <shai@scalemp.com>
Cc: Shai Fultheim (Shai@ScaleMP.com) <Shai@scalemp.com>
Cc: ido@wizery.com
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1719258.EYKzE4Zbq5@vlad
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2012-06-11 12:56:52 +03:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-14 15:17:34 +08:00
|
|
|
|
|
|
|
|
|
2012-03-16 20:25:35 +01:00
|
|
|
|
2012-03-14 15:17:34 +08:00
|
|
|
|
|
|
|
|
|
2014-06-09 16:19:32 +08:00
|
|
|
|
|
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
2009-10-14 00:07:03 +04:00
|
|
|
|
|
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
2009-04-11 00:03:10 +05:30
|
|
|
|
2011-01-23 14:37:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-24 14:16:30 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-07 15:15:59 +02:00
|
|
|
|
2012-06-14 09:49:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
2012-06-14 09:49:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-07 15:15:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
2012-06-07 15:15:59 +02:00
|
|
|
|
2012-06-05 13:23:44 +02:00
|
|
|
|
2012-06-07 15:15:59 +02:00
|
|
|
|
|
|
|
|
|
2012-06-05 13:23:44 +02:00
|
|
|
|
2012-06-25 13:38:27 -07:00
|
|
|
|
2012-06-25 13:38:28 -07:00
|
|
|
|
|
|
|
|
|
2012-06-07 15:14:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-25 13:38:27 -07:00
|
|
|
|
2012-06-25 13:38:28 -07:00
|
|
|
|
|
|
|
|
|
2012-06-07 15:14:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-10 01:06:59 +03:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
2009-11-10 01:06:59 +03:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
2009-11-10 01:06:59 +03:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
2009-11-10 01:06:59 +03:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-08-31 15:18:40 +02:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
2009-08-31 15:18:40 +02:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-08-31 15:18:40 +02:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
2009-08-31 15:18:40 +02:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-08-31 15:18:40 +02:00
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
x86, trace: Introduce entering/exiting_irq()
When implementing tracepoints in interrupt handers, if the tracepoints are
simply added in the performance sensitive path of interrupt handers,
it may cause potential performance problem due to the time penalty.
To solve the problem, an idea is to prepare non-trace/trace irq handers and
switch their IDTs at the enabling/disabling time.
So, let's introduce entering_irq()/exiting_irq() for pre/post-
processing of each irq handler.
A way to use them is as follows.
Non-trace irq handler:
smp_irq_handler()
{
entering_irq(); /* pre-processing of this handler */
__smp_irq_handler(); /*
* common logic between non-trace and trace handlers
* in a vector.
*/
exiting_irq(); /* post-processing of this handler */
}
Trace irq_handler:
smp_trace_irq_handler()
{
entering_irq(); /* pre-processing of this handler */
trace_irq_entry(); /* tracepoint for irq entry */
__smp_irq_handler(); /*
* common logic between non-trace and trace handlers
* in a vector.
*/
trace_irq_exit(); /* tracepoint for irq exit */
exiting_irq(); /* post-processing of this handler */
}
If tracepoints can place outside entering_irq()/exiting_irq() as follows,
it looks cleaner.
smp_trace_irq_handler()
{
trace_irq_entry();
smp_irq_handler();
trace_irq_exit();
}
But it doesn't work.
The problem is with irq_enter/exit() being called. They must be called before
trace_irq_enter/exit(), because of the rcu_irq_enter() must be called before
any tracepoints are used, as tracepoints use rcu to synchronize.
As a possible alternative, we may be able to call irq_enter() first as follows
if irq_enter() can nest.
smp_trace_irq_hander()
{
irq_entry();
trace_irq_entry();
smp_irq_handler();
trace_irq_exit();
irq_exit();
}
But it doesn't work, either.
If irq_enter() is nested, it may have a time penalty because it has to check if it
was already called or not. The time penalty is not desired in performance sensitive
paths even if it is tiny.
Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com>
Link: http://lkml.kernel.org/r/51C3238D.9040706@hds.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
2013-06-20 11:45:17 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-17 13:52:29 +01:00
|
|
|
|
2013-08-20 16:01:07 +09:00
|
|
|
|
|
|
|
|
|
2008-10-22 22:26:29 -07:00
|
|
|
|