Re: [PATCH 1/3] percpu: stop the loop when a cpu belongs to a new group

2013-11-23 Thread Wei Yang
On Fri, Nov 22, 2013 at 06:04:00PM -0500, Tejun Heo wrote: >Hello, > >On Wed, Nov 20, 2013 at 12:51:21AM -0500, Tejun Heo wrote: >> The patch is just extremely marginal. Ah well... why not? I'll apply >> it once -rc1 drops. > >So, I was about to apply this patch but decided against it. It >doesn

Re: [PATCH 1/3] percpu: stop the loop when a cpu belongs to a new group

2013-11-22 Thread Tejun Heo
Hello, On Wed, Nov 20, 2013 at 12:51:21AM -0500, Tejun Heo wrote: > The patch is just extremely marginal. Ah well... why not? I'll apply > it once -rc1 drops. So, I was about to apply this patch but decided against it. It doesn't really make anything better and the code looks worse afterwards.

Re: [PATCH 1/3] percpu: stop the loop when a cpu belongs to a new group

2013-11-19 Thread Wei Yang
On Wed, Nov 20, 2013 at 12:51:21AM -0500, Tejun Heo wrote: >Hello, > >On Wed, Nov 20, 2013 at 11:00:56AM +0800, Wei Yang wrote: >> What do you think about this one? >> >> > >> >From bd70498b9df47b25ff20054e24bb510c5430c0c3 Mon Sep 17 00:00:00 2001 >> >From: Wei Yang >> >Date: Thu, 10 Oct 2013 09:

Re: [PATCH 1/3] percpu: stop the loop when a cpu belongs to a new group

2013-11-19 Thread Tejun Heo
Hello, On Wed, Nov 20, 2013 at 11:00:56AM +0800, Wei Yang wrote: > What do you think about this one? > > > > >From bd70498b9df47b25ff20054e24bb510c5430c0c3 Mon Sep 17 00:00:00 2001 > >From: Wei Yang > >Date: Thu, 10 Oct 2013 09:42:14 +0800 > >Subject: [PATCH] percpu: optimize group assignment wh

Re: [PATCH 1/3] percpu: stop the loop when a cpu belongs to a new group

2013-11-19 Thread Wei Yang
On Mon, Oct 28, 2013 at 11:17:46PM +0800, Wei Yang wrote: >On Mon, Oct 28, 2013 at 07:31:20AM -0400, Tejun Heo wrote: >>Hello, >> >>On Mon, Oct 28, 2013 at 11:00:55AM +0800, Wei Yang wrote: >>> >Does this actually matter? If so, it'd probably make a lot more sense >>> >to start inner loop at @cpu

Re: [PATCH 1/3] percpu: stop the loop when a cpu belongs to a new group

2013-10-28 Thread Wei Yang
On Mon, Oct 28, 2013 at 07:31:20AM -0400, Tejun Heo wrote: >Hello, > >On Mon, Oct 28, 2013 at 11:00:55AM +0800, Wei Yang wrote: >> >Does this actually matter? If so, it'd probably make a lot more sense >> >to start inner loop at @cpu + 1 so that it becomes O(N). >> >> One of the worst case in my

Re: [PATCH 1/3] percpu: stop the loop when a cpu belongs to a new group

2013-10-28 Thread Tejun Heo
Hello, On Mon, Oct 28, 2013 at 11:00:55AM +0800, Wei Yang wrote: > >Does this actually matter? If so, it'd probably make a lot more sense > >to start inner loop at @cpu + 1 so that it becomes O(N). > > One of the worst case in my mind: > > CPU:01234... > Group:

Re: [PATCH 1/3] percpu: stop the loop when a cpu belongs to a new group

2013-10-27 Thread Wei Yang
On Sun, Oct 27, 2013 at 08:30:08AM -0400, Tejun Heo wrote: >On Mon, Oct 21, 2013 at 04:58:11PM +0800, Wei Yang wrote: >> When a cpu belongs to a new group, there is no cpu has the same group id. >> This >> means it can be assigned a new group id without checking with every others. >> >> This patc

Re: [PATCH 1/3] percpu: stop the loop when a cpu belongs to a new group

2013-10-27 Thread Tejun Heo
On Mon, Oct 21, 2013 at 04:58:11PM +0800, Wei Yang wrote: > When a cpu belongs to a new group, there is no cpu has the same group id. This > means it can be assigned a new group id without checking with every others. > > This patch does this optimiztion. Does this actually matter? If so, it'd pr