From: "Richard B. Johnson" <root@chaos.analogic.com>
To: Linux kernel <linux-kernel@vger.kernel.org>
Subject: locking pages into a processes` working set
Date: Fri, 26 Mar 2004 09:19:27 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.53.0403260917300.7184@chaos> (raw)
I have been trying to lock pages down so I can get
a stable bench-mark without a bunch of paging.
I have tried mlock(), mlockall(), etc., but both
the RSS and SIZE entries shown by `top` vary all
over the place when the process is active.
`strace` of an attempt to keep some shared memory
resident. It seems to work as far as `strace`
shows.
munmap(0x400cc000, 4096) = 0
shmget(4277009102, 1052672, IPC_CREAT|IPC_EXCL|0x180|0600) = 425984
shmctl(425984, IPC_STAT, 0xbffff698) = 0
shmat(425984, 0, 0) = 0x400cc000
shmctl(425984, IPC_RMID, 0xbffff698) = 0
mlock(0x400cc000) = 0
However, it doesn't.
Also, there are bugs in `strace`. This version (4.2) doesn't show
the length parameter passed to mlock() and the version distributed
with RH (4.4) shows two '0's instead of the length parameter.
Maybe mlock() and friends don't prevent paging, but
only prevent the pages from being written to swap?
Could somebody tell me how to keep memory from being
paged, i.e., in the processes` working-set all the time.
I have an application on an imbedded system that almost
works. It's frustrating. If I could keep the application's
pages resident it would work fine. If I mmap physical pages
the kernel doesn't know about, it works fine. But if I
try to do more "standard" stuff and use shared RAM, the
application gets far behind the data-rate and I'm screwed.
The kernel version is 2.4.24. Maybe it's broken?
Cheers,
Dick Johnson
Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.
next reply other threads:[~2004-03-26 14:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-26 14:19 Richard B. Johnson [this message]
2004-03-27 18:41 Carl Spalletta
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=Pine.LNX.4.53.0403260917300.7184@chaos \
--to=root@chaos.analogic.com \
--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
all inboxes | Powered by JetHome®