lkml.org 
[lkml]   [2008]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5 of 5] xen: Avoid allocations causing swap activity on the resume path
Andrew Morton wrote:
> On Sat, 31 May 2008 10:50:40 +0100 Jeremy Fitzhardinge <jeremy@goop.org> wrote:
>
>> Does __GFP_HIGH necessarily mean that it won't try to
>> do IO to push pages out?
>>
>
> Nope.
>
> __GFP_FS: may enter filesystems
> __GFP_IO: may perform IO
>
> __GFP_IO also means "may do swapout". Even when swap is on a regular
> file. This is because we do all the fs-related operations up-front
> during swapon. So at alloc_pages()-time we can go direct-to-disk-blocks.
>
> So I assume for this application you'll need GFP_NOIO. That's still
> heaps better than GFP_ATOMIC, because it can sleep and wait for kswapd
> to do stuff, and it can reclaim clean pagecache and clean swapcache.
>

OK, I'll respin with GFP_NOIO.

> Whether you should also add __GFP_HIGH to cause the page allocation to
> bite harder into the page reserves is unclear to me, sorry.
>

Well, if the allocation fails the machine is dead in the water, because
it probably can't go on without its devices. I think it's worth eating
to the reserves to avoid that. (I'll have a close look to only add it
to allocations which are really unrecoverable if they fail.)

Thanks,
J


\
 
 \ /
  Last update: 2008-05-31 12:13    [W:0.041 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site