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

From: John-Mark Gurney <jmg_at_funkthat.com>
Date: Mon, 7 Jul 2014 17:52:34 -0700
Hans Petter Selasky wrote this message on Mon, Jul 07, 2014 at 10:12 +0200:
> I'm asking for some input on the attached m_dup() patch, so that 
> existing functionality or dependencies are not broken. The background 
> for the change is to allow m_dup() to defrag long mbuf chains that 
> doesn't fit into a specific hardware's scatter gather entries, typically 
> when doing TSO.
> 
> In my case the HW limit is 16 entries of length 4K for doing a 64KByte 
> TSO packet. Currently m_dup() is at best producing 32 entries of each 2K 
> for a 64Kbytes TSO packet.
> 
> By allowing m_dup() to get JUMBO clusters when allocating mbufs, we 
> avoid creating a new function, specific to the hardware, to defrag some 
> rare-occurring very long mbuf chains into a mbuf chain below 16 entries.

Please no... Until we get a better allocator, we should not use jumbo
(>page sized) mbufs otherwise we will quickly fail to allocate mbufs
after a machine has been up for a long while causing other failures...

Unless of course if the code fails to allocate the largest cluster it
falls through to trying to allocate the next smaller size, that might
be better...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."
Received on Mon Jul 07 2014 - 22:52:36 UTC

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