www.centos.org Forum Index CentOS 4 - General Support need to build kernel with HZ = 100
|
Bottom Previous Topic Next Topic |
| |
|
|
|---|
| Poster | Thread | Rated: 2 Votes |
|---|
|
need to build kernel with HZ = 100 | #1 |
|
|---|---|---|---|
|
Peeking in the Member Window
![]()
Joined: 2006/4/15
From
Posts: 12
|
I want to change the timer interrupt rate back to 100 HZ in a 2.6 kernel. This will be for use on a VMware ESX server.
As described in http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&externalId=1420 : Quote: In standard 2.6 kernels, the timer interrupt rate is fixed at kernel compile time and cannot be changed by command line parameters. You can, however, recompile your kernel with a lower timer interrupt rate. 100Hz is adequate for most applications in a Linux guest. See the documentation for your Linux distribution for detailed instructions on how to build and run a custom kernel. Before recompiling the guest kernel, locate the following line in /usr/src/linux-2.6/include/asm-i386/param.h: But my objective is not to correct a slow clock, it is rather to reduce the cpu overhead to the VMware host at idle (at the possible expense of timing accuracy on the VMware client OS). What's the easiest way to do this? I followed the instructions at http://wiki.centos.org/HowTos/Custom_Kernel but I suspect that once I manually change include/asm-i386/param.h, the following steps in the rebuilding process will un-do my change. I thought I might be able to change it using "make menuconfig" but I could not find any place to change the timer interrupt rate. I may have missed it, of course... |
||
Posted on: 2007/7/5 19:08
|
|||
|
Re: need to build kernel with HZ = 100 | #2 |
|
|---|---|---|---|
|
Moderator
![]()
Joined: 2006/9/3
From California, US
Posts: 5070
|
Quote:
If you follow the instructions on that wiki page *exactly* the way they are given, you should be able to build the kernel successfully. Please note that the page was slightly amended very recently. If you attempted the rebuild process more than a couple of days ago, you might want to re-read the page and try again. More specifically, you need to run "make oldconfig" after copying the config file to the BUILD directory. Akemi |
||
Posted on: 2007/7/5 21:19
|
|||
|
Re: need to build kernel with HZ = 100 | #4 |
|
|---|---|---|---|
|
Moderator
![]()
Joined: 2006/9/3
From California, US
Posts: 5070
|
There is another way to apply the change -- that is to use a patch file. I have just created it for you.
The "param.h.patch" file: Save this patch file and add it to the .spec file by following the instructions in the wiki page. Once this is done, there is no need to edit the source, and you can rebuild the kernel just by running rpmbuild -ba (no need to go through cp .config etc.). Hope this works, Akemi |
||
Posted on: 2007/7/6 0:51
|
|||
|
Re: need to build kernel with HZ = 100 | #5 |
|
|---|---|---|---|
|
Peeking in the Member Window
![]()
Joined: 2006/4/15
From
Posts: 12
|
Thanks much!
|
||
Posted on: 2007/7/6 17:31
|
|||
|
Re: need to build kernel with HZ = 100 | #6 |
|
|---|---|---|---|
|
Newbie
![]()
Joined: 2007/7/10
From
Posts: 5
|
I attempted to apply the patch file above as specified in the .spec file
However, my results are the following: The file it references (include/asm-i386/param.h.rej) contains the following: Any ideas? |
||
Posted on: 2007/7/10 14:21
|
|||
|
Re: need to build kernel with HZ = 100 | #7 |
|
|---|---|---|---|
|
Moderator
![]()
Joined: 2006/9/3
From California, US
Posts: 5070
|
It appears that the include/asm-i386/param.h file does not contain the line "# define HZ 1000". It is already "100" instead of "1000". Are you sure this is the file you want to modify? Or does your original param.h file say "1000" ? This is kernel 2.6.18, right?
|
||
Posted on: 2007/7/10 17:39
|
|||
|
Re: need to build kernel with HZ = 100 | #8 |
|
|---|---|---|---|
|
Newbie
![]()
Joined: 2007/7/10
From
Posts: 5
|
The orginal says 1000, which is making this even more confusing.
I have tried multiple times now, multiple reformats. One time it worked, I have no clue what I am doing so wrong. |
||
Posted on: 2007/7/10 21:02
|
|||
|
Re: need to build kernel with HZ = 100 | #9 |
|
|---|---|---|---|
|
Moderator
![]()
Joined: 2006/9/3
From California, US
Posts: 5070
|
Sorry, I was a bit confused. You are talking about CentOS 4, not 5. Yes, the original file says 1000. I re-created a patch file and confirmed it works in my test box (CentOS 4.5). This one succesfully patched param.h.
|
||
Posted on: 2007/7/10 23:07
|
|||
|
Re: need to build kernel with HZ = 100 | #10 |
|
|---|---|---|---|
|
Newbie
![]()
Joined: 2007/7/10
From
Posts: 5
|
Toracat,
I was having problems with that patch file earlier --- but it appears to be working now -- only not in the enviorment where I need it. Since I am compiling an x86_64 kernel, I keep changing the variables to match those within the x86_64 folder. However, the operation continues to fail. Here is how I am modifying: This fails however -- with a same / very similar error to before |
||
Posted on: 2007/7/11 0:24
|
|||
|
Re: need to build kernel with HZ = 100 | #11 |
|
|---|---|---|---|
|
Newbie
![]()
Joined: 2007/7/10
From
Posts: 5
|
Here is the exact rej file:
Here is the attempted patch response: |
||
Posted on: 2007/7/11 0:31
|
|||
|
Re: need to build kernel with HZ = 100 | #12 |
|
|---|---|---|---|
|
Newbie
![]()
Joined: 2007/7/10
From
Posts: 5
|
I have manually done a complete rewrite of the patch -- and just saw it go through.
I guess I'll see in an hour or so if I have a working compile. |
||
Posted on: 2007/7/11 1:03
|
|||
|
Re: need to build kernel with HZ = 100 | #13 |
|
|---|---|---|---|
|
Newbie
![]()
Joined: 2007/7/23
From
Posts: 1
|
Hi,
you also could ask your preferred search engine for xaox vmware or take a look at http://www.vmware.com/community/thread.jspa?messageID=699089 I use this kernels for CentOS 4.x with succsess. Jottschi |
||
Posted on: 2007/7/23 9:11
|
|||
Top Previous Topic Next Topic |
|



Topic options
Print Topic
Threaded
Newest First
2 Votes
dreamgear





You cannot start a new topic.
You can view topic.