From: Steve Wise <swise@opengridcomputing.com>
To: Tom Tucker <tom@opengridcomputing.com>
Cc: Andrew Morton <akpm@osdl.org>,
rdreier@cisco.com, mshefty@ichips.intel.com,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
openib-general@openib.org
Subject: Re: [PATCH v2 4/7] AMSO1100 Memory Management.
Date: Fri, 16 Jun 2006 09:20:31 -0500 [thread overview]
Message-ID: <1150467631.29508.11.camel@stevo-desktop> (raw)
In-Reply-To: <1150128349.22704.20.camel@trinity.ogc.int>
On Mon, 2006-06-12 at 11:05 -0500, Tom Tucker wrote:
> On Thu, 2006-06-08 at 01:17 -0700, Andrew Morton wrote:
> > On Wed, 07 Jun 2006 15:06:55 -0500
> > Steve Wise <swise@opengridcomputing.com> wrote:
> >
> > >
> > > +void c2_free(struct c2_alloc *alloc, u32 obj)
> > > +{
> > > + spin_lock(&alloc->lock);
> > > + clear_bit(obj, alloc->table);
> > > + spin_unlock(&alloc->lock);
> > > +}
> >
> > The spinlock is unneeded here.
>
> Good point.
>
> >
> >
> > What does all the code in this file do, anyway? It looks totally generic
> > (and hence inappropriate for drivers/infiniband/hw/amso1100/) and somewhat
> > similar to idr trees, perhaps.
> >
>
> We mimicked the mthca driver. It may be code that should be replaced
> with Linux core services for new drivers. We'll investigate.
>
The code in this file implements 2 sets of services:
1) allocating unique qp identifiers (type integer). This is the
c2_alloc struct and functions.
2) maintaining a sparsely allocated array of ptrs indexed by the qp
identifier. This allows for quick mapping to the qp structure ptr given
the qp identifier. This is the c2_array struct and functions.
I believe I can use an IDR tree to provide both of these services.
Steve.
next prev parent reply other threads:[~2006-06-16 14:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-07 20:06 [PATCH v2 0/7][RFC] Ammasso 1100 iWARP Driver Steve Wise
2006-06-07 20:06 ` [PATCH v2 1/7] AMSO1100 Low Level Driver Steve Wise
2006-06-07 20:06 ` [PATCH v2 2/7] AMSO1100 WR / Event Definitions Steve Wise
2006-06-07 20:06 ` [PATCH v2 3/7] AMSO1100 OpenFabrics Provider Steve Wise
2006-06-07 20:06 ` [PATCH v2 4/7] AMSO1100 Memory Management Steve Wise
2006-06-08 8:17 ` Andrew Morton
2006-06-12 16:05 ` Tom Tucker
2006-06-16 14:20 ` Steve Wise [this message]
2006-06-17 3:59 ` Nick Piggin
2006-06-07 20:06 ` [PATCH v2 5/7] AMSO1100 Message Queues Steve Wise
2006-06-07 20:07 ` [PATCH v2 6/7] AMSO1100: Privileged Verbs Queues Steve Wise
2006-06-07 20:07 ` [PATCH v2 7/7] AMSO1100 Makefiles and Kconfig changes Steve Wise
2006-06-07 20:39 ` [PATCH v2 2/7] AMSO1100 WR / Event Definitions Steve Wise
2006-06-07 20:43 ` Roland Dreier
2006-06-07 20:59 ` Steve Wise
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=1150467631.29508.11.camel@stevo-desktop \
--to=swise@opengridcomputing.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mshefty@ichips.intel.com \
--cc=netdev@vger.kernel.org \
--cc=openib-general@openib.org \
--cc=rdreier@cisco.com \
--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;
as well as URLs for NNTP newsgroup(s).