public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steffen Persvold <sp@scali.no>
To: Tommy Reynolds <reynolds@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Short question about the mmap method
Date: Sat, 05 Jan 2002 02:07:48 +0100	[thread overview]
Message-ID: <3C3651E4.777EABA@scali.no> (raw)
In-Reply-To: <3C360FD5.91285F5D@scali.no> <20020104145949.682d51c4.reynolds@redhat.com>

Tommy Reynolds wrote:
> 
> Uttered "Steffen Persvold" <sp@scali.no>, spoke thus:
> 
> > Hi lkml readers,
> >
> > I have a question regarding drivers implementing the mmap and nopage methods.
> > In some references I've read that pages in kernel allocated memory (either
> > allocated with kmalloc, vmalloc or__get_free_pages) should be set to reserved
> > (mem_map_reserve or set_bit(PG_reserved, page->flags) before they can be
> > mmap'ed to guarantee that they can't be swapped out. Is this true ?
> 
> [kv]malloc memory is _never_ subject to paging and can be mmap'ed with a
> vengeance without resorting to mucking about with marking pages or the like.
> 
> You're working too hard ;-)
> 

OK, thanks. But I found out that if you want to use remap_page_range on kmalloc'ed memory you need
to set the reserve bit first. Without it, it just doesn't work. When using the nopage method no
reserving is necessary.


What about my question regarding locking the mm spinlock table before traversing the page table (for
vmalloc'ed memory). Any ideas there ?

Regards,
-- 
  Steffen Persvold   | Scalable Linux Systems |   Try out the world's best   
 mailto:sp@scali.no  |  http://www.scali.com  | performing MPI implementation:
Tel: (+47) 2262 8950 |   Olaf Helsets vei 6   |      - ScaMPI 1.12.2 -         
Fax: (+47) 2262 8951 |   N0621 Oslo, NORWAY   | >300MBytes/s and <4uS latency

  reply	other threads:[~2002-01-05  1:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-04 20:25 Short question about the mmap method Steffen Persvold
2002-01-04 20:59 ` Tommy Reynolds
2002-01-05  1:07   ` Steffen Persvold [this message]
2002-01-05  2:56     ` Steffen Persvold
2002-01-05  3:59       ` Steffen Persvold
2002-01-05 14:17 ` Roman Zippel
  -- strict thread matches above, loose matches on Subject: below --
2002-01-05 17:52 Douglas Gilbert

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=3C3651E4.777EABA@scali.no \
    --to=sp@scali.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reynolds@redhat.com \
    /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