Rik van Riel wrote: > > On Sun, 27 May 2001, Manfred Spraul wrote: > > > > if (z->free_pages < z->pages_min / 4 && > > > - !(current->flags & PF_MEMALLOC)) > > > + (in_interrupt() || !(current->flags & PF_MEMALLOC))) > > > continue; > > > > It's 'if (in_interrupt()) continue', not 'if (in_interrupt()) alloc'. > > Currently a network card can allocate the last few pages if the > > interrupt occurs in the context of the PF_MEMALLOC thread. I think > > PF_MEMALLOC memory should never be available to interrupt handlers. > > You're right, my mistake. > Ok, then the attached patch should be ok [SMP safe 'memory_pressure--' + the change above]. I've moved the modified memory_pressure calculation into my 'not_now' folder - not enough time for proper testing, and the change definitively needs thorough testing. We should take into account that the current page owner can reactivage a page, i.e. nr_inactive_{dirty,clean}_pages overestimates the number of really inactive pages in these lists. My modified memory_pressure calculation would be one way to implement that. -- Manfred