Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'd like to know the following:

The default memory PAGE_SIZE in linux is 4096 bytes, how to change this size on a running system?

How the hugepages work in linux and how to set the hugepage size?

It is mentioned here that

The Linux kernel is able to set aside a portion of physical memory to be able be addressed using a larger page size

How to configure a portion of physical memory with larger page size and leave the rest to use the default page size (4096 bytes)

What is the maximum size a hugepage can have?

share|improve this question
1  
What is the problem you are trying to solve or the effect you are trying to get? –  David Schwartz May 9 '12 at 6:38
    
I don't deal with any problems.I am just curious to know if we can change the page size.. –  Manny May 9 '12 at 9:05
    
It's really not clear what that means. So I'm not sure how to answer you. (For example, if you asked, "Can I change my age?" does that mean you're looking for ways to look younger? Ways to forge documents? Or what? Similarly, it's not clear whether you're looking for ways to change the defined constant, ways to handle pages of sizes other than the system default page size, or what.) –  David Schwartz May 9 '12 at 9:23
1  
You cannot change the page size on a running system, the layout of everything in memory depends on this value. –  pjc50 May 9 '12 at 9:48

1 Answer 1

Here is some reading material: http://lwn.net/Articles/374424/

AFAIK, to change the PAGE_SIZE you will have to recompile.. which depending on what you change it to may be a headache as you may need to change Page Table size and such

If your interested in messing with paging look at xv6 ( http://pdos.csail.mit.edu/6.828/2011/xv6.html ) and play with that in a qemu instance.. you can try things out without breaking your entire system. The xv6 folks also have good documentation on how things work.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.