Bosko Milekic 185c2244ce o Introduce new m_getcl() interface routine that allocates an mbuf
and a cluster in one shot.
o Introduce MBP_PERSIST and MBP_PERSISTENT control bits to mb_alloc();
  MBP_PERSIST means "if you can allocate, then keep the cache lock
  held on exit," and MBP_PERSISTENT means "a cache lock is alredy held
  on entry, so allocate from the specified (already locked) cache."
  They may be used in combination.
o m_getcl() uses the MBP_PERSIST/MBP_PERSISTENT interface so that it
  doesn't drop the cache lock in between the mbuf and cluster allocations.
o m_getm(), which takes a size and allocates an mbuf + cluster "best fit"
  chain, has been moved from uipc_mbuf.c to subr_mbuf.c and shown how to
  use MBP_PERSIST/MBP_PERSISTENT to attempt to do a grouped allocation
  without dropping the cache lock in between.

Why this is good: much less bus-locked lock acquires/drops when they're
not needed.  Also, prototype for m_getcl():
struct mbuf * m_getcl(int how, short type, int flags);
"how" and "type" are self-explanatory.  "flags" may be M_PKTHDR, in
which case m_getcl() will make the mbuf a pkthdr-mbuf.

While I'm in subr_mbuf.c:
o Every exported routine now has a nice comment with a description of
  the expected arguments.  Eventually, mbuf(9) needs to be re-vamped
  but there's still more code to write/finalize before I get to that.
o internal macros have been changed a bit.
o consistently use 'short' for "type."  This somehow slipped through
  before (that 'type' was sometimes declared as int).

Alfred has been pushing for the MBP_PERSIST{,ENT} thing for almost a
year now.  Luigi asked for m_getcl(), and will probably MFC that
part of this commit.

TODO [Related]: teach mb_free() about MBP_PERSIST{, ENT}.
2002-07-15 15:32:59 +00:00
..
2002-07-06 07:00:01 +00:00
2002-07-06 07:00:01 +00:00
2002-06-29 17:26:22 +00:00
2002-07-14 08:29:15 +00:00
2002-06-29 17:26:22 +00:00
2002-06-29 17:26:22 +00:00
2002-06-29 00:29:12 +00:00
2002-06-29 17:26:22 +00:00
2002-06-29 02:00:02 +00:00
2002-06-29 02:00:02 +00:00
2002-06-29 02:00:02 +00:00
2002-06-29 02:00:02 +00:00
2002-06-29 17:26:22 +00:00
2002-06-29 02:00:02 +00:00
2002-06-29 02:00:02 +00:00
2002-06-29 02:00:02 +00:00
2002-06-29 17:26:22 +00:00
2002-06-29 17:26:22 +00:00
2002-07-13 04:09:45 +00:00
2002-06-29 17:26:22 +00:00
2002-07-13 04:37:22 +00:00
2002-06-29 00:29:12 +00:00
2002-06-29 00:29:12 +00:00
2002-06-29 00:29:12 +00:00
2002-06-28 23:17:36 +00:00
2002-06-28 23:17:36 +00:00