Re: [RFC][PATCH 1/6] Create Critical Page Pool

Matthew Dobson
2005-12-14T16:26:15Z

Rik van Riel wrote:
> On Tue, 13 Dec 2005, Matthew Dobson wrote:
>
>
>>Create the basic Critical Page Pool. Any allocation specifying
>>__GFP_CRITICAL will, as a last resort before failing the allocation, try
>>to get a page from the critical pool. For now, only singleton (order 0)
>>pages are supported.
>
>
> How are you going to limit the number of GFP_CRITICAL
> allocations to something smaller than the number of
> pages in the pool ?

We can't.

> Unless you can do that, all guarantees are off...

Well, I was careful not to use the word guarantee in my post. ;) The idea
is not to offer a 100% guarantee that the pool will never be exhausted.
The idea is to offer a pool that, sized appropriately, offers a very good
chance of surviving your emergency situation. The definition of what is a
critical allocation and what the emergency situation is left intentionally
somewhat vague, so as to offer more flexibility. For our use, certain
networking allocations are critical and our emergency situation is a 2
minute window of potential exreme memory pressure. For others it could be
something completely different, but the expectation is that the emergency
situation would be of a finite time, since the pool is a fixed size.

Thanks!

-Matt