Re: [RFC] Allow m_dup() to use JUMBO clusters

From: John-Mark Gurney <jmg_at_funkthat.com>
Date: Wed, 23 Jul 2014 16:31:40 -0700
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."
Received on Wed Jul 23 2014 - 21:31:42 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:51 UTC