From owner-freebsd-current@FreeBSD.ORG Wed Jul 23 23:31:42 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE22F4F3; Wed, 23 Jul 2014 23:31:42 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id ADF6C2767; Wed, 23 Jul 2014 23:31:42 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s6NNVfkE085893 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 23 Jul 2014 16:31:41 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s6NNVeVf085892; Wed, 23 Jul 2014 16:31:40 -0700 (PDT) (envelope-from jmg) Date: Wed, 23 Jul 2014 16:31:40 -0700 From: John-Mark Gurney To: Rick Macklem Subject: Re: [RFC] Allow m_dup() to use JUMBO clusters Message-ID: <20140723233139.GR43962@funkthat.com> Mail-Followup-To: Rick Macklem , Hans Petter Selasky , freebsd-net@freebsd.org, freebsd-current@freebsd.org References: <20140708005234.GJ45513@funkthat.com> <1065824414.8871880.1404850207148.JavaMail.root@uoguelph.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1065824414.8871880.1404850207148.JavaMail.root@uoguelph.ca> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Wed, 23 Jul 2014 16:31:41 -0700 (PDT) Cc: Hans Petter Selasky , freebsd-net@freebsd.org, freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 23:31:43 -0000 Rick Macklem wrote this message on Tue, Jul 08, 2014 at 16:10 -0400: > I tried: > m = m_getjcl(M_NOWAIT..M_JUMPAGESIZE); > if (m == NULL) > m = getjcl(M_WAITOK..MCLBYTES); > when I was experimenting with MJUMPAGESIZE clusters for NFS and what happened > was the thread looped in the first m_getjcl() instead of returning NULL. > It is about 12 layers of function calls deep and most fail/return NULL, but > somewhere one of them decides to "try again". I didn't locate the location > of that and don't know if it would be safe to change it so that m_getjcl() > returns NULL for this case. So, I took a quick look at this, and I see a weird issue... In mb_ctor_mbuf in kern_mbuf.c, the how argument is passed to m_init instead of flags... how and flags SHOULD be the same, but it could be that uma could change how to something else and we are loosing _NOWAIT.. Also, m_getjcl is calling two different uma_zalloc_arg's, know which one would be useful... You should be able to verify this w/ dtrace pretty easily in your case.. Brief call path: m_getjcl -> uma_zalloc_arg -> mb_ctor_mbuf -> m_init -> m_pkthdr_init -> mac_mbuf_init -> m_tag_get or mac_mbuf_tag_init... I didn't trace it down beyond mac_mbuf_init.. Verifying that mac_mbuf_init still has M_NOWAIT would be good... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."