On Tue, Mar 02, 2010 at 10:18:27PM +1100, Nick Piggin wrote:[...]On Tue, Mar 02, 2010 at 11:01:50AM +0000, Mel Gorman wrote:On Tue, Mar 02, 2010 at 09:36:46PM +1100, Nick Piggin wrote:On Tue, Mar 02, 2010 at 10:04:02AM +0000, Mel Gorman wrote:On Tue, Mar 02, 2010 at 05:52:25PM +1100, Nick Piggin wrote:
>>If processes are asleep on the waitqueue, reclaim must be active (by kswapdWe could check further in theI don't think it would be too rare. Things can get freed up and
slow-path but I bet it'd be very rare that the logic would be triggered. For
a process to enter the FIFO due to waiters that were not yet woken up, the
system would have to be a) under heavy memory pressure b) reclaim taking such
a long time that check_zone_pressure() is not being called in time and c)
a process exiting or otherwise freeing memory such that the watermarks are
cleared without reclaim being involved.
other allocations come in while reclaim is happening. But anyway
the nasty thing about the "rare" events is that they do add a
rare source of unexpected latency or starvation.
if nothing else). If pages are getting freed above the necessary watermark,
then the processes will be woken up when the current shrink_zone() finished
unless unfair processes are keeping the zone below watermarks. But unless
reclaim is taking an extraordinary long length of time, there would be little
difference between waking the queue in the free path and waking it in the
Reclaim can take quite a while, yes.