All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Improving scalability of smp_mb__[before|after]_clear_bit
@ 2011-07-12  7:34 heechul Yun
  2011-07-12 10:07 ` Catalin Marinas
  2011-07-19 10:43 ` Russell King - ARM Linux
  0 siblings, 2 replies; 5+ messages in thread
From: heechul Yun @ 2011-07-12  7:34 UTC (permalink / raw)
  To: linux-arm-kernel

I think L2 cache sync operation, called by mb(), is not necessary for bitops.
This patch improves lat_pagefault of lmbench by up to 11% on a A9 SMP.
Higher proceesor
counts can benefit more.

---
diff --git a/arch/arm/include/asm/bitops.h b/arch/arm/include/asm/bitops.h
index b4892a0..f428059 100644
--- a/arch/arm/include/asm/bitops.h
+++ b/arch/arm/include/asm/bitops.h
@@ -26,8 +26,8 @@
 #include <linux/compiler.h>
 #include <asm/system.h>

-#define smp_mb__before_clear_bit()     mb()
-#define smp_mb__after_clear_bit()      mb()
+#define smp_mb__before_clear_bit()     smp_mb()
+#define smp_mb__after_clear_bit()      smp_mb()

 /*
  * These functions are the basis of our bit ops.

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [RFC] Improving scalability of smp_mb__[before|after]_clear_bit
  2011-07-12  7:34 [RFC] Improving scalability of smp_mb__[before|after]_clear_bit heechul Yun
@ 2011-07-12 10:07 ` Catalin Marinas
  2011-07-19 10:43 ` Russell King - ARM Linux
  1 sibling, 0 replies; 5+ messages in thread
From: Catalin Marinas @ 2011-07-12 10:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 12, 2011 at 08:34:59AM +0100, heechul Yun wrote:
> I think L2 cache sync operation, called by mb(), is not necessary for
> bitops.  This patch improves lat_pagefault of lmbench by up to 11% on
> a A9 SMP.  Higher proceesor counts can benefit more.
> 
> ---
> diff --git a/arch/arm/include/asm/bitops.h b/arch/arm/include/asm/bitops.h
> index b4892a0..f428059 100644
> --- a/arch/arm/include/asm/bitops.h
> +++ b/arch/arm/include/asm/bitops.h
> @@ -26,8 +26,8 @@
>  #include <linux/compiler.h>
>  #include <asm/system.h>
> 
> -#define smp_mb__before_clear_bit()     mb()
> -#define smp_mb__after_clear_bit()      mb()
> +#define smp_mb__before_clear_bit()     smp_mb()
> +#define smp_mb__after_clear_bit()      smp_mb()
> 
>  /*
>   * These functions are the basis of our bit ops.
 
It looks fine to me.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [RFC] Improving scalability of smp_mb__[before|after]_clear_bit
  2011-07-12  7:34 [RFC] Improving scalability of smp_mb__[before|after]_clear_bit heechul Yun
  2011-07-12 10:07 ` Catalin Marinas
@ 2011-07-19 10:43 ` Russell King - ARM Linux
  2011-07-19 10:59   ` Russell King - ARM Linux
  1 sibling, 1 reply; 5+ messages in thread
From: Russell King - ARM Linux @ 2011-07-19 10:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 12, 2011 at 12:34:59AM -0700, heechul Yun wrote:
> I think L2 cache sync operation, called by mb(), is not necessary for bitops.
> This patch improves lat_pagefault of lmbench by up to 11% on a A9 SMP.
> Higher proceesor
> counts can benefit more.

bitops should only be used on normal memory and not for stuff used for IO,
so this should be safe.

Could you submit it to the patch system please with Catalins ack?

Thanks.

> 
> ---
> diff --git a/arch/arm/include/asm/bitops.h b/arch/arm/include/asm/bitops.h
> index b4892a0..f428059 100644
> --- a/arch/arm/include/asm/bitops.h
> +++ b/arch/arm/include/asm/bitops.h
> @@ -26,8 +26,8 @@
>  #include <linux/compiler.h>
>  #include <asm/system.h>
> 
> -#define smp_mb__before_clear_bit()     mb()
> -#define smp_mb__after_clear_bit()      mb()
> +#define smp_mb__before_clear_bit()     smp_mb()
> +#define smp_mb__after_clear_bit()      smp_mb()
> 
>  /*
>   * These functions are the basis of our bit ops.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [RFC] Improving scalability of smp_mb__[before|after]_clear_bit
  2011-07-19 10:43 ` Russell King - ARM Linux
@ 2011-07-19 10:59   ` Russell King - ARM Linux
  2011-07-19 12:52     ` heechul Yun
  0 siblings, 1 reply; 5+ messages in thread
From: Russell King - ARM Linux @ 2011-07-19 10:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 19, 2011 at 11:43:08AM +0100, Russell King - ARM Linux wrote:
> On Tue, Jul 12, 2011 at 12:34:59AM -0700, heechul Yun wrote:
> > I think L2 cache sync operation, called by mb(), is not necessary for bitops.
> > This patch improves lat_pagefault of lmbench by up to 11% on a A9 SMP.
> > Higher proceesor
> > counts can benefit more.
> 
> bitops should only be used on normal memory and not for stuff used for IO,
> so this should be safe.
> 
> Could you submit it to the patch system please with Catalins ack?

Oh, you have but yet again the patch is broken by tabs converted to
whitespace:

$ pdb getpatch 6998/1 | tr ' ' '.'
===============================================================================
Patch:.6998/1:.kernel:.use.proper.memory.barriers.for.bitops
From:.Heechul.Yun
-------------------------------------------------------------------------------
.arch/arm/include/asm/bitops.h.|....4.++--
.1.file.changed,.2.insertions(+),.2.deletions(-)
-------------------------------------------------------------------------------
diff.--git.a/arch/arm/include/asm/bitops.h.b/arch/arm/include/asm/bitops.h
index.b4892a0..f428059.100644
---.a/arch/arm/include/asm/bitops.h
+++.b/arch/arm/include/asm/bitops.h
@@.-26,8.+26,8.@@
.#include.<linux/compiler.h>
.#include.<asm/system.h>
.
-#define.smp_mb__before_clear_bit().....mb()
-#define.smp_mb__after_clear_bit()......mb()
+#define.smp_mb__before_clear_bit().....smp_mb()
+#define.smp_mb__after_clear_bit()......smp_mb()
.
./*
..*.These.functions.are.the.basis.of.our.bit.ops.

If you can't fix your mail client not to do this, the patch system gives
you another way to submit - via the web interface where you can simply
attach the patch as a file.  That will avoid any messing about with your
mail client.

However, you really should get your mail client fixed so that it doesn't
mess up whitespace in patches.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [RFC] Improving scalability of smp_mb__[before|after]_clear_bit
  2011-07-19 10:59   ` Russell King - ARM Linux
@ 2011-07-19 12:52     ` heechul Yun
  0 siblings, 0 replies; 5+ messages in thread
From: heechul Yun @ 2011-07-19 12:52 UTC (permalink / raw)
  To: linux-arm-kernel

Oh. I am very sorry for the mistake.
I re-submitted the patch.
I will follow your advice next time I submit patches unless I find a
way to make gmail work properly.

Heechul

> If you can't fix your mail client not to do this, the patch system gives
> you another way to submit - via the web interface where you can simply
> attach the patch as a file. ?That will avoid any messing about with your
> mail client.
>
> However, you really should get your mail client fixed so that it doesn't
> mess up whitespace in patches.
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-07-19 12:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-12  7:34 [RFC] Improving scalability of smp_mb__[before|after]_clear_bit heechul Yun
2011-07-12 10:07 ` Catalin Marinas
2011-07-19 10:43 ` Russell King - ARM Linux
2011-07-19 10:59   ` Russell King - ARM Linux
2011-07-19 12:52     ` heechul Yun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.