Re: [PATCH-v3 1/4] idr: Percpu ida

2013-08-28 Thread Kent Overstreet
On Tue, Aug 20, 2013 at 02:31:57PM -0700, Andrew Morton wrote: On Fri, 16 Aug 2013 23:09:06 + Nicholas A. Bellinger n...@linux-iscsi.org wrote: + /* +* Bitmap of cpus that (may) have tags on their percpu freelists: +* steal_tags() uses this to decide when to steal tags, and

[PATCH] percpu ida: Switch to cpumask_t, add some comments

2013-08-28 Thread Kent Overstreet
Fixup patch, addressing Andrew's review feedback: Signed-off-by: Kent Overstreet k...@daterainc.com --- include/linux/idr.h | 2 +- lib/idr.c | 38 +- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/include/linux/idr.h

Re: [PATCH-v3 1/4] idr: Percpu ida

2013-08-28 Thread Andrew Morton
On Wed, 28 Aug 2013 12:53:17 -0700 Kent Overstreet k...@daterainc.com wrote: + while (1) { + spin_lock(pool-lock); + + /* + * prepare_to_wait() must come before steal_tags(), in case + * percpu_ida_free() on another cpu flips a bit in +

Re: [PATCH] percpu ida: Switch to cpumask_t, add some comments

2013-08-28 Thread Andrew Morton
On Wed, 28 Aug 2013 12:55:17 -0700 Kent Overstreet k...@daterainc.com wrote: Fixup patch, addressing Andrew's review feedback: Looks reasonable. lib/idr.c | 38 +- I still don't think it should be in this file. You say that some as-yet-unmerged

Re: [PATCH-v3 1/4] idr: Percpu ida

2013-08-28 Thread Andrew Morton
On Wed, 28 Aug 2013 13:44:54 -0700 Kent Overstreet k...@daterainc.com wrote: What guarantees that this wait will terminate? It seems fairly clear to me from the break statement a couple lines up; if we were passed __GFP_WAIT we terminate iff we succesfully allocated a tag. If we

Re: [PATCH] percpu ida: Switch to cpumask_t, add some comments

2013-08-28 Thread Andrew Morton
On Wed, 28 Aug 2013 14:00:10 -0700 Kent Overstreet k...@daterainc.com wrote: On Wed, Aug 28, 2013 at 01:25:50PM -0700, Andrew Morton wrote: On Wed, 28 Aug 2013 12:55:17 -0700 Kent Overstreet k...@daterainc.com wrote: Fixup patch, addressing Andrew's review feedback: Looks

Re: [PATCH-v3 1/4] idr: Percpu ida

2013-08-28 Thread Kent Overstreet
On Wed, Aug 28, 2013 at 01:50:42PM -0700, Andrew Morton wrote: On Wed, 28 Aug 2013 13:44:54 -0700 Kent Overstreet k...@daterainc.com wrote: What guarantees that this wait will terminate? It seems fairly clear to me from the break statement a couple lines up; if we were passed

Re: [PATCH-v3 1/4] idr: Percpu ida

2013-08-28 Thread Andrew Morton
On Wed, 28 Aug 2013 14:12:17 -0700 Kent Overstreet k...@daterainc.com wrote: How's this look? diff --git a/lib/idr.c b/lib/idr.c index 15c021c..a3f8e9a 100644 --- a/lib/idr.c +++ b/lib/idr.c @@ -1288,6 +1288,11 @@ static inline unsigned alloc_local_tag(struct percpu_ida *pool, * Safe

Re: [PATCH] percpu ida: Switch to cpumask_t, add some comments

2013-08-28 Thread Kent Overstreet
On Wed, Aug 28, 2013 at 02:10:19PM -0700, Andrew Morton wrote: On Wed, 28 Aug 2013 14:00:10 -0700 Kent Overstreet k...@daterainc.com wrote: On Wed, Aug 28, 2013 at 01:25:50PM -0700, Andrew Morton wrote: On Wed, 28 Aug 2013 12:55:17 -0700 Kent Overstreet k...@daterainc.com wrote:

Re: [PATCH] percpu ida: Switch to cpumask_t, add some comments

2013-08-28 Thread Andrew Morton
On Wed, 28 Aug 2013 14:23:58 -0700 Kent Overstreet k...@daterainc.com wrote: I found things to be quite the opposite - it took 5 minutes of staring, head-scratching, double-checking and penny-dropping before I was confident that the newly-added code actually has nothing at all to do with