Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-23-2005, 02:00 PM
|
#1
|
LQ Newbie
Registered: Dec 2003
Posts: 19
Rep:
|
Help Configuring the Memory Used by a Process in RedHat? (Cache Memory on CPU)
I have an Intel based computer which has a 1MB CPU cache that is running real-time processes. It is running RedHat Enterprise Linux, and I had a question about memory management.
I’m wondering if there is a way to tell the memory management routine (process, whatever) to store the memory used by a certain process in cache memory on the CPU. Currently, if the process goes out of a page of memory (for the process) in cache, the CPU has to go to SDRAM in order to get the needed information stored there. This causes a performance hit when going to RAM.
Does anyone know of a way to do this? Any code examples would be helpful, or some C routines/commands to get me started would be very helpful.
Thank you in advance.
|
|
|
02-23-2005, 03:50 PM
|
#2
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
I'm by no means a kernel-hacker ...
To the best of my knowledge the kernel doesn't
discriminate between Cache and RAM ... all you
can do is minimize the RAM usage, and hope for
the best...
In this context I'd suggest trying QNX or RTOS instead
of RH ;)
Cheers,
Tink
|
|
|
02-23-2005, 04:16 PM
|
#3
|
LQ Newbie
Registered: Dec 2003
Posts: 19
Original Poster
Rep:
|
We don't really have the option of going with another OS. We have figured out how to run RH real-time, but disabling interrupts.
I would think in C there should be a way to discriminate between cache and RAM, but I'm not sure. Is there any kind of I/O commands in C that would allow this?
|
|
|
02-23-2005, 04:32 PM
|
#4
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
The thing is that memory utilisation on this level is being decided
by the mmu and CPU internal stuff, not by the OS. Your only
chance is to minimize paging by having an as small as possible
overhead ... shrink-to-fit the kernel ... get a CPU with a 2MB Cache ;)
But this is just what I think is going on, as I said, I'm neither a
motherboard/chipset designer nor a kernel-hacker.
Cheers,
Tink
|
|
|
All times are GMT -5. The time now is 01:25 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|