Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Aug 2002 16:41:36 -0400
From:      Bosko Milekic <bmilekic@unixdaemons.com>
To:        Andrew Gallatin <gallatin@cs.duke.edu>
Cc:        ken@freebsd.org, freebsd-net@freebsd.org
Subject:   Re: Jumbo Clusters in mb_alloc
Message-ID:  <20020809164136.A88798@unixdaemons.com>
In-Reply-To: <15700.9669.885383.727182@grasshopper.cs.duke.edu>; from gallatin@cs.duke.edu on Fri, Aug 09, 2002 at 04:27:49PM -0400
References:  <20020809151627.A88180@unixdaemons.com> <15700.9669.885383.727182@grasshopper.cs.duke.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

On Fri, Aug 09, 2002 at 04:27:49PM -0400, Andrew Gallatin wrote:
> 
> Bosko Milekic writes:
>  > 
>  > Hi guys,
>  > 
>  >     Can you put this (the attached) to use?
>  > 
>  >     It's the implementation of jumbo clusters within mb_alloc, as
>  >     discussed on -net not too long ago.
>  > 
>  >     I have not written the allocation interface yet as I would like to
>  >     know if you could put them to use in some of the drivers, and also
>  >     what you would need from the interface.
> 
> I can certainly use this in my (3rd party) GM Myrinet driver.
> 
> I think the tigon driver can be made to use this, but I have no tigon
> hardware anymore.  I also think bge could be made to use this, but
> again, no hardware to play with it on.

  Excellent.

  So the question is what do you think would be a convenient interface?
  This really boils down to how you plan to use it.  I'm assuming that,
  for example, you can do scatter DMA to each page (each buffer spans
  /at most/ 3 pages, and only 2 pages on alpha) in the driver receive
  code.  So, assuming that's the case, we can provide an allocation
  routine, something like m_getjmb() that will give you an mbuf and a
  jumbo buf in one shot.  Then you can extract the physical addresses
  from the parts of the data region and scatter DMA to it.  The buffers
  with the mbuf would be easily freed with m_freem().

  What about the send case, though?  How do you want to determine
  whether or not to use a jumbo cluster or a regular cluster?  Do you
  plan to do zero-copy with these things?  I don't think this would be
  possible because, as discussed, not all of them start at
  page-boundaries.  Nonetheless, they will allow you to do
  scatter/gather and provide you with a consistent interface for it.

  I guess what I'm trying to get is an idea of what kind of interface
  you would like to have, as you probably know what you need/what would
  be useful much better than I do.  Getting mb_alloc to allocate them
  was fairly trivial, as you can see.

> Drew

Cheers,
-- 
Bosko Milekic * bmilekic@unixdaemons.com * bmilekic@FreeBSD.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020809164136.A88798>