Date:        Tue, 12 Sep 2000 04:23:05 -0300 (BRST)
   From: Rik van Riel <[EMAIL PROTECTED]>

   I've just uploaded a new snapshot of my new VM for
   2.4 to my home page, this version contains a
   wakeup_kswapd() function (copied from wakeup_bdflush)
   and should balance memory a bit better.

How can drop_behind() work properly?

You do not recompute the hash chain head for each decreasing 'index'
in the main while loop, and thus you search potentially the wrong hash
chain each time.

Thus, you need to change:

+               page = __find_page_nolock(mapping, index, *hash);

to something more like:

+               hash = page_hash(mapping, index);
+               page = __find_page_nolock(mapping, index, *hash);

and remove the now-spurious local variable initialization of
'hash' at the top of this function.

Also, why this?

+               page = NULL;

That's spurious, you set it on the next line, probably this is
from some older revision of this function :-)

Later,
David S. Miller
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to