Date: Wed, 22 Jan 2003 16:43:12 -0500 (EST) From: Andrew Gallatin <gallatin@cs.duke.edu> To: arch@FreeBSD.ORG Subject: Re: M_ flags summary. Message-ID: <15919.4208.394911.712558@grasshopper.cs.duke.edu> In-Reply-To: <20030122155457.A77036@unixdaemons.com> References: <20030122023246.GP42333@elvis.mu.org> <20030121224148.A75236@unixdaemons.com> <20030121.222025.101592442.imp@bsdimp.com> <20030122100253.A76397@unixdaemons.com> <0aef01c2c23d$0f1ae690$52557f42@errno.com> <20030122155457.A77036@unixdaemons.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Speaking as the token 3rd party driver vendor, the removal of M_WAITOK/M_TRYWAIT is irritating, but not something that can't be solved with yet another ifdef in my driver. Breaking the 5.0 ABI prior to 5.1 is no big deal to me, as I don't plan to support 5.0-RELEASE anyway, so I don't care what the #defines end up as in the 5.0-STABLE branch. My thoughts are that whether we pronounce it po-ta-to, or po-tat-o, its still a potato and how its pronounced doesn't matter nearly as much as how it tastes. The taste "problem" here is that it always used to be safe to sleep in a process context. That's not true anymore. Now its safe to sleep in a process context if you're not holding any mutexes. So there are pleny of sleepable allocation bugs lurking. If we want to catch sleepable allocation bugs right up front, I suggest we put this: if (!(flags & M_NOWAIT)) { WITNESS_SLEEP(1, NULL); } at the top of malloc, and at the top of all entry points to the mbuf allocator. Eg, before the system has a chance to pull the allocation off of some cache which will succeed 99.5% of the time, except when the system is under memory pressure. Sorry for dragging this in another direction.. Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15919.4208.394911.712558>