linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Timur Tabi <timur.tabi@ammasso.com>
To: linux-mm@kvack.org
Subject: Do I need SetPageReserved() after map_user_kiobuf()? (was: What happened to try_to_swap_out()?)
Date: Tue, 08 Jun 2004 14:12:18 -0600	[thread overview]
Message-ID: <40C61DA2.2080308@ammasso.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0406081224590.23676-100000@chimarrao.boston.redhat.com>

Rik van Riel wrote:

> Looks like the bug is in your driver, not the VM.
> 
> The VMA that maps such pages should be set VM_RESERVED
> (or whatever the name of that flag was)

Ok, I've examined our code further and discovered a few things.

The previous developer apparently realized that the pages need to be 
marked reserved after a call to map_user_kiobuf().  However, his 
comments indicate that this is a work-around for the "kiobuf bug".  Am I 
to assume that you don't consider this a bug in map_user_kiobuf()?

This is the code that we run after map_user_kiobuf().

     int i;
     for (i = 0; i < kiobuf->nr_pages; i++)
         SetPageReserved(kiobuf->maplist[i]);

Also, since we're porting to 2.6, we're going to replace 
map_user_kiobuf() with get_user_pages().  Will we still need to call 
SetPageReserved()?  Unfortunately, I don't have a good enough 
understanding of the Linux VM to know exactly what get_user_pages() is 
doing.  For example, this code confuses me:

                 if (!PageReserved(pages[i]))
                     page_cache_get(pages[i]);

Under what circumstances would the pages already be reserved?

-- 
Timur Tabi
Staff Software Engineer
timur.tabi@ammasso.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

      parent reply	other threads:[~2004-06-08 20:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-08 14:59 What happened to try_to_swap_out()? Timur Tabi
2004-06-08 16:25 ` Rik van Riel
2004-06-08 16:31   ` Timur Tabi
2004-06-08 20:12   ` Timur Tabi [this message]

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=40C61DA2.2080308@ammasso.com \
    --to=timur.tabi@ammasso.com \
    --cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox