Messages in this thread |  | | Date | Mon, 25 Sep 2000 09:17:54 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: refill_inactive() |
| |
On Mon, 25 Sep 2000, Rik van Riel wrote: > > Hmmm, doesn't GFP_BUFFER simply imply that we cannot > allocate new buffer heads to do IO with??
No.
New buffer heads would be ok - recursion is fine in theory, as long as it is bounded, and we might bound it some other way (I don't think we _should_ do recursion here due to the stack limit, but at least it's not a fundamental problem).
The fundamental problem is that GFP_BUFFER allocations are often done with some critical filesystem lock held. Which means that we cannot call down to the filesystem to free up memory.
The name is a misnomer, partly due to historical reasons (the buffer cache used to be fragile, and if you free'd buffer cache pages while you were trying to allocate new ones you could cause BadThings(tm) to happen), but partly just because the only _user_ of it is the buffer cache.
In theory, filesystems could use it for any other allocations that they do, but in practice they don't, and the only allocations they do in critical regions is the buffer allocation. And as this thread has discussed, even that is really more of a bug than a feature.
Linus
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |