MadMikeHoare
Old Alpha
- Joined
- Nov 24, 2005
- Posts
- 986
- Location
- Stuttgart, Germany
- Society
- Freelancing since 2007
- Avatar Name
- Mike MadMike Hoare
For a Linux machine running WINE it is very important to have a kernel compiled with more than the usual 100hz.
The advantage using a kernel more than 100hz is the fact that you will be able to have a higher FPS rate.
Here I explain how to recompile a Debian Linux machine for the usage of 1000hz which most machines can easily handle.
You will notice a higher load of your machine which results in a higher usage of the CPU as well but this doesnt mean anything is wrong. You get a higher FPS rate and this is why I did this at home for testing purposes.
Now we take over the old Kernelcfg. With "ls /boot" you see the cfg and the old cfg's of the old kernels. You must adjust this by using
"cp /boot/config-2.6.15" onto your previous config.
Before we go to the menu we have to manually change a few settings in param.h and in jiffies.h
vi include/asm-i386/param.h
--------------------
vi include/linux/jiffies.h
-------------------------
Now we go to the menu by entering
Now u get into a menu, please adjust the following settings/values
Device Drivers --->
Block devices --->
<*> RAM disk support
(16) Default number of RAM disks
(8192) Default RAM disk size (kbytes)[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support
File systems --->
Miscellaneous filesystems --->
<*> Compressed ROM file system support (cramfs)
Processor type and features --->
[ ] Tickless System (Dynamic Ticks) (NEW)
[*] High Resolution Timer Support
Preemption Model (Preemptible Kernel (Low-Latency Desktop))
[*] Preempt The Big Kernel Lock
Timer frequency (1000 HZ)
Block Layer --->
I0 Schedulers --->
<*> Anticipatory I/o scheduler
Power management options (ACPI, APM) --->
[*]Power Management support
ACPI (Advanced Configuration and Power Interface) Support --->
[*]ACPI Support
General Setup --->
[*] Kernel .config support
[*] Enable acess to .config through /proc/config.gz
Now we are already at the end
For a while the kernel packages (.deb) are not called "kernel-image-2.6.18_Kernel.01_i386.deb" anymore, instead they use "linux-image-2.6.18_Kernel.01_i386.deb". Most of you might still use the old version hence I suggest you do a "ls /boot" or "ls /usr/src" and see what your package is called.
Now we do
The previous command will compile the kernel.
This will take a while and you can ignore all warnings and/or exeptions.
After a reboot you can test with "uname -a" if you have your new kernel installed.
If you want to get rid of what we've just done:
Note! This worked for me on a Debian latest kernel release. You should know a little about linux before you try this. If this is blowing your system, it's not my fault. Do this at your own risk.
The advantage using a kernel more than 100hz is the fact that you will be able to have a higher FPS rate.
Here I explain how to recompile a Debian Linux machine for the usage of 1000hz which most machines can easily handle.
You will notice a higher load of your machine which results in a higher usage of the CPU as well but this doesnt mean anything is wrong. You get a higher FPS rate and this is why I did this at home for testing purposes.
Code:
su
apt-get update
apt-get install libc6-dev gcc binutils modutils kernel-package libncurses5-dev debianutils make bzip2
cd /..
cd /usr/src/
wget [url]http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.18.tar.bz2[/url]
tar xfvj linux-2.6.18.tar.bz2
wget [url]http://www.tglx.de/projects/hrtimers/2.6.18/patch-2.6.18-hrt-dyntick2.patches.tar.bz2[/url]
mv linux-2.6.18 linux-2.6.18-hrt-dyntick2
cd linux-2.6.18-hrt-dyntick2
bzcat /usr/src/patch-2.6.18-hrt-dyntick2.patches.tar.bz2 | patch -p1
cd /..
cd /usr/src/
ln -s linux-2.6.18-hrt-dyntick2 linux
Now we take over the old Kernelcfg. With "ls /boot" you see the cfg and the old cfg's of the old kernels. You must adjust this by using
"cp /boot/config-2.6.15" onto your previous config.
Code:
ls /boot/
cp /boot/config-2.6.15 linux/.config
cd linux
Before we go to the menu we have to manually change a few settings in param.h and in jiffies.h
vi include/asm-i386/param.h
Code:
#ifndef _ASMi386_PARAM_H
#define _ASMi386_PARAM_H
#ifdef __KERNEL__
# define HZ 1000 /* Internal kernel timer frequency */
# define USER_HZ 1000 /* .. some user interfaces are in "ticks" */
# define CLOCKS_PER_SEC (USER_HZ) /* like times() */
#endif
#ifndef HZ
#define HZ 100
#endif
#define EXEC_PAGESIZE 4096
#ifndef NOGROUP
#define NOGROUP (-1)
#endif
#define MAXHOSTNAMELEN 64 /* max length of hostname */
#endif
vi include/linux/jiffies.h
Code:
/*
* The following defines establish the engineering parameters of the PLL
* model. The HZ variable establishes the timer interrupt frequency, 100 Hz
* for the SunOS kernel, 256 Hz for the Ultrix kernel and 1024 Hz for the
* OSF/1 kernel. The SHIFT_HZ define expresses the same value as the
* nearest power of two in order to avoid hardware multiply operations.
*/
#if HZ >= 12 && HZ < 24
# define SHIFT_HZ 4
#elif HZ >= 24 && HZ < 48
# define SHIFT_HZ 5
#elif HZ >= 48 && HZ < 96
# define SHIFT_HZ 6
#elif HZ >= 96 && HZ < 192
# define SHIFT_HZ 7
#elif HZ >= 192 && HZ < 384
# define SHIFT_HZ 8
#elif HZ >= 384 && HZ < 768
# define SHIFT_HZ 9
#elif HZ >= 768 && HZ < 1536
# define SHIFT_HZ 10
#elif HZ >= 1536 && HZ < 3072
# define SHIFT_HZ 11
#else
# error You lose.
#endif
Now we go to the menu by entering
Code:
make menuconfig
Now u get into a menu, please adjust the following settings/values
Device Drivers --->
Block devices --->
<*> RAM disk support
(16) Default number of RAM disks
(8192) Default RAM disk size (kbytes)[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support
File systems --->
Miscellaneous filesystems --->
<*> Compressed ROM file system support (cramfs)
Processor type and features --->
[ ] Tickless System (Dynamic Ticks) (NEW)
[*] High Resolution Timer Support
Preemption Model (Preemptible Kernel (Low-Latency Desktop))
[*] Preempt The Big Kernel Lock
Timer frequency (1000 HZ)
Block Layer --->
I0 Schedulers --->
<*> Anticipatory I/o scheduler
Power management options (ACPI, APM) --->
[*]Power Management support
ACPI (Advanced Configuration and Power Interface) Support --->
[*]ACPI Support
General Setup --->
[*] Kernel .config support
[*] Enable acess to .config through /proc/config.gz
Now we are already at the end
Code:
make-kpkg clean
make-kpkg --initrd --revision=Kernel.01 kernel_image
ls /usr/src/
cd /..
cd /usr/src/
For a while the kernel packages (.deb) are not called "kernel-image-2.6.18_Kernel.01_i386.deb" anymore, instead they use "linux-image-2.6.18_Kernel.01_i386.deb". Most of you might still use the old version hence I suggest you do a "ls /boot" or "ls /usr/src" and see what your package is called.
Now we do
Code:
dpkg -i linux-image-2.6.18_Kernel.01_i386.deb
The previous command will compile the kernel.
This will take a while and you can ignore all warnings and/or exeptions.
After a reboot you can test with "uname -a" if you have your new kernel installed.
If you want to get rid of what we've just done:
Code:
su
dpkg --purge --force-remove-essential linux-image-2.6.18
Note! This worked for me on a Debian latest kernel release. You should know a little about linux before you try this. If this is blowing your system, it's not my fault. Do this at your own risk.
Last edited: