Re: [PATCH]: Cleanup of __alloc_pages

Andrew Morton
2005-11-13T07:12:11Z

Paul Jackson <pj@sgi.com> wrote:
>
> fs/xfs/linux-2.6/xfs_buf.c has:
> aentry = kmalloc(sizeof(a_list_t), GFP_ATOMIC & ~__GFP_HIGH);

That's a reasonable thing to do, actually.

GFP_ATOMIC means "don't sleep" (!__GFP_WAIT) and "use emergency pools"
(__GFP_HIGH).

XFS is saying "don't sleep" and "don't use the emergency pools".

Yes, the fact that GFP_ATOMIC also implies "use the emergency pool" is
unfortunate, and perhaps the two should always have been separated out, at
least to make the programmer think about whether the code really needs
access to the emergency pools. Usually it does.

But I haven't seen much sign that it's causing any problems.