Re: [PATCH 08/17] net: Do not coalesce skbs belonging to PFMEMALLOCsockets

From: Mel Gorman
Date: Wed Jun 20 2012 - 09:36:58 EST


On Wed, Jun 20, 2012 at 02:04:52PM +0200, Eric Dumazet wrote:
> On Wed, 2012-06-20 at 12:44 +0100, Mel Gorman wrote:
> > Commit [bad43ca8: net: introduce skb_try_coalesce()] introduced an
> > optimisation to coalesce skbs to reduce memory usage and cache line
> > misses. In the case where the socket is used for swapping this can result
> > in a warning like the following.
> >
> > [ 110.476565] nbd0: page allocation failure: order:0, mode:0x20
> > [ 110.476568] Pid: 2714, comm: nbd0 Not tainted 3.5.0-rc2-swapnbd-v12r2-slab #3
> > [ 110.476569] Call Trace:
> > [ 110.476573] [<ffffffff811042d3>] warn_alloc_failed+0xf3/0x160
> > [ 110.476578] [<ffffffff81107c92>] __alloc_pages_nodemask+0x6e2/0x930
> >
> > <SNIP
> >
>
>
> This makes absolutely no sense to me.
>
> This patch changes input path, while your stack trace is about output
> path and a packet being fragmented.
>

The intention was to avoid any coalescing in the input path due to avoid
packets that "were held back due to TCP_CORK or attempt at coalescing
tiny packet". I recognise that it is clumsy and will take the approach
instead of having __tcp_push_pending_frames() use sk_gfp_atomic() in the
output path.

Thanks.

--
Mel Gorman
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/