Date: Wed, 23 Jul 2014 16:31:40 -0700 From: John-Mark Gurney <jmg@funkthat.com> To: Rick Macklem <rmacklem@uoguelph.ca> Cc: Hans Petter Selasky <hps@selasky.org>, freebsd-net@freebsd.org, freebsd-current@freebsd.org Subject: Re: [RFC] Allow m_dup() to use JUMBO clusters Message-ID: <20140723233139.GR43962@funkthat.com> In-Reply-To: <1065824414.8871880.1404850207148.JavaMail.root@uoguelph.ca> References: <20140708005234.GJ45513@funkthat.com> <1065824414.8871880.1404850207148.JavaMail.root@uoguelph.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
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."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140723233139.GR43962>