Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-10-12 Thread christophe leroy
Le 08/10/2015 21:12, Scott Wood a écrit : On Wed, 2015-10-07 at 14:49 +0200, Christophe Leroy wrote: Le 29/09/2015 02:29, Scott Wood a écrit : On Tue, Sep 22, 2015 at 06:51:13PM +0200, Christophe Leroy wrote: flush/clean/invalidate _dcache_range() functions are all very similar and are quite

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-10-08 Thread Scott Wood
On Wed, 2015-10-07 at 14:49 +0200, Christophe Leroy wrote: > Le 29/09/2015 02:29, Scott Wood a écrit : > > On Tue, Sep 22, 2015 at 06:51:13PM +0200, Christophe Leroy wrote: > > > flush/clean/invalidate _dcache_range() functions are all very > > > similar and are quite short. They are mainly used in

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-10-07 Thread Christophe Leroy
Le 29/09/2015 02:29, Scott Wood a écrit : On Tue, Sep 22, 2015 at 06:51:13PM +0200, Christophe Leroy wrote: flush/clean/invalidate _dcache_range() functions are all very similar and are quite short. They are mainly used in __dma_sync() perf_event locate them in the top 3 consumming functions d

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-28 Thread Scott Wood
On Tue, Sep 22, 2015 at 06:51:13PM +0200, Christophe Leroy wrote: > flush/clean/invalidate _dcache_range() functions are all very > similar and are quite short. They are mainly used in __dma_sync() > perf_event locate them in the top 3 consumming functions during > heavy ethernet activity > > They

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Scott Wood
On Wed, 2015-09-23 at 00:49 +0200, Christophe Leroy wrote: > Le 23/09/2015 00:34, Scott Wood a écrit : > > On Tue, 2015-09-22 at 22:57 +0200, Christophe Leroy wrote: > > > > Here is what I get in asm. First one is with "if (i) mb();". We see > > > > gcc > > > > puts a beqlr. This is the form that

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Christophe Leroy
Le 23/09/2015 00:34, Scott Wood a écrit : On Tue, 2015-09-22 at 22:57 +0200, Christophe Leroy wrote: >Here is what I get in asm. First one is with "if (i) mb();". We see gcc >puts a beqlr. This is the form that is closest to what we had in the >former misc_32.S >Second one if with "mb()". Here

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Scott Wood
On Tue, 2015-09-22 at 22:57 +0200, Christophe Leroy wrote: > Here is what I get in asm. First one is with "if (i) mb();". We see gcc > puts a beqlr. This is the form that is closest to what we had in the > former misc_32.S > Second one if with "mb()". Here we get a branch to sync for a useless sy

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Christophe Leroy
Le 22/09/2015 22:38, Joakim Tjernlund a écrit : On Tue, 2015-09-22 at 15:35 -0500, Scott Wood wrote: On Tue, 2015-09-22 at 20:32 +, Joakim Tjernlund wrote: On Tue, 2015-09-22 at 15:14 -0500, Scott Wood wrote: On Tue, 2015-09-22 at 19:55 +, Joakim Tjernlund wrote: On Tue, 2015-09-22

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Joakim Tjernlund
On Tue, 2015-09-22 at 15:35 -0500, Scott Wood wrote: > On Tue, 2015-09-22 at 20:32 +, Joakim Tjernlund wrote: > > On Tue, 2015-09-22 at 15:14 -0500, Scott Wood wrote: > > > On Tue, 2015-09-22 at 19:55 +, Joakim Tjernlund wrote: > > > > On Tue, 2015-09-22 at 14:42 -0500, Scott Wood wrote: >

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Scott Wood
On Tue, 2015-09-22 at 20:32 +, Joakim Tjernlund wrote: > On Tue, 2015-09-22 at 15:14 -0500, Scott Wood wrote: > > On Tue, 2015-09-22 at 19:55 +, Joakim Tjernlund wrote: > > > On Tue, 2015-09-22 at 14:42 -0500, Scott Wood wrote: > > > > On Tue, 2015-09-22 at 19:34 +, Joakim Tjernlund wro

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Joakim Tjernlund
On Tue, 2015-09-22 at 15:14 -0500, Scott Wood wrote: > On Tue, 2015-09-22 at 19:55 +, Joakim Tjernlund wrote: > > On Tue, 2015-09-22 at 14:42 -0500, Scott Wood wrote: > > > On Tue, 2015-09-22 at 19:34 +, Joakim Tjernlund wrote: > > > > On Tue, 2015-09-22 at 13:58 -0500, Scott Wood wrote: >

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Scott Wood
On Tue, 2015-09-22 at 19:55 +, Joakim Tjernlund wrote: > On Tue, 2015-09-22 at 14:42 -0500, Scott Wood wrote: > > On Tue, 2015-09-22 at 19:34 +, Joakim Tjernlund wrote: > > > On Tue, 2015-09-22 at 13:58 -0500, Scott Wood wrote: > > > > On Tue, 2015-09-22 at 18:12 +, Joakim Tjernlund wro

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Joakim Tjernlund
> > And generally the one proposing uglification-for-optimization should > > provide > > the evidence. :-) > > When it comes to gcc, past history is my evidence until proven otherwise :) > Maybe I will check again ... OK then: static inline void mb(void) { __asm__ __volatile__ ("sync" :

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Joakim Tjernlund
On Tue, 2015-09-22 at 14:42 -0500, Scott Wood wrote: > On Tue, 2015-09-22 at 19:34 +, Joakim Tjernlund wrote: > > On Tue, 2015-09-22 at 13:58 -0500, Scott Wood wrote: > > > On Tue, 2015-09-22 at 18:12 +, Joakim Tjernlund wrote: > > > > On Tue, 2015-09-22 at 18:51 +0200, Christophe Leroy wro

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Scott Wood
On Tue, 2015-09-22 at 19:34 +, Joakim Tjernlund wrote: > On Tue, 2015-09-22 at 13:58 -0500, Scott Wood wrote: > > On Tue, 2015-09-22 at 18:12 +, Joakim Tjernlund wrote: > > > On Tue, 2015-09-22 at 18:51 +0200, Christophe Leroy wrote: > > > > flush/clean/invalidate _dcache_range() functions

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Joakim Tjernlund
On Tue, 2015-09-22 at 13:58 -0500, Scott Wood wrote: > On Tue, 2015-09-22 at 18:12 +, Joakim Tjernlund wrote: > > On Tue, 2015-09-22 at 18:51 +0200, Christophe Leroy wrote: > > > flush/clean/invalidate _dcache_range() functions are all very > > > similar and are quite short. They are mainly use

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Scott Wood
On Tue, 2015-09-22 at 18:12 +, Joakim Tjernlund wrote: > On Tue, 2015-09-22 at 18:51 +0200, Christophe Leroy wrote: > > flush/clean/invalidate _dcache_range() functions are all very > > similar and are quite short. They are mainly used in __dma_sync() > > perf_event locate them in the top 3 con

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Joakim Tjernlund
On Tue, 2015-09-22 at 18:51 +0200, Christophe Leroy wrote: > flush/clean/invalidate _dcache_range() functions are all very > similar and are quite short. They are mainly used in __dma_sync() > perf_event locate them in the top 3 consumming functions during > heavy ethernet activity > > They are go

[PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Christophe Leroy
flush/clean/invalidate _dcache_range() functions are all very similar and are quite short. They are mainly used in __dma_sync() perf_event locate them in the top 3 consumming functions during heavy ethernet activity They are good candidate for inlining, as __dma_sync() does almost nothing but call