On Mon, Apr 14, 2014 at 09:23:08AM -0700, H. Peter Anvin wrote:
> Please read Documentation/this_cpu_ops.txt for reference for how to use
> these functions. However, you want to avoid forming a pointer if you
> can; it is relatively expensive to do so.
>
:-). I just found your comment yesterday
Please read Documentation/this_cpu_ops.txt for reference for how to use
these functions. However, you want to avoid forming a pointer if you
can; it is relatively expensive to do so.
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message
On 04/14/2014 01:39 AM, Chen, Gong wrote:
> @@ -619,7 +619,7 @@ void machine_check_poll(enum mcp_flags flags, mce_banks_t
> *b)
> continue;
>
> v = _cpu_var(mce_polled_error);
> - set_bit(0, v);
> + *v = 1;
>
On 04/14/2014 01:39 AM, Chen, Gong wrote:
> @@ -1287,14 +1287,14 @@ static unsigned long (*mce_adjust_timer)(unsigned
> long interval) =
>
> static int cmc_error_seen(void)
> {
> - unsigned long *v = &__get_cpu_var(mce_polled_error);
> + unsigned long *v = this_cpu_ptr(_polled_error);
According to Peter's suggestion, use this_cpu_* instead of
__get_cpu_var. BTW, remove bitmask ops to avoid unnecessary
overhead.
Signed-off-by: Chen, Gong
Suggested-by: H. Peter Anvin
---
arch/x86/kernel/cpu/mcheck/mce.c | 36 ++--
1 file changed, 18
On Mon, Apr 14, 2014 at 09:23:08AM -0700, H. Peter Anvin wrote:
Please read Documentation/this_cpu_ops.txt for reference for how to use
these functions. However, you want to avoid forming a pointer if you
can; it is relatively expensive to do so.
:-). I just found your comment yesterday so
According to Peter's suggestion, use this_cpu_* instead of
__get_cpu_var. BTW, remove bitmask ops to avoid unnecessary
overhead.
Signed-off-by: Chen, Gong gong.c...@linux.intel.com
Suggested-by: H. Peter Anvin h...@zytor.com
---
arch/x86/kernel/cpu/mcheck/mce.c | 36
On 04/14/2014 01:39 AM, Chen, Gong wrote:
@@ -1287,14 +1287,14 @@ static unsigned long (*mce_adjust_timer)(unsigned
long interval) =
static int cmc_error_seen(void)
{
- unsigned long *v = __get_cpu_var(mce_polled_error);
+ unsigned long *v = this_cpu_ptr(mce_polled_error);
On 04/14/2014 01:39 AM, Chen, Gong wrote:
@@ -619,7 +619,7 @@ void machine_check_poll(enum mcp_flags flags, mce_banks_t
*b)
continue;
v = get_cpu_var(mce_polled_error);
- set_bit(0, v);
+ *v = 1;
Please read Documentation/this_cpu_ops.txt for reference for how to use
these functions. However, you want to avoid forming a pointer if you
can; it is relatively expensive to do so.
-hpa
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message
10 matches
Mail list logo