Bug 114139 - mbuf(9) has misleading comments on M_DONTWAIT and M_TRYWAIT
Summary: mbuf(9) has misleading comments on M_DONTWAIT and M_TRYWAIT
Status: Open
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-29 22:00 UTC by James Gritton
Modified: 2018-07-20 11:31 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Gritton 2007-06-29 22:00:11 UTC
The MGET section of mbuf(9) asserts that M_DONTWAIT shouldn't be confused with M_NOWAIT ("they are not the same").  In sys/mbuf.h, they are in fact the same, as M_DONTWAIT is merely defined as M_NOWAIT.

Also, M_TRYWAIT is said to wait for kern.ipc.mbuf_wait ticks, a tunable which apparently no longer exists (and really M_TRYWAIT is just M_WAITOK).
Comment 1 Tom Rhodes freebsd_committer 2008-01-22 16:06:00 UTC
Hi,

I'm not completely sure on the first point, I think the missing
context not copied from mbuf(9) does point out why they are
different.  Compare mbuf.9 to sys/mbuf.h and double check.

For the second point, I sent this patch to another developer for
review:

Index: mbuf.9
===================================================================
RCS file: /home/ncvs/src/share/man/man9/mbuf.9,v
retrieving revision 1.65
diff -u -u -r1.65 mbuf.9
--- mbuf.9	26 Feb 2007 15:17:19 -0000	1.65
+++ mbuf.9	22 Jan 2008 11:52:59 -0000
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD: src/share/man/man9/mbuf.9,v 1.65 2007/02/26 15:17:19 bms Exp $
 .\"
-.Dd February 26, 2007
+.Dd January 22, 2008
 .Dt MBUF 9
 .Os
 .\"
@@ -363,12 +363,8 @@
 .Fa how
 is set to
 .Dv M_TRYWAIT ,
-a failed allocation will result in the caller being put
-to sleep for a designated
-kern.ipc.mbuf_wait
-.Xr ( sysctl 8
-tunable)
-number of ticks.
+a failed allocation will result in the caller blocking until
+resources are available and thus never return NULL.
 A number of other functions and macros related to
 .Vt mbufs
 have the same argument because they may

Thanks,
-- 
Tom Rhodes
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:58:52 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 3 Thanos 2018-07-20 11:31:18 UTC
MARKED AS SPAM