Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-28 Thread Peter Zijlstra
On Mon, Aug 28, 2017 at 01:19:21PM +0800, Huang, Ying wrote: > > What do you think about this version? > > > > Ping. Thanks, yes that got lost in the inbox :-( I'll queue it, thanks !

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-28 Thread Peter Zijlstra
On Mon, Aug 28, 2017 at 01:19:21PM +0800, Huang, Ying wrote: > > What do you think about this version? > > > > Ping. Thanks, yes that got lost in the inbox :-( I'll queue it, thanks !

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-27 Thread Huang, Ying
"Huang, Ying" writes: > Hi, Peter, > > "Huang, Ying" writes: > >> Peter Zijlstra writes: >> >>> On Sat, Aug 05, 2017 at 08:47:02AM +0800, Huang, Ying wrote: Yes. That looks good. So you will prepare the final patch? Or

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-27 Thread Huang, Ying
"Huang, Ying" writes: > Hi, Peter, > > "Huang, Ying" writes: > >> Peter Zijlstra writes: >> >>> On Sat, Aug 05, 2017 at 08:47:02AM +0800, Huang, Ying wrote: Yes. That looks good. So you will prepare the final patch? Or you hope me to do that? >>> >>> I was hoping you'd do it ;-)

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-13 Thread Huang, Ying
Hi, Peter, "Huang, Ying" writes: > Peter Zijlstra writes: > >> On Sat, Aug 05, 2017 at 08:47:02AM +0800, Huang, Ying wrote: >>> Yes. That looks good. So you will prepare the final patch? Or you >>> hope me to do that? >> >> I was hoping you'd do

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-13 Thread Huang, Ying
Hi, Peter, "Huang, Ying" writes: > Peter Zijlstra writes: > >> On Sat, Aug 05, 2017 at 08:47:02AM +0800, Huang, Ying wrote: >>> Yes. That looks good. So you will prepare the final patch? Or you >>> hope me to do that? >> >> I was hoping you'd do it ;-) > > Thanks! Here is the updated patch

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-07 Thread Huang, Ying
Peter Zijlstra writes: > On Sat, Aug 05, 2017 at 08:47:02AM +0800, Huang, Ying wrote: >> Yes. That looks good. So you will prepare the final patch? Or you >> hope me to do that? > > I was hoping you'd do it ;-) Thanks! Here is the updated patch Best Regards, Huang,

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-07 Thread Huang, Ying
Peter Zijlstra writes: > On Sat, Aug 05, 2017 at 08:47:02AM +0800, Huang, Ying wrote: >> Yes. That looks good. So you will prepare the final patch? Or you >> hope me to do that? > > I was hoping you'd do it ;-) Thanks! Here is the updated patch Best Regards, Huang, Ying

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-07 Thread Peter Zijlstra
On Sat, Aug 05, 2017 at 08:47:02AM +0800, Huang, Ying wrote: > Yes. That looks good. So you will prepare the final patch? Or you > hope me to do that? I was hoping you'd do it ;-)

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-07 Thread Peter Zijlstra
On Sat, Aug 05, 2017 at 08:47:02AM +0800, Huang, Ying wrote: > Yes. That looks good. So you will prepare the final patch? Or you > hope me to do that? I was hoping you'd do it ;-)

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-04 Thread Huang, Ying
Peter Zijlstra writes: > On Fri, Aug 04, 2017 at 10:05:55AM +0800, Huang, Ying wrote: >> "Huang, Ying" writes: >> > Peter Zijlstra writes: > >> >> +struct __call_single_data { >> >> struct llist_node llist; >> >>

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-04 Thread Huang, Ying
Peter Zijlstra writes: > On Fri, Aug 04, 2017 at 10:05:55AM +0800, Huang, Ying wrote: >> "Huang, Ying" writes: >> > Peter Zijlstra writes: > >> >> +struct __call_single_data { >> >> struct llist_node llist; >> >> smp_call_func_t func; >> >> void *info; >> >> unsigned int flags; >> >>

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-04 Thread Peter Zijlstra
On Fri, Aug 04, 2017 at 10:05:55AM +0800, Huang, Ying wrote: > "Huang, Ying" writes: > > Peter Zijlstra writes: > >> +struct __call_single_data { > >>struct llist_node llist; > >>smp_call_func_t func; > >>void *info; > >>unsigned int

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-04 Thread Peter Zijlstra
On Fri, Aug 04, 2017 at 10:05:55AM +0800, Huang, Ying wrote: > "Huang, Ying" writes: > > Peter Zijlstra writes: > >> +struct __call_single_data { > >>struct llist_node llist; > >>smp_call_func_t func; > >>void *info; > >>unsigned int flags; > >> }; > >> > >> +typedef struct

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-04 Thread Peter Zijlstra
On Fri, Aug 04, 2017 at 09:28:17AM +0800, Huang, Ying wrote: > Peter Zijlstra writes: > [snip] > > diff --git a/include/linux/smp.h b/include/linux/smp.h > > index 68123c1fe549..8d817cb80a38 100644 > > --- a/include/linux/smp.h > > +++ b/include/linux/smp.h > > @@ -14,13

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-04 Thread Peter Zijlstra
On Fri, Aug 04, 2017 at 09:28:17AM +0800, Huang, Ying wrote: > Peter Zijlstra writes: > [snip] > > diff --git a/include/linux/smp.h b/include/linux/smp.h > > index 68123c1fe549..8d817cb80a38 100644 > > --- a/include/linux/smp.h > > +++ b/include/linux/smp.h > > @@ -14,13 +14,16 @@ > > #include

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-03 Thread Huang, Ying
"Huang, Ying" writes: > Peter Zijlstra writes: > [snip] >> diff --git a/include/linux/smp.h b/include/linux/smp.h >> index 68123c1fe549..8d817cb80a38 100644 >> --- a/include/linux/smp.h >> +++ b/include/linux/smp.h >> @@ -14,13 +14,16 @@ >> #include

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-03 Thread Huang, Ying
"Huang, Ying" writes: > Peter Zijlstra writes: > [snip] >> diff --git a/include/linux/smp.h b/include/linux/smp.h >> index 68123c1fe549..8d817cb80a38 100644 >> --- a/include/linux/smp.h >> +++ b/include/linux/smp.h >> @@ -14,13 +14,16 @@ >> #include >> >> typedef void

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-03 Thread Huang, Ying
Peter Zijlstra writes: [snip] > diff --git a/include/linux/smp.h b/include/linux/smp.h > index 68123c1fe549..8d817cb80a38 100644 > --- a/include/linux/smp.h > +++ b/include/linux/smp.h > @@ -14,13 +14,16 @@ > #include > > typedef void (*smp_call_func_t)(void *info); >

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-03 Thread Huang, Ying
Peter Zijlstra writes: [snip] > diff --git a/include/linux/smp.h b/include/linux/smp.h > index 68123c1fe549..8d817cb80a38 100644 > --- a/include/linux/smp.h > +++ b/include/linux/smp.h > @@ -14,13 +14,16 @@ > #include > > typedef void (*smp_call_func_t)(void *info); > -struct

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-03 Thread Peter Zijlstra
On Thu, Aug 03, 2017 at 04:35:21PM +0800, Huang, Ying wrote: > diff --git a/include/linux/smp.h b/include/linux/smp.h > index 68123c1fe549..4d3b372d50b0 100644 > --- a/include/linux/smp.h > +++ b/include/linux/smp.h > @@ -13,13 +13,22 @@ > #include > #include > > +#define CSD_ALIGNMENT

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-03 Thread Peter Zijlstra
On Thu, Aug 03, 2017 at 04:35:21PM +0800, Huang, Ying wrote: > diff --git a/include/linux/smp.h b/include/linux/smp.h > index 68123c1fe549..4d3b372d50b0 100644 > --- a/include/linux/smp.h > +++ b/include/linux/smp.h > @@ -13,13 +13,22 @@ > #include > #include > > +#define CSD_ALIGNMENT

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-03 Thread Huang, Ying
Eric Dumazet writes: > On Wed, 2017-08-02 at 16:52 +0800, Huang, Ying wrote: >> From: Huang Ying >> >> struct call_single_data is used in IPI to transfer information between >> CPUs. Its size is bigger than sizeof(unsigned long) and less than >>

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-03 Thread Huang, Ying
Eric Dumazet writes: > On Wed, 2017-08-02 at 16:52 +0800, Huang, Ying wrote: >> From: Huang Ying >> >> struct call_single_data is used in IPI to transfer information between >> CPUs. Its size is bigger than sizeof(unsigned long) and less than >> cache line size. Now, it is allocated with no

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-02 Thread Peter Zijlstra
On Wed, Aug 02, 2017 at 03:18:58AM -0700, Eric Dumazet wrote: > What we can do instead is to force an alignment on 4*sizeof(void *). > (32 bytes on 64bit, 16 bytes on 32bit arches) > > Maybe something like this : > > diff --git a/include/linux/smp.h b/include/linux/smp.h > index >

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-02 Thread Peter Zijlstra
On Wed, Aug 02, 2017 at 03:18:58AM -0700, Eric Dumazet wrote: > What we can do instead is to force an alignment on 4*sizeof(void *). > (32 bytes on 64bit, 16 bytes on 32bit arches) > > Maybe something like this : > > diff --git a/include/linux/smp.h b/include/linux/smp.h > index >

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-02 Thread Eric Dumazet
On Wed, 2017-08-02 at 16:52 +0800, Huang, Ying wrote: > From: Huang Ying > > struct call_single_data is used in IPI to transfer information between > CPUs. Its size is bigger than sizeof(unsigned long) and less than > cache line size. Now, it is allocated with no any

Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-02 Thread Eric Dumazet
On Wed, 2017-08-02 at 16:52 +0800, Huang, Ying wrote: > From: Huang Ying > > struct call_single_data is used in IPI to transfer information between > CPUs. Its size is bigger than sizeof(unsigned long) and less than > cache line size. Now, it is allocated with no any alignment > requirement.

[PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-02 Thread Huang, Ying
From: Huang Ying struct call_single_data is used in IPI to transfer information between CPUs. Its size is bigger than sizeof(unsigned long) and less than cache line size. Now, it is allocated with no any alignment requirement. This makes it possible for allocated

[PATCH 3/3] IPI: Avoid to use 2 cache lines for one call_single_data

2017-08-02 Thread Huang, Ying
From: Huang Ying struct call_single_data is used in IPI to transfer information between CPUs. Its size is bigger than sizeof(unsigned long) and less than cache line size. Now, it is allocated with no any alignment requirement. This makes it possible for allocated call_single_data to cross 2