Re: the new VMt

Jamie Lokier
2000-09-25T18:04:54Z

yodaiken@fsmlabs.com wrote:
> > yodaiken@fsmlabs.com wrote:
> > > walk = out;
> > > while(nfds > 0) {
> > > poll_table *tmp = (poll_table *) __get_free_page(GFP_KERNEL);
> > > if (!tmp) {
> >
> > Shouldn't this be GFP_USER? (Which would also conveniently fix the
> > problem Victor's pointing out...)
>
> It should probably be GFP_ATOMIC, if I understand the mm right.

Definitely not. GFP_ATOMIC is reserved for things that really can't
swap or schedule right now. Use GFP_ATOMIC indiscriminately and you'll
have to increase the number of atomic-allocatable pages.

> The algorithm for requesting a collection of reources and freeing all
> of them on failure is simple, fast, and robust.

Allocation is just as fast with GFP_KERNEL/USER, just less likely to
fail and less likely to break something else that really needs
GFP_ATOMIC allocations.

-- Jamie