[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGTjWtApo4WgPjPsRxpjJBjLrcXHr=SdDq_ryuHDwRnZHvjrng@mail.gmail.com>
Date: Tue, 10 Jan 2012 17:42:24 -0800
From: Mike Waychison <mikew@...gle.com>
To: Rusty Russell <rusty@...tcorp.com.au>
Cc: "Michael S. Tsirkin" <mst@...hat.com>, netdev@...r.kernel.org,
earhart@...gle.com, virtualization@...ts.linux-foundation.org,
digitaleric@...gle.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/3] virtio_net: Split receive buffer alloc/add
On Tue, Jan 10, 2012 at 5:30 PM, Rusty Russell <rusty@...tcorp.com.au> wrote:
> On Tue, 10 Jan 2012 09:41:01 -0800, Mike Waychison <mikew@...gle.com> wrote:
>> In preparation for allocating receive buffers in the slow path without
>> disabling NAPI, split the allocation and addition of receive buffers
>> apart into two separate functions (per receive buffer type).
>>
>> While here, move the vi->num accounting into the add functions.
>>
>> Signed-off-by: Mike Waychison <mikew@...gle.com>
>
> Hi Mike...
>
> This exposes a nasty ugliness in the way virtio_net works. We
> allocate an skbuff for the small packet case, and just allocate the
> pages for the large packet cases, and alloc the skbuff when we fill the
> pages.
>
> I think all the allocators should return a populated skbuff;
> this uses a bit more memory in theory, but should make the code simpler.
> As an added bonus, your life should get much simpler for these patches.
>
> I'll try to create such a patch tonight, but I'm busy finalizing my
> linux.conf.au presentation, so it might take longer :(
>
This seems reasonable for the "big" receive buffers, but I don't think
it makes a lot of sense for "mergeable" receive buffers as best I can
tell. Hopefully making this work isn't too hard though :)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists