mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat.com>
To: Tejun Heo <tj@kernel.org>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	Steve Wise <swise@opengridcomputing.com>,
	Tom Tucker <tom@opengridcomputing.com>,
	linux-rdma@vger.kernel.org
Subject: Re: [PATCH v1 2/6] amso1100: convert to using idr_alloc_cyclic
Date: Wed, 27 Mar 2013 12:50:23 -0400	[thread overview]
Message-ID: <20130327125023.159e2309@tlielax.poochiereds.net> (raw)
In-Reply-To: <20130327162755.GC7395@htj.dyndns.org>

On Wed, 27 Mar 2013 09:27:55 -0700
Tejun Heo <tj@kernel.org> wrote:

> On Wed, Mar 27, 2013 at 09:18:04AM -0400, Jeff Layton wrote:
> >  void c2_init_qp_table(struct c2_dev *c2dev)
> >  {
> >  	spin_lock_init(&c2dev->qp_table.lock);
> > -	idr_init(&c2dev->qp_table.idr);
> > +	idr_init_cyclic(&c2dev->qp_table.idr, 0);
> >  }
> 
> Why is this necessary?  In general, why is idr_init_cyclic()
> necessary?
> 
> Thanks.
> 

My thinking was that you might want to initialize the "cur" value to an
arbitrary value. All the current users though initialize it to the same
as the "start" value passed into idr_alloc_cyclic. Starting with it at
0 should be fine in all of the existing users.

I'll remove that in v2...

Thanks!
-- 
Jeff Layton <jlayton@redhat.com>

  reply	other threads:[~2013-03-27 16:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-27 13:18 [PATCH v1 0/6] idr: add idr_alloc_cyclic and convert existing cyclic users Jeff Layton
2013-03-27 13:18 ` [PATCH v1 1/6] idr: introduce idr_alloc_cyclic Jeff Layton
2013-03-27 16:25   ` Tejun Heo
2013-03-27 16:48     ` Jeff Layton
2013-03-27 17:01       ` Tejun Heo
2013-03-27 17:21         ` Jeff Layton
2013-03-27 13:18 ` [PATCH v1 2/6] amso1100: convert to using idr_alloc_cyclic Jeff Layton
2013-03-27 16:27   ` Tejun Heo
2013-03-27 16:50     ` Jeff Layton [this message]
2013-03-27 13:18 ` [PATCH v1 3/6] mlx4: " Jeff Layton
2013-03-27 13:18 ` [PATCH v1 4/6] nfsd: convert nfs4_alloc_stid to use idr_alloc_cyclic Jeff Layton
2013-04-03 19:24   ` J. Bruce Fields
2013-03-27 13:18 ` [PATCH v1 5/6] inotify: convert inotify_add_to_idr " Jeff Layton
2013-03-27 13:18 ` [PATCH v1 6/6] sctp: convert sctp_assoc_set_id " Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130327125023.159e2309@tlielax.poochiereds.net \
    --to=jlayton@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=swise@opengridcomputing.com \
    --cc=tj@kernel.org \
    --cc=tom@opengridcomputing.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®