From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754666AbZBDAqq (ORCPT ); Tue, 3 Feb 2009 19:46:46 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753091AbZBDAqe (ORCPT ); Tue, 3 Feb 2009 19:46:34 -0500 Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:32806 "EHLO sunset.davemloft.net" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751088AbZBDAqd (ORCPT ); Tue, 3 Feb 2009 19:46:33 -0500 Date: Tue, 03 Feb 2009 16:46:30 -0800 (PST) Message-Id: <20090203.164630.173080148.davem@davemloft.net> To: herbert@gondor.apana.org.au Cc: zbr@ioremap.net, jarkao2@gmail.com, w@1wt.eu, 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 v2] tcp: splice as many packets as possible at once From: David Miller In-Reply-To: <20090203112431.GA8746@gondor.apana.org.au> References: <20090203094108.GA4639@ff.dom.local> <20090203111012.GA16878@ioremap.net> <20090203112431.GA8746@gondor.apana.org.au> X-Mailer: Mew version 6.1 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Herbert Xu Date: Tue, 3 Feb 2009 22:24:31 +1100 > Not necessarily. Even if the hardware can only DMA into contiguous > memory, we can always allocate a sufficient number of contiguous > buffers initially, and then always copy them into fragmented skbs > at receive time. This way the contiguous buffers are never > depleted. > > Granted copying sucks, but this is really because the underlying > hardware is badly designed. Also copying is way better than > not receiving at all due to memory fragmentation. This scheme sounds very reasonable.