get_user_pages question

From: Eli Cohen
Date: Sat May 01 2004 - 06:15:50 EST


Hi,
I have been tryin to use get_user_pages() on malloced memory and get the list of pages but it does not work as
I expected:
1. malloc a buffer in user space
2. issue ioctl, invoke get_user_pages() and save the page descriptors I obtained.
3. at a later time, issue another ioctl, invoke get_user_pages() again and save another copy of the page descriptors.
4. Compare the two lists of page descriptors. They're not all the same.

Apparently some pages were discarded and the subsequent page fault brought a new page. I expected the original page to be in the swap cache and get the old page again. I repeated the experiment but before the first ioctl I wrote something to all the pages but got the same results. I used 2.4.21-4 (RH AS 3.0).

Can anyone clarify?
thanks
Eli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/