Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 20887 - Kernel build failure("linux-2.4.20-gentoo-r5") : Error-msg: "Bad HZ value" not very clear. Seems that the Kernel Timer can't be set to 150Hz but 100Hz works fine.
Summary: Kernel build failure("linux-2.4.20-gentoo-r5") : Error-msg: "Bad HZ value" no...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High blocker (vote)
Assignee: Jay Pfeifer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-12 19:53 UTC by Mogens Meier Christensen
Modified: 2003-05-12 23:41 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mogens Meier Christensen 2003-05-12 19:53:10 UTC
Description and resolution:

Being a gentoo newbie I followed the x86-install for my second gentoo-machine.
When I got to building the kernel I got the error msg "Bad HZ value" everytime 
I (re)tried to build it.

I located the msg to come from "make bzImage". Reading some other bugs here, I 
remembered that I set the kernel timer to 150Hz, not the ancient value 100Hz 
(or the menuconfig default value 200 Hz). 
The help in menuconfig stated that I should not use more than half my MHz-
number, so I set my Celeron300a kernel timer to 150Hz.

BUT it seems that the kernel timer can't use 150Hz. MAYBE it must be a 
multiplum of 100. The menuconfig help doesn't mention anything like it. THAT is 
the problem. This bug report is mainly to help others in the same situation.

If menuconfig is not updated I surgest a note in the gentoo install doc to help 
newbies like me :)

Reproducible: Always
Steps to Reproduce:
1. emerge sync; emerge gentoo-sources
2. cd /usr/src/linux
3. make menuconfig (Set Kernel Timer to 150Hz).
4. make dep
5. make clean
6. make bzImage

Actual Results:  
Kernel build failure with "Bad HZ value".

Expected Results:  
Kernel build success. 
If not, a more precise error msg, and a note about the valid kernel timer Hz 
numbers in the menuconfig help. Until then, a note in the gentoo install doc(s).

All nescesary should be in the "Details" section above...
If not:

Situation: Booting and installing from CD ver 1.4-RC4, tightly following the 
gentoo x86 install doc.
HW: Celeron 300a, 160MB, 80GB IDE HD.
Comment 1 Jay Pfeifer (RETIRED) gentoo-dev 2003-05-12 23:41:35 UTC
i disagree with your assessment of this issue.

your issue is that you have enabled CONFIG_NET_SCHED and it specifies that
#if (HZ%4) != 0
#error Bad HZ value.
#endif
any HZ value must be evenly divisble by 4 (no remainder) or it will error.

therefore the HZ value must be a multiple of 4 when you enable this option. If you remove CONFIG_NET_SCHED then you can set it to 150 or many other positive integer values.

Solution: try removing CONFIG_NET_SCHED or adjust your HZ value so that the condition above is false.

on another note, extreme ranges will cause issues. you cannot use a value <17 with tcp/ip support (include/net/tcp.h will error) and include/linux/timex.h will fail if HZ is < 12. An HZ value > 1535 will cause timex.h to fail as well. Of course... these are insane values and would be doing @ own risk. Not recommended and probably asking for big issues that I care to not ponder on.

I will consider a note for others in the docs or probably in the help.

Jay