From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 15:37:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AC587958 for ; Wed, 13 Mar 2013 15:37:47 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 0A31AF2A for ; Wed, 13 Mar 2013 15:37:46 +0000 (UTC) Received: (qmail 27386 invoked from network); 13 Mar 2013 16:50:02 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 13 Mar 2013 16:50:02 -0000 Message-ID: <51409D40.5050408@freebsd.org> Date: Wed, 13 Mar 2013 16:37:36 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r248196 - head/sys/nfs References: <201303121219.r2CCJN5Z069789@svn.freebsd.org> <513F3A54.3090702@freebsd.org> <20130312150053.GI48089@FreeBSD.org> <513F4A39.8040107@freebsd.org> <20130312155005.GJ48089@FreeBSD.org> <513F58C0.4050302@freebsd.org> <20130312194936.GL48089@FreeBSD.org> <513F9BC9.3060300@freebsd.org> <20130313151843.GS48089@FreeBSD.org> In-Reply-To: <20130313151843.GS48089@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2013 15:37:47 -0000 On 13.03.2013 16:18, Gleb Smirnoff wrote: > Okay, > > I will redo my patch to make default not to allow > PAGE_SIZE > clusters. Thanks. > On Tue, Mar 12, 2013 at 10:19:05PM +0100, Andre Oppermann wrote: > A> Jumbos always were physically contiguous. That was the very reason for > A> their existence. They were invented to allow early NIC's with limited > A> DMA capabilities to handle jumbo ethernet frames. Today they should only > A> be used for DMA challenged NIC's and nothing else. > > They definitely were not physically contigous prior to r174247. I'm pretty sure they were but implemented differently. Maybe this aspect got lost for a moment during the UMA transition of the mbuf allocator. Otherwise the Tigeon and other early GigE cards wouldn't have worked with jumbo frames on receive. They were not capable of, or very limited, on scatter DMA. For this particular purpose jumbo frames were introduced at the time. I added PAGE_SIZE jumbo frames around 2005 to make use of larger clusters but without getting into DMA and memory fragmentation trouble. > A> > Let me repeat: there is a lot of code, that does handmade allocation of > A> > an mbuf chain of an arbitrary length using mbufs and common clusters. This > A> > code can be cut and use m_getm2(), if we can restrict it to avoid page size > A> > clusters. I don't have time to dig deeper in the code and analyze and test > A> > whether it can support page sized clusters in chains. > A> > A> m_getm2() can be used in any such case and doesn't have to avoid PAGE_SIZE > A> clusters. PAGE_SIZE jumbo clusters are fine. Larger than PAGE_SIZE is not. > A> > A> When the code is able to work with mbuf chains the exact size of each cluster > A> isn't important anymore. We can use the optimal size. > > Do you volunteer to fix if anything is broken? If not, I'd prefer to > be conservative and make m_getm() capable to produce chains without > clusters bigger than MCLBYTES. There is nothing to fix. It works just fine and in fact is in use for all socket i/o (write) for about 6 years since r163916 and 163916. :-) Yes, if there is anything broken with PAGE_SIZE mbuf chains returned by m_getm2() I'm volunteering to fix it. -- Andre