Re: VM in 2.2.17pre9 : a success ?

Willy Tarreau (willy@novworld.Novecom.Fr)
Thu, 29 Jun 2000 01:06:11 +0200 (CEST)


Hi again,

while reading several files, I found a potential infinite loop in the
shrink_mmap() function (mm/filemap.c). Perhaps conditions make this loop
impossible, I don't know this enough to judge, but I see a loop which looks like

do {
some stuff;
sometimes continue;

count--;

other stuff;
} while(count > 0)

if the condition to contiune is always met, we loop indefinetely. This leads
to the question : is it guaranteed that at least sometimes, the following
3 statements are all false so that none of them continues :

if (atomic_read(&page->count) != 1) continue;
if (PageLocked(page)) continue;
if ((gfp_mask & __GFP_DMA) && !PageDMA(page)) continue;

I wonder about this because my system hanged when I had 0 swap free during
mmap002. Perhaps it was looping here ...

if I'm completely wrong, please excuse me for the noise.

Willy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/