Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756668AbYLJVpn (ORCPT ); Wed, 10 Dec 2008 16:45:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755968AbYLJVpH (ORCPT ); Wed, 10 Dec 2008 16:45:07 -0500 Received: from netgear.net.ru ([195.178.208.66]:32869 "EHLO tservice.net.ru" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1755656AbYLJVpE (ORCPT ); Wed, 10 Dec 2008 16:45:04 -0500 Date: Thu, 11 Dec 2008 00:45:00 +0300 From: Evgeniy Polyakov To: Vladislav Bolkhovitin Cc: linux-scsi@vger.kernel.org, James Bottomley , Andrew Morton , FUJITA Tomonori , Mike Christie , Jeff Garzik , Boaz Harrosh , Linus Torvalds , linux-kernel@vger.kernel.org, scst-devel@lists.sourceforge.net, Bart Van Assche , "Nicholas A. Bellinger" , netdev@vger.kernel.org Subject: Re: [PATCH][RFC 23/23]: Support for zero-copy TCP transmit of user space data Message-ID: <20081210214500.GA24212@ioremap.net> References: <494009D7.4020602@vlnb.net> <494012C4.7090304@vlnb.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <494012C4.7090304@vlnb.net> User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2234 Lines: 47 Hi Vladislav. On Wed, Dec 10, 2008 at 10:04:36PM +0300, Vladislav Bolkhovitin (vst@vlnb.net) wrote: > In the chosen approach new optional field void *net_priv was added to > struct page. It is enclosed by There is a huge no-no in networking land on increasing skb. Reason is simple every skb will carry potentially unneded data as long as given option is enabled, and most of the time it will. To break this barrier one has to have (I wanted to write ego, but then decided to replace it with mojo) so huge reason to do this, that it is almost impossible to have. Something tells me that increasing page structure with 8 bytes because of zero-copy iscsi transfer is not that great idea, since basically every user out there will have it enabled in the distro config and will waste noticeble amount of ram. The same problem of not sending any kind of notification to the user when his pages are 'acked' by receiving some packet or freeing the data exists long ago and was tried to be fixed several times. The most applicable to your case maybe DST experience. DST is a block layer device and all its pages starting from quite recent kernels are not allowed to be slab ones (xfs was the last one who provided slab pages in the bios), so each page has two 'unused' pointers in lru list entry, which you may reuse. If scsi layer may have slab pages from some place (although this does not sound like a good idea, ->sendpage() will bug on on them anyway), this hack will not work, otherwise you only need to have net_page_get/put stuff in and do not mess with increasing page. And this was tested 3-4 kernel releases ago, so things may be changed. Another appropach is to increase skb's shared data (at the end of the skb->data), and this approach was not frowned upon too much either, but it requires to mess with skb->destructor, which may not be appropriate in some cases. If iscsi does not use sockets (it does iirc), things are much simpler. Hope this helps. -- Evgeniy Polyakov -- 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/