All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eli Cohen <mlxk@mellanox.co.il>
To: linux-kernel@vger.kernel.org
Subject: get_user_pages question
Date: Sat, 01 May 2004 14:12:24 +0300	[thread overview]
Message-ID: <40938618.1090100@mellanox.co.il> (raw)

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

             reply	other threads:[~2004-05-01 11:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-01 11:12 Eli Cohen [this message]
2004-05-01 11:32 ` get_user_pages question Arjan van de Ven
2004-05-01 11:41   ` Eli Cohen
2009-11-09  6:50 Mark Veltzer
2009-11-09  9:31 ` Andi Kleen
2009-11-09 10:32   ` Hugh Dickins
2009-11-09 22:13     ` Mark Veltzer
2009-11-10 16:33       ` Hugh Dickins
2009-11-28 18:50         ` Andrea Arcangeli
2009-11-28 22:22           ` Mark Veltzer
2009-11-30 12:01             ` Nick Piggin
2009-11-30 16:12               ` Andrea Arcangeli
2009-11-30 11:54           ` Nick Piggin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40938618.1090100@mellanox.co.il \
    --to=mlxk@mellanox.co.il \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.