public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Schlichter <schlicht@rumms.uni-mannheim.de>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Pinning kernel memory
Date: Thu, 12 Dec 2002 18:00:49 +0100	[thread overview]
Message-ID: <1039712449.3df8c0c183dfe@rumms.uni-mannheim.de> (raw)

Hello,

I want to create a big area of unswappable, physical continuous kernel memory
for hardware testing purposes. Currently I allocate the memory using
alloc_pages(GFP_KERNEL, order) and after this I pin it using
SetPageReserved(page) for each page.

Is this acceptable, or may it happen that after the alloc_pages()-call the
kswapd begins to swap out this memory and just any other memory is pinned??
Do I perhaps have to lock the mm->page_table_lock and test each page before I
pin it?? If it is swapped out, how can I assure to get this page back swapped
in?

is SetPageReserved the right way to pin a memory page, or should
SetPageActive(page) or even LockPage(page) be used??

I hope anyone can help me...
Thank you!

Sincerely yours
  Thomas Schlichter

             reply	other threads:[~2002-12-12 16:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-12 17:00 Thomas Schlichter [this message]
2002-12-12 20:15 ` Pinning kernel memory Rik van Riel
2002-12-12 21:04   ` Thomas Schlichter
  -- strict thread matches above, loose matches on Subject: below --
2002-12-12 16:58 Thomas Schlichter

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=1039712449.3df8c0c183dfe@rumms.uni-mannheim.de \
    --to=schlicht@rumms.uni-mannheim.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox