[openib-general] [Fwd: RE: Use of dapl_ring_buffer in KDAPL !]

Caitlin Bestler caitlin.bestler at gmail.com
Wed May 25 17:10:07 PDT 2005


My recollection is that one of the original design factors
for the ring_buffers was that they are invoked from "common"
code (i.e., user or kernel mode). In user mode, the atomics
can be more efficient than safely updating two linked lists
in a multi-threaded environment.

That benefit may have been largely negated by the decision
to use dynamic memory allocation though.

The third reason was to minimize OS dependencies, which
is obviously no longer a factor when coding inside the kernel.

In any event, if none of the code using these routines will
ever be compiled in user mode then there are no remaining
motivations for a specialized ring buffer. If any of the code
will still be common between uDAPL and kDAPL then care
should be taken to ensure that the ring buffer substitution
is transparent to the caller and/or works in user mode.

On 5/25/05, Tom Duffy <tduffy at sun.com> wrote:
> Moving this discussion on list since more people might know of a way to
> do this with already existing linux primitives.
> 
> -tduffy
> 
> 
> 
> ---------- Forwarded message ----------
> From: James Lentini <jlentini at netapp.com>
> To: Tom Duffy <Tom.Duffy at Sun.COM>
> Date: Wed, 25 May 2005 15:05:42 -0400 (EDT)
> Subject: RE: Use of dapl_ring_buffer in KDAPL !
> 
> The original idea was that the ring buffer would perform better than
> other data structures because it used atomic operations. I don't
> believe that this theory was ever validated though.
> 
> Two ring buffers were used because there are two different classes of
> events stored: free events and pending events.
> 
> If their is a native linux data structure that provides equivalent
> functionality, dapl should use it.
> 
> james
> 
> On Tue, 24 May 2005, Tom Duffy wrote:
> 
> > On Wed, 2005-05-25 at 00:09 +0300, Itamar Rabenstein wrote:
> >> I just relised that we can implemet it with 2 lists empty_list and
> >> events_list where the events_list will be pop from head and pust at
> >> tail
> >>
> >> no need for dapl_ring_buffer
> >>
> >> What do you think ?
> >>
> >
> > Since the llists in Linux are doubly linked and circular and they have
> > the ability to act like a stack or a queue, I think they should suffice.
> >
> > -tduffy
> >
> > P.S.  Any reason not to CC the list?
> >
> 
> 
> BodyID:12856038.5.n.logpart (stored separately)
> 
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
> 
>



More information about the general mailing list