Date: Wed, 26 May 2004 15:32:46 -0600 From: Scott Long <scottl@freebsd.org> To: bjohns123@msn.com Cc: freebsd-stable@freebsd.org Subject: Re: KVA Issue? Message-ID: <40B50CFE.8060804@freebsd.org> In-Reply-To: <BAY8-F98XwKHvyo3DjF00034127@hotmail.com> References: <BAY8-F98XwKHvyo3DjF00034127@hotmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
lost inferno wrote: > I was wondering... and thought i'd comment on something i've read... is > there something going on > in the kva area that's bad? (AKA exaustion through malloc routine) I > found something that made me curious, and thought I'd see what you > thought. I'm really debating now about what i should move my production > machines to. They claim to have a patch... > > http://gobsd.com/node/view/39 > > Interested to see what everyone thinks. > Aside from the interesting words in the blog entry, I have a few problems with his patch. First of all, I can't see how it is supposed to fix anything. At line 191 we check to see if kbp->kb_next == NULL and enter a big code block to handle that. At the end of the code block (right before line 245 in his patch), we assign va = kbp->kb_next. So here we know that it is non-null. Why you need to check for it to be NULL is beyond me. But, suppose that it could be NULL. His solution is to return NULL in the M_NOWAIT case and spin in the M_WAITOK case. I assume that the point of spinning is that memory might become free at some later time via it being freed in an interrupt handler or a swapout completing. However, it does nothing to assure that enough interrpts are enable to make sure that this can happen, so the result could easily be that it spins forever. In fact. splmem() is held at that point, which is the same as splhigh(), i.e. all interrupts are blocked. So if this case is reached on a UP system, the only result will be that your get a hard system freeze, not even a panic. Regardless, I'd like to find out from David if he knows of a testable case for this. I'd be happy to entertain further discussion of that. Scott
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40B50CFE.8060804>