[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090116065107.GA4170@ff.dom.local>
Date: Fri, 16 Jan 2009 06:51:08 +0000
From: Jarek Poplawski <jarkao2@...il.com>
To: Willy Tarreau <w@....eu>
Cc: David Miller <davem@...emloft.net>, herbert@...dor.apana.org.au,
zbr@...emap.net, dada1@...mosbay.com, ben@...s.com, mingo@...e.hu,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
jens.axboe@...cle.com
Subject: Re: [PATCH] tcp: splice as many packets as possible at once
On Fri, Jan 16, 2009 at 12:44:08AM +0100, Willy Tarreau wrote:
> On Fri, Jan 16, 2009 at 12:42:55AM +0100, Willy Tarreau wrote:
> > On Thu, Jan 15, 2009 at 03:34:49PM -0800, David Miller wrote:
> > > From: Herbert Xu <herbert@...dor.apana.org.au>
> > > Date: Fri, 16 Jan 2009 10:32:05 +1100
> > >
> > > > On Thu, Jan 15, 2009 at 03:26:08PM -0800, David Miller wrote:
> > > > > +static inline struct page *linear_to_page(struct page *page, unsigned int len,
> > > > > + unsigned int offset)
> > > > > +{
> > > > > + struct page *p = alloc_pages(GFP_KERNEL, 0);
> > > > > +
> > > > > + if (!p)
> > > > > + return NULL;
> > > > > + memcpy(page_address(p) + offset, page_address(page) + offset, len);
> > > >
> > > > This won't work very well if skb->head is longer than a page.
> > > >
> > > > We'll need to divide it up into individual pages.
> > >
> > > Oh yes the same bug I pointed out the other day.
> > >
> > > But Willy can test this patch as-is,
> >
> > Hey, nice work Dave. +3% performance from your previous patch
> > (31.6 MB/s). It's going fine and stable here.
>
> And BTW feel free to add my Tested-by if you want in case you merge
> this fix.
>
> Willy
>
Herbert, good catch!
David, if it's not too late I think more credits are needed,
especially for Willy. He did "a bit" more than testing.
Alas, I can't see this problem with skb->head longer than page. There
is even some comment on this in __splice_segment(), but I can miss
something.
I'm more concerned with memory usage if these skbs are not acked for
some reason. Isn't there some DOS issue possible?
Thanks everybody,
Jarek P.
--------->
Based on a review by Changli Gao <xiaosuo@...il.com>:
http://lkml.org/lkml/2008/2/26/210
Foreseen-by: Changli Gao <xiaosuo@...il.com>
Diagnosed-by: Willy Tarreau <w@....eu>
Reported-by: Willy Tarreau <w@....eu>
Fixed-by: Jens Axboe <jens.axboe@...cle.com>
Signed-off-by: Jarek Poplawski <jarkao2@...il.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists