Date: Fri, 13 Apr 2012 20:31:38 +0200 From: Luigi Rizzo <rizzo@iet.unipi.it> To: Adrian Chadd <adrian@freebsd.org> Cc: svn-src-head@freebsd.org, Luigi Rizzo <luigi@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r234228 - head/sys/dev/netmap Message-ID: <20120413183138.GA88823@onelab2.iet.unipi.it> In-Reply-To: <CAJ-VmonaMhCGfw03Zc7GhTf2h_O6pc5gWQa3y=2ndvej5MpASg@mail.gmail.com> References: <201204131632.q3DGWXqj088240@svn.freebsd.org> <CAJ-VmonaMhCGfw03Zc7GhTf2h_O6pc5gWQa3y=2ndvej5MpASg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 13, 2012 at 10:59:59AM -0700, Adrian Chadd wrote: > On 13 April 2012 09:32, Luigi Rizzo <luigi@freebsd.org> wrote: > > Author: luigi > > Date: Fri Apr 13 16:32:33 2012 > > New Revision: 234228 > > URL: http://svn.freebsd.org/changeset/base/234228 > > > > Log: > > ?add the new memory allocator for netmap, which allocates memory > > ?in small clusters instead of one big contiguous chunk. > > ?This was already enabled in the previous commit. > > Hi, > > is there any scope to make this more generic? I can imagine other > parts of the system wanting to use this kind of ring buffer to > userland. well, it is already exported to userland through mmap. Perhaps you want to (a) have the buffers allocated on demand, and yes, this could also be done, either per-interface or globally. For instance the NIOCREGIF ioctl could specify how many buffers you want, and allocate them before you malloc. I still need to make up my mind on what is a good model for sharing buffers among different interfaces. cheers luigi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120413183138.GA88823>