Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757905AbZAPGvg (ORCPT ); Fri, 16 Jan 2009 01:51:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754493AbZAPGvR (ORCPT ); Fri, 16 Jan 2009 01:51:17 -0500 Received: from mail-ew0-f31.google.com ([209.85.219.31]:43826 "EHLO mail-ew0-f31.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755320AbZAPGvP (ORCPT ); Fri, 16 Jan 2009 01:51:15 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=Y5D3X0MAVHA0szf+r1fLbl3ERtk3oKDQnSDNnswaxGO29ydIuqrj97hBnM0UHnuO6U TflfYDs19nGBlWOSIMtDsvVSGn/auhhrPLXKOuIKJNxEjmFHcRPj0D+qr2UFsYQtgks5 H2r4yegmyjg8CqI3r741NjHwDpe5tyZhi/nQ0= Date: Fri, 16 Jan 2009 06:51:08 +0000 From: Jarek Poplawski To: Willy Tarreau Cc: David Miller , herbert@gondor.apana.org.au, zbr@ioremap.net, dada1@cosmosbay.com, ben@zeus.com, mingo@elte.hu, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, jens.axboe@oracle.com Subject: Re: [PATCH] tcp: splice as many packets as possible at once Message-ID: <20090116065107.GA4170@ff.dom.local> References: <20090115231934.GA8328@gondor.apana.org.au> <20090115.152608.89323697.davem@davemloft.net> <20090115233205.GA8474@gondor.apana.org.au> <20090115.153449.204259387.davem@davemloft.net> <20090115234255.GE1123@1wt.eu> <20090115234408.GA1693@1wt.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090115234408.GA1693@1wt.eu> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2184 Lines: 61 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 > > > 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 : http://lkml.org/lkml/2008/2/26/210 Foreseen-by: Changli Gao Diagnosed-by: Willy Tarreau Reported-by: Willy Tarreau Fixed-by: Jens Axboe Signed-off-by: Jarek Poplawski -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/