summaryrefslogtreecommitdiffstats
path: root/sys/sys/mbuf.h
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2004-08-02 00:18:36 +0000
committergreen <green@FreeBSD.org>2004-08-02 00:18:36 +0000
commit9532ab7116a36e60ae15ec463c757a7d2e7f9b39 (patch)
treeff53102435294d83e0ddcbd011824aa65f84e3c8 /sys/sys/mbuf.h
parent14a50c4ac0247a8950847156b4fc16cf935c14ca (diff)
downloadFreeBSD-src-9532ab7116a36e60ae15ec463c757a7d2e7f9b39.zip
FreeBSD-src-9532ab7116a36e60ae15ec463c757a7d2e7f9b39.tar.gz
* Add a "how" argument to uma_zone constructors and initialization functions
so that they know whether the allocation is supposed to be able to sleep or not. * Allow uma_zone constructors and initialation functions to return either success or error. Almost all of the ones in the tree currently return success unconditionally, but mbuf is a notable exception: the packet zone constructor wants to be able to fail if it cannot suballocate an mbuf cluster, and the mbuf allocators want to be able to fail in general in a MAC kernel if the MAC mbuf initializer fails. This fixes the panics people are seeing when they run out of memory for mbuf clusters. * Allow debug.nosleepwithlocks on WITNESS to be disabled, without changing the default. Both bmilekic and jeff have reviewed the changes made to make failable zone allocations work.
Diffstat (limited to 'sys/sys/mbuf.h')
-rw-r--r--sys/sys/mbuf.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index 1056ceb..a1fa6c8 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -72,7 +72,6 @@
*/
struct mb_args {
int flags; /* Flags for mbuf being allocated */
- int how; /* How to allocate: M_WAITOK or M_DONTWAIT */
short type; /* Type of mbuf being allocated */
};
#endif /* _KERNEL */
@@ -343,7 +342,6 @@ m_get(int how, short type)
struct mb_args args;
args.flags = 0;
- args.how = how;
args.type = type;
return (uma_zalloc_arg(zone_mbuf, &args, how));
}
@@ -357,7 +355,6 @@ m_getclr(int how, short type)
struct mb_args args;
args.flags = 0;
- args.how = how;
args.type = type;
m = uma_zalloc_arg(zone_mbuf, &args, how);
if (m != NULL)
@@ -372,7 +369,6 @@ m_gethdr(int how, short type)
struct mb_args args;
args.flags = M_PKTHDR;
- args.how = how;
args.type = type;
return (uma_zalloc_arg(zone_mbuf, &args, how));
}
@@ -384,7 +380,6 @@ m_getcl(int how, short type, int flags)
struct mb_args args;
args.flags = flags;
- args.how = how;
args.type = type;
return (uma_zalloc_arg(zone_pack, &args, how));
}
OpenPOWER on IntegriCloud