ࡱ> M gbjbj== &WWalZ4(4(4(4(|(Zqn)d$-$-$-$-..L.(qqqqqqq$ s -u,q-/..//,q D$-$-Yq D D D/ $-$-q D/q D DDirl$-) CJRZ#4(<6j"rloq0qXjvCFvrl DJJ System Enhancements, Optimization and Compiling the Kernel Tutorial Index: #  HYPERLINK "http://yolinux.com/TUTORIALS/LinuxTutorialOptimization.html" \l "HARDDRIVE" Optimize hard drive access performance #  HYPERLINK "http://yolinux.com/TUTORIALS/LinuxTutorialOptimization.html" \l "KERNELENHANCEMENT" Kernel Tweaks #  HYPERLINK "http://yolinux.com/TUTORIALS/LinuxTutorialOptimization.html" \l "KERNELCOMPILE" Compiling the Kernel #  HYPERLINK "http://yolinux.com/TUTORIALS/LinuxTutorialOptimization.html" \l "PATCHES" Kernel Source and Patches #  HYPERLINK "http://yolinux.com/TUTORIALS/LinuxTutorialOptimization.html" \l "TIPS" Tips #  HYPERLINK "http://yolinux.com/TUTORIALS/LinuxTutorialOptimization.html" \l "INFO" Info #  HYPERLINK "http://yolinux.com/TUTORIALS/LinuxTutorialOptimization.html" \l "BOOKS" Books  This tutorial covers optimization techniques to make your system run faster or support your needs better. This may include tweaking configuration specifications, turning off un-needed processes, and compiling a new kernel tweaked for your system. Note that graphics device drivers are NOT compiled into the kernel although support for interfacing with their particular chipset can be compiled in. This is because X-Windows is an application running on Linux and not integral to the kernel.   Optimize hard drive access performance: Hdparm: The following optimizations techniques can be applied to (E)IDE drives to utilize 32 bit I/O and DMA more effectively. Get info: hdparm /dev/hda Get more info: hdparm -I /dev/hda Test Speed: hdparm -tT /dev/hda Increase Speed: hdparm -d1 -c3 -u1 /dev/hda -d1: Turn on DMA (0: off) -c3: IDE chipset support 0: Disable 1: Enable 3: 32 bit transfer -u1: Get/set interrupt umask. Driver ignores other interrupts during processing of disk interrupts. (0: off) Test Speed Again: hdparm -tT /dev/hda The Red Hat 7.1+/8.0 configuration uses /etc/rc.sysinit to call scripts /etc/sysconfig/harddisks. (Earlier systems used: /etc/sysconfig/harddiskhda, /etc/sysconfig/harddiskhdb, etc) to run hdparm upon boot. File: /etc/sysconfig/harddisks: USE_DMA=1 EIDE_32BIT=1 Turn off hdparm DMA access:  HYPERLINK "http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=hdparm" hdparm -d0 /dev/hda Links:  HYPERLINK "http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=hdparm" hdparm man page.  HYPERLINK "http://linux.oreillynet.com/lpt/a/272" Optimizing hard drive performance with hdparm.  HYPERLINK "http://www.linuxnetmag.com/en/issue7/m7hdparm1.html" ATA, UDMA and hdparm  Ramdisk: Go even faster by using ramdisk - Memory mapped as a disk. See:  HYPERLINK "http://www.linuxfocus.org/English/November1999/article124.html" How to use a Ramdisk for Linux Also see:  HYPERLINK "file:/usr/src/linux-2.4/Documentation/ramdisk.txt" /usr/src/linux-2.4/Documentation/ramdisk.txt Tools: Measure hared drive performance with  HYPERLINK "http://ssdweb01.storage.ibm.com/hdd/support/download.htm" IBM Drive Fitness Test (DFT) utility. Create a boot floppy with DFT image (use dd) and boot. Measures SCSI and IDE performance as well as some repair utilities.  HYPERLINK "http://sourceforge.net/projects/iometer" IoMeter: Server I/O benchmark tool.  Kernel Tweaks: Direct kernel to specify processor affinity for a process: Set (or retrieve) the CPU affinity. The scheduler attempts to keep the process on the specified CPU. This is especially effective for threaded applications to improve cache coherancy on SMP computers. It is also usefull for software licensed to a CPU or for a single CPU system when it is in fact running on an SMP system. (i.e. Oracle)  HYPERLINK "http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=taskset" taskset: retrieve or set a processes's CPU affinity (Part of package "schedutils")  HYPERLINK "http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=sched_setaffinity" sched_setaffinity / sched_getaffinity: set and get a process's CPU affinity mask Kernel enhancements to optimize SCSI for scanner access: See man page for sane: man  HYPERLINK "http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=sane-scsi" sane-scsi Excerp from man page: First, make sure your kernel has SCSI generic support enabled. In ``make xconfig'', this shows up under ``SCSI support->SCSI generic support''. To keep scanning times to a minimum, it is strongly recom mended to use a large buffer size for the generic SCSI driver. By default, Linux uses a buffer of size 32KB. This works, but for many cheaper scanners this causes scanning to be slower by about a factor of four than when using a size of 127KB. Linux defines the size of this buffer by macro SG_BIG_BUFF in header file /usr/include/scsi/sg.h. Unless a system is seriously short on memory, it is recommended to increase this value to the maximum legal value of 128*1024-512=130560 bytes. After changing this value, it is necessary to recompile both the kernel (or the SCSI generic module) and the SCSI backends. AUTHOR David Mosberger 13 May 1998 Kernel enhancements to increase the per process limit of open files: Change the definition of NR_OPEN in local files:  HYPERLINK "file:/usr/src/linux/include/linux/limits.h" /usr/src/linux/include/linux/limits.h (Local file: kernel 2.2 RH 7.0-) (default 1024 typ.)  HYPERLINK "file:/usr/include/limits.h" /usr/include/limits.h (Local file) (default 1024 typ.)  HYPERLINK "file:/usr/src/linux/include/linux/fs.h" /usr/src/linux/include/linux/fs.h (Local file: kernel 2.2 RH 7.0-)  Compiling the Kernel: The default Red Hat Kernel comes with as much stuff compiled into the Kernel as they could fit. This allows it to support a vast array of devices and system needs. If you must add support for something new or if you wish to streamline your kernel with only what is needed so that it uses less memory, operates faster, and is optimized for your processor, then one must recompile the kernel. To find out about the latest kernel, issue the command: finger @finger.kernel.org Typically the source code for the Red Hat installation is located in:  HYPERLINK "file:/usr/src/redhat/SOURCES/" /usr/src/redhat/SOURCES/ - patches and kernel will be placed here by kernel source RPM. (Fedora Core 3) (bzip2 -d linux-2.6.9.tar.bz2, tar xf linux-2.6.9.tar)  HYPERLINK "file:/usr/src/linux/" /usr/src/linux/ - (Soft linked to /usr/src/linux-2.2.xx) Kernel 2.2 and older. (Red Hat 6.x, 7.0)  HYPERLINK "file:/usr/src/linux-2.4/" /usr/src/linux-2.4/ - (Soft linked to /usr/src/linux-2.4.xx) Kernel 2.4. (Red Hat 7.1) This separation to a new directory for kernel 2.4 is to accommodate the differences between the C library and the kernel. If you get new kernel source download to a new directory. i.e. /usr/src/linux-2.2.16 then  HYPERLINK "http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=ln" ln -s /usr/src/linux-2.2.16 /usr/src/linux Typically the kernel RPM (kernel-source-XXX.i386.rpm) will install the source and generate the appropriate links. Perform the following steps: (as root) Setup: The source may already be installed as part of the installation or from an RPM (See /usr/src/). OR You may also download the latest source from  HYPERLINK "http://www.kernel.org/pub/linux/kernel/" http://www.kernel.org/pub/linux/kernel/. Move the downloaded file linux-2.X.XX.tar.gz to /usr/src/. Uncompress file: tar -xzf linux-2.X.XX.tar.gz which will install everything in a subdirectory linux/. (To view contents use command tar -tzf linux-...tar.gz) If using the file with the bz2 extension: bunzip2 linux-2.X.XX.tar.bz2 cd /usr/src/linux/ (or /usr/src/linux-2.4/) less README (Read the documentation. It tells you everything. Use space bar to view next page) (Local links to:  HYPERLINK "file:/usr/src/linux/README" /usr/src/linux/README or  HYPERLINK "file:/usr/src/linux-2.4/README" /usr/src/linux-2.4/README) Update /usr/include/ NOTE: PERFORM THIS STEP FOR KERNEL 2.2.x AND OLDER. DO NOT DO THIS FOR KERNEL 2.4. The header files for Kernel 2.4 and the C library header files may no longer match and thus must remain separated. cd /usr/include rm -fr asm linux scsi ln -s /usr/src/linux/include/asm asm ln -s /usr/src/linux/include/linux linux ln -s /usr/src/linux/include/scsi scsi The soft links (ln -s) to the include directories are important to software developers who need to compile with the new include files. Note: The sym link is optional and some don't do it due to potential differences in the header files used by glibc and the kernel. ( HYPERLINK "http://uwsg.iu.edu/hypermail/linux/kernel/0007.3/0587.html" A response from Linus) cd /usr/src/linux (or /usr/src/linux-2.4) make distclean (Cleans up junk from old compiles) (Warning: removes .config) make mrproper (build the source tree) At this time the sources are correctly installed. This also resets the /usr/src/linux/.config file to the system default. SuSE setup: For SuSE (9.3), there are two kernel-source RPMs. One RPM resides on the "Source" DVD-2 and the other resides on the "Installation" DVD-1. Use the kernel-source RPM found on the "Installation" DVD-1. This one will register in the RPM database and creates the directories expected Check with the command: rpm -q kernel-source Kernel source code location: /usr/src/linux Docs location: /usr/share/doc/packages/kernel-source The SuSE kernel-source RPM will not produce a ".config" file for the kernel compilation. Produce the default ".config" file by: zcat /proc/config.gz > /usr/src/linux/.config Configuration: Use one of the following tools to create the .config file. This gives you the chance to choose what goes into the kernel. You can choose support for many of the latest capabilities, device drivers, and can tune the kernel for particular uses. i.e. you can also optimize the compilation for the Pentium. (Default for RH 5.2 was a 386 with no math co-processor!) The default config file used to compile the default distribution kernel can be found in the source directory. (i.e. Fedora Core 3: /usr/src/redhat/SOURCES/kernel-2.6.9-i686.config, /usr/src/redhat/SOURCES/kernel-2.6.9-x86_64-smp.config, ... and all the others for the various hardware platforms.) Pick one of the following: make config (Bash shell script) make menuconfig (uses text window curses) make xconfig (uses tck and wish) - recommended due to online help feature and intuitive interface. Save configuration to file: .config make oldconfig Build a configuration file based on defaults found in current .config file. menuconfig Notes: "< > options can be compiled as a module. <*> = Compile into kernel (y) = Compile as a module (m) Recommendation for Pentium owners: General Setup choose : Kernel math emulations: N Processor type: Pentium Development, experimental or kernel debugging features: N If using netfilter capabilities, do not enable the kernel fast-switching option. That code will permits fast switching at a lower level in the IP stack than netfilter and thus will bypass the netfilter capabilities. Note: When requiring gobs of memory (> 1Gb), there is a kernel compile option which sets the limit on the amount of user memory one can use: "Processor type and features / Maximum Virtual Memory". Compile: Next: (from /usr/src/linux) make dep (make dependencies. Older kernels only. Attempt and if not needed, make will return a message stating that this step is un-necessary. Not required for 2.6+ kernels.) make clean (At this point you have all the source gathered) Choose one of the following to create the new kernel and then move it to /boot/vmlinux: make zImage (compressed image) make bzImage (very compressed image good for recovery floppies - slower to boot because of time to uncompress) make image make bzdisk (Boot floppy with no LILO) Install: mv /usr/src/linux/arch/i386/boot/zImage /boot/vmlinuz-release ln -s /boot/vmlinuz-release /boot/vmlinuz (If "make zImage" was chosen) or mv /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-release ln -s /boot/bzImage-release /boot/vmlinuz (If "make bzImage" was chosen) Also move/copy the file /usr/src/linux.../System.map to /boot/System.map-2.X.XX OR make install (Preferred. Potential Pitfall: On my SCSI system I had to execute this command after issuing the mkinitrd command below.) Modules documentation: (not that helpful)  HYPERLINK "file:/usr/src/linux-2.4/Documentation/modules.txt" /usr/src/linux-2.4/Documentation/modules.txt  HYPERLINK "file:/usr/src/linux/Documentation/modules.txt" /usr/src/linux/Documentation/modules.txt make modules rm /lib/modules/Kernel_release (i.e. /lib/modules/2.2.16-3 ) ln -s /lib/modules/new_modules_directory /lib/modules/Kernel_release make modules_install Generates the file: /lib/modules/2.X.XX/modules.dep Configure Boot Loader: (Grub or Lilo) Configure grub: File: /etc/grub.conf default=1 - Kernel to boot (2nd in list) timeout=5 splashimage=(hd1,0)/boot/grub/splash.xpm.gz - Boot image location (hd1, 1st partition) hiddenmenu title Fedora Core (2.6.12-1.1372_FC3) root (hd1,0) - Root of GRUB reference. Same as /boot kernel /boot/vmlinuz-2.6.12-1.1372_FC3 ro root=LABEL=/ rhgb quiet initrd /boot/initrd-2.6.12-1.1372_FC3.img title Fedora Core (2.6.11-1.14_FC3) root (hd1,0) kernel /boot/vmlinuz-2.6.11-1.14_FC3 ro root=LABEL=/ rhgb quiet initrd /boot/initrd-2.6.11-1.14_FC3.img Description: default: Default kernel to boot. All options displayed but one will boot by default. timeout: Time for user to select kernel. After "timeout" seconds, default kernel chosen and boot begins. splashimage: Background image shown by Grub and location (hard drive hd1 and "0" or first partition (/boot). root: Grub root directory. In this example, drive hd1 and "0" or first partition (/boot). kernel: Kernel to boot, read only. Note that this is the same as the result of cat /proc/cmdline initrd: Initial ramdisk for a Linux format boot image. Sets parameters in the Linux setup area in memory. See:  HYPERLINK "http://www.gnu.org/software/grub/grub.en.html" Grub Home page grub shell man page. Configure lilo: Lilo must point to the new kernel. Edit /etc/lilo.conf. Add a new image statement to point to the new kernel. Keep the old as backup in case you need to boot it. SCSI systems must perform an additional step to load drivers upon system boot: Execute the following command which creates the file used to let the system boot:  HYPERLINK "http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=mkinitrd" mkinitrd /boot/initrd-2.2.16-3.img 2.2.16-3 The second argument is the name of the sub-directory of the modules under the directory /lib/modules/. (In this case /lib/modules/2.2.16-3/ This step is required by systems using modular SCSI support. If the SCSI support is compiled into the kernel and is NOT a module, then this step may not be necessary. The file /boot/initrd-2.2.16-3.img is specified as the RAM disk image used before the file system is available. (initrd = initial ram disk) Run /sbin/ HYPERLINK "http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=lilo" lilo -v to configure the master boot record with data from lilo.conf. Sample  HYPERLINK "http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=lilo.conf" lilo.conf: boot=/dev/sda map=/boot/map - Location of the kernel used for boot install=/boot/boot.b prompt timeout=50 linear - Specific to SCSI configurations default=linux image=/boot/vmlinuz-2.2.16-3 - New kernel label=linux - Name to be displayed by Lilo boot manager initrd=/boot/initrd-2.2.16-3.img - Specific to SCSI boot drives. read-only root=/dev/sdb6 image=/boot/vmlinuz-2.2.14-5.0 label=OldLinux initrd=/boot/initrd-2.2.14-5.0.img - SCSI specific. read-only root=/dev/sdb6 When the system boots and gives you the "Lilo:" prompt, you can type "?" to see your boot choices as defined by the above labels in lilo.conf. Type the label name of the kernel or system you wish to boot. A carriage return will choose the default. For a full list of boot parameters see:  HYPERLINK "http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=bootparam" bootparam man page Also see the  HYPERLINK "http://yolinux.com/HOWTO/BootPrompt-HOWTO.html" Boot Prompt Howto. Kernel version verification: uname -rv will print the compile date of the kernel currently running.  Modules: Modules are used to reduce the amount of memory used to hold the kernel. There is a slight penalty for the time taken to load and unload the module. If the code is required for general operation of the kernel or is needed often or required by the boot process, it is best to compile it into the kernel and it should NOT be compiled as a module.  HYPERLINK "http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=modules" Module commands: The kernel will use the modprobe utility to determine if the module is compatible with the kernel. The program used is specified by a proc file: cat /proc/sys/kernel/modprobe /sbin/modprobe - Result of cat operation Modules are loaded by init scripts which call insmod/rmmod to load/unload modules. Command Description  HYPERLINK "http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=lsmod" lsmod List loaded modules  [ /root]# lsmod Module Size Used by 3c59x 19716 0 (autoclean) (unused) autofs 9120 1 (autoclean) emu10k1 45688 1 soundcore 2596 4 [emu10k1] aic7xxx 137400 3  HYPERLINK "http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=insmod" insmod Inserts a module into the active kernel  HYPERLINK "http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=rmmod" rmmod Remove a loaded module. Just specify the module name. No ".o" or path necessary.  HYPERLINK "http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=modprobe" modprobe High level handling of loadable modules. Loads module and dependencies.  HYPERLINK "http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=depmod" depmod Creates dependencies file for a module (used by modprobe)  HYPERLINK "http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=modinfo" modinfo Display information about a kernel module List of modules held in /etc/modules.conf (or for older systems: /etc/conf.modules) Sample: alias scsi_hostadapter aic7xxx alias eth0 eepro100 alias eth1 eepro100 alias parport_lowlevel parport_pc alias sound-slot-0 emu10k1 alias char-major-81 bttv Other useful commands: Display system status gathered from /proc: /usr/bin/procinfo -a List Processor type: cat /proc/cpuinfo List devices: cat /proc/devices /sbin/lsmod List IO ports (devivce address used drivers): cat /proc/ioports List DMA channels: cat /proc/dma View interrupts used by the system: cat /proc/interrupts procinfo -i IRQ Description 0 Timer channel 0 1 Keyboard 2 Cascade for controller 2 (which controls IRQ 8-15) 3 Serial Port 2 (COM2) 4 Serial Port 1 (COM1) 5 Parallel Port 2 (LPT2) 6 Floppy Diskette Controller 7 Parallel Port 1 (Printer LPT1) 8 Real-time Clock 9 Redirected to IRQ2 10 -- 11 -- 12 PS/2 Mouse 13 Math Co-processor 14 Hard Disk Controller (IDE) 15 -- Also see file: /etc/isapnp.gone for a list of protected IRQ's which will not be allocated to ISA Plug and Play device. Command: pnpdump This command scans ISA PnP cards and can be used to generate /etc/isapnp.conf pnpdump > /etc/isapnp.conf Command: isapnp -C /etc/isapnp.conf Uses file /etc/isapnp.gone and /proc files to avoid IRQ's already allocated and to determine safe IRQ's.  HYPERLINK "http://www.roestock.demon.co.uk/isapnptools/" Home page for "isapnptools"  HYPERLINK "ftp://ftp.microsoft.com/developr/drg/Plug-and-Play/Pnpspecs" Plug and Play ISA Specification Create devices. Run script: /dev/MAKEDEV Display kernel version in current use: /proc/version Display boot messages: dmesg Display sound driver status: cat /dev/sndstat  Kernel Source and Patches: Linux kernel naming convention: Version.MajorRelease.MinorRelease.PatchNumber (In Linux kernel vernacular: KernelVersion.PatchLevel.Sublevel.Extraversion) Patch File Description: The patch files are file "diffs" (differences from the stated source file) which can be applied to create a newer updated file. Downloading kernel source and applying a patch: Obtain kernel source: ftp://ftp.us.kernel.org/pub/linux/kernel/v2.X/linux-2.X.X.tar.gz Uncompress: tar xzf linux-2.X.X.tar.gz (Or: tar xjf linux-2.X.X.tar.bz2) This creates the local directory: linux/... OR use the source from the kernel-source RPM package released by your distribution. Using the source released by your distribution will include patches and source code needed to support all the features of your distribution. Of greatest importance is the default ".config" file which describes the features used by your distribution. i.e. Red Hat / Fedora Core use the ext3 file system, devfs and turn on many features by default. Download patch: Download patch: ftp://ftp.us.kernel.org/pub/linux/kernel/v2.X/patch-2.X.X (Place patches in directory (create it first): /usr/src/KernelPatches/) Apply patch: Apply patches from default source directory /usr/src/linux (linked to actual source directory): gzip -cd ../KernelPatches/patch-file.gz | patch -p0 bzip2 -dc ../KernelPatches/patch-file.bz2 | patch -p0 If patch file resides in directory /usr/src/linux: zcat patch-file.gz | patch -p0 Use script patch-kernel if applying multiple patches at once: (i.e. patch-2.6.11.5 to patch-2.6.11.7) (Script located in directory linked to kernel source) Place all patches in /usr/src/KernelPatches/ (.gz or .bz2) Apply all the patches to kernel (i.e. 2.6.11.4) /usr/src/linux/scripts/patch-kernel linux KernelPatches (Execute from directory /usr/src) Or apply all the patches to kernel to bring it up to specified level. /usr/src/linux/scripts/patch-kernel linux KernelPatches 2.6.11.7 (patch-kernel kernel-source-directory-to-act-on highest-version to include) Set-up directory links: mv linux linux-2.X.XX (only required on some older RPMs) ln -s linux-2.X.XX linux /usr/include/asm should point to /usr/src/linux/include/asm-i386 /usr/include/linux should point to /usr/src/linux/include/linux /usr/include/scsi should point to /usr/src/linux/include/scsi  Example: Applying the devfs patch to kernel 2.2.20 Download kernel:  HYPERLINK "http://www.kernel.org/pub/linux/kernel/v2.2/linux-2.2.20.tar.gz" http://www.kernel.org/pub/linux/kernel/v2.2/linux-2.2.20.tar.gz mv linux-2.2.20.tar.gz /usr/src cd /usr/src/ Remove previous source: rm linux (May use rm -Rf linux/) Unload to subdirectory linux/: tar xzf linux-2.2.20.tar.gz Download patch: http://www.atnf.csiro.au/~rgooch/linux/kernel-patches.html Download patch file devfs-patch-current to /usr/src/ cd /usr/src Test: patch -p0 --dry-run < devfs-patch-current Apply patch: patch -p0 < devfs-patch-current Now go through regular kernel build as described above. (From the beginning) make distclean; make mrproper The configuration has been altered by the patch thus make xconfig will have options not seen in the original 2.2.20 kernel. "Code maturity level" option Select "development and/or incomplete code/drivers" This will provide lots of options for kernel. Go to Filesystems - check /dev file support "Experimental" This feature was introduced by the patch. If it is not selected the devfs feature introduced by the patch will not be included. Kernel source must be in /usr/src/linux/ (From kernel.org) or /usr/src/linux-2.2.20/ for the patch command as given, to work. The patch is pre-configured for this. Patch command options: Option Description -DMACRO-NAME Define pre-processor macro -c Use diff file format. -d directory Change to directory. --dry-run Don't modify file but output results. -s Silent mode. -f Force change. -n Using patch file which is a regular diff file. -R Reverse or undo patch. (i.e. if patch rejected.) -p0 Do not strip directory path prefix. Path intact. i.e. /usr/src/linux/... -p1 Strip first "/" in directory path. i.e. usr/src/linux/... -p2 Strip first directory in path. i.e. src/linux/... -p# Directory path "/" prefixes to strip (# - 1). Look at the patch file to see the directory path you will reference. View patch file: zcat patch-file.gz | more  HYPERLINK "http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=patch" patch man page.    =LPQ67DEIJ1267GHMNPQRST@ A B C D 忯jB*OJQJU^JphjB*OJQJU^JphjTB*OJQJU^JphCJaJjB*OJQJU^Jph0J5B*OJQJ\^JphB*OJQJ^JphjB*OJQJU^Jph7=NG4PRSU@ B D H$$If0]!!634a$If & Fdd$If[$\$^ $If^gD E F G n o p  , : M _ z \ o   . 4 G _ b  T U e f h i %&(̻ꢟꢟꢟ0JjB*OJQJU^Jph0JCJPJaJj0JB*Uph B*ph 0JB*phCJaJ#5B*CJOJQJ\^JaJphB*OJQJ^Jph j U j(U8D G o p x . O | qrr & Fdd$If[$\$ & Fdd$If[$\$ & Fdd$If[$\$$If$If@$K$L$If!  3634a$IfK$$If J q A b p  h (*3]e$If & Fdd$If[$\$$If$If$If & Fdd$If[$\$ & Fdd$If[$\$ & Fdd$If[$\$()st,-.Z["$uvrsmnef帅j0JB*UphCJaJ#5B*CJOJQJ\^JaJphj&B*OJQJU^Jph 0JB*ph$jhB*OJQJU^Jph0JjB*OJQJU^JphB*OJQJ^JphjB*OJQJU^Jph3eu rrSxxr$If & Fdd$If[$\$ & Fdd$If[$\$$If@$K$L$If!  3634a$IfK$$If & Fdd$If[$\$ fop}~/01VW'()JKnopGॸ|lZ#5B*CJOJQJ\^JaJphjB*OJQJU^Jph$j B*OJQJU^Jph$jyB*OJQJU^Jph0J$jB*OJQJU^JphjB*OJQJU^Jph5B*OJQJ\^JphCJaJ B*phB*OJQJ^Jphj0JB*Uph0JCJPJaJ# 56JR)*8e|}$IfK$$If}~npt4qqqkc$IfK$$If & Fdd$If[$\$$If$Ifq$K$L$If<#  0634<` abby B"j"q"$$%&P, & F dd$If[$\$  & F $If$If & Fdd$If[$\$$If@$K$L$If!  3634aG`Bvyz  ) * + > ? R g >!S!Y!Z!!!!!!""""##ojB*OJQJU^Jph5B*OJQJ\^Jph0jB*CJOJPJQJU^JaJph0jB*CJOJPJQJU^JaJph0JCJPJaJ0joB*CJOJPJQJU^JaJphj0JB*UphB*OJQJ^Jph 0JB*ph+#8#9#`#a#}#######$$$<$i$$$$$$$$%%&%N%O%P%e%f%j%k%%%%%%%%&&&&&&& ' '2'@(A((((((((((())))))$jB*OJQJU^Jph0J$j_B*OJQJU^Jph 0JB*ph 0JB*phjB*OJQJU^JphB*OJQJ^JphA&&&& '4''(()C)))u+%,4,..////  & F $If $If^ & F dd$If[$\$ $If^ $If[$\$^ & F dd$If[$\$))))^*k**+/+=+N+s+~+++++#,8,;,a,h, .P.R....////;/////0 022233334@4C4N4c4o444445D5E5F5M5O5c5j5x555555555556 66?6[6_6v6x60J6B*]ph0J5B*\ph 0JB*phB*OJQJ^Jph5B*OJQJ\^JphP/0P0o0000081222233C4c444557 & F dd$If[$\$ $If[$\$^  & F $If $If^ & F dd$If[$\$x6z6|6666/707o7p7q7777777788 888'858U8h8}8888888 99$92949J9L9h9999+:-:R:;;<ϹϹߜߜߜ族CJaJ56B*\]ph5B*\ph B*ph0J6B*]ph$joB*OJQJU^Jph0J$jB*OJQJU^JphjB*OJQJU^Jph 0JB*phB*OJQJ^Jph5B*OJQJ\^Jph27/77 88U8888 9949i9s9999S::::;$If $If^ $If[$\$^  & F $If & F dd$If[$\$ & F dd$If[$\$;P;;;;;;X<<!===Dvaaaaaa & F dd$If[$\$^ $If^q$K$L$If<#  0634<` ab$IfK$$If <<==p====0>1>?>@>X>g>>>???@@ @ @2@@@@@oAAAAAGBHBLBMBPBBBBBBBBBB!C#CGCCCCCCC D D5DǽǽڽǠǠǠǠ56B*\]ph5B*\ph0JCJPJaJj0JB*UphjB*Uph B*ph5B*OJQJ\^Jph0JjB*OJQJU^JphB*OJQJ^Jph 0JB*ph:==B>X> ?[??2@@ABBCHC]CdCoC$If p$If^p p$If[$\$^p  & F p$If & F dd$If[$\$ $If^ & F dd$If[$\$ & F dd$If[$\$^ $If^oCCCCC6DDDDDDD#E5ELEME$IfK$$If5DcDeDDEE"EMENEEEoFpF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LTEO&IWIDATcPܿH\7L , QB@ !lؠ y`&0Mhpb3IENDB`DdP  3 3"K((DdP  3 3"K((Dd{9<P  3 3"((Dd,,  c 2ANormalC"Æ0<!-- google_ad_client = "pub-8567479315106986"; google_ad_width = 160; google_ad_height = 600; google_ad_format = "160x600_as"; google_ad_channel =""; google_color_border = ["000000","6699CC","2D5893","191933"]; google_color_bg = ["F0F0F0","003366","99AACC","333366"]; google_color_link = ["0000FF","FFFFFF","000000","99CC33"]; google_color_url = ["008000","AECCEB","000099","FFCC00"]; google_color_text = ["000000","AECCEB","003366","FFFFFF"]; //--> type="text/javascript"b!X󆡑NBlnX󆡑NBPNG  IHDRfsRGB@}0PLTE{bIDATE!0Eq^uM&VUp\ &C|)"3.8̴(6 jPtsʄ&)NU- \^w& ^eyƾ_c|_^9IENDB`Dd,  c 2ANormalC"0 src="Linux%20Tutorial%20System%20Enhancements,%20Optimization%20and%20Compiling%20the%20Kernel_files/show_ads.js" type="text/javascript"b!X󆡑NB nX󆡑NBPNG  IHDRfsRGB@}0PLTE{bIDATE!0Eq^uM&VUp\ &C|)"3.8̴(6 jPtsʄ&)NU- \^w& ^eyƾ_c|_^9IENDB`Dd{9<P   3 3"((DyK F/C:\usr\src\linux-2.4\Documentation\ramdisk.txtDd{9<P   3 3"((DyK F(C:\usr\src\linux\include\linux\limits.hDyK FC:\usr\include\limits.hDyK F$C:\usr\src\linux\include\linux\fs.hDd{9<P   3 3"(( DyK FC:\usr\src\redhat\SOURCES\DyK FC:\usr\src\linux\DyK FC:\usr\src\linux-2.4\DyK FC:\usr\src\linux\READMEDyK FC:\usr\src\linux-2.4\READMEDyK F/C:\usr\src\linux-2.4\Documentation\modules.txtDyK F+C:\usr\src\linux\Documentation\modules.txtDd{9<P   3 3"(( Dd{9<P   3 3"(( DdP  3 3"K(( Dd{9<P  3 3"(( DdP  3 3"K((Dd{9<P  3 3"(( i8`8 NormalCJ_HaJmH sH tH J`J Heading 1dd@&[$\$5CJ0KH$\aJ0F`2F Heading 3dd@&[$\$5CJ\aJ>`B> Heading 4dd@&[$\$5\<A@< Default Paragraph FontFU`F Hyperlink$7>*B*OJQJS*Y(^Jo(phVV`V FollowedHyperlink$7>*B* OJQJS*Y(^Jo(ph@o@ textdd[$\$B*OJQJ^JphNo"N textbolddd[$\$5B*OJQJ\^Jph:^`2: Normal (Web)dd[$\$Fg`AF HTML TypewriterCJOJPJQJ^JaJe`R HTML Preformatted7 2( Px 4 #\'*.25@9CJOJPJQJ^JaJa!1+!/+!Hx/+!c1+!0P+,=/CTaaa}=NG4PRSU@BDGopx .O|JqAbp  h ( * 3 ] e u rr 56x>F N_`n,(E85x !B!j!!"#R#y##$%[&j&():)e))I*****+3+n+G, --3-- .y.. //=/F/:1e11?2M222333C3T3j3334 434445)5>555555$666W77$8*8x88A999h::)<<*=8=~=======!>l>>>>>??Y?k????}@ AjAAAApB5CC)DKDDDDDDEEZE\EnEEEE#FQFuFvFFFFHGGGG=H>HHHH%IOIPIIIIIJ2JKJLJdJJJJJJ=K_KKKKKKKKKKKKKKLLL&L'L)L>L?LALXLYL[LwLxLzLLLLLLLLLLLLLLLLLLLLLLMMM#M$M5MMNNqOOOOP P;P?@CEGHJKMNPQRSTUWXYZ\^_`acdg7P6DI16GM T e h  % s - Z u rmeo,f(^ %8`t8n[v"""e11112<2*8f8u898:A:3<}<<<=&=@@AATAfA5CCCD=ECEvFFFF@GFGGGG>HHHHI#INNOONOnOYZSZmaaaaXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX8@0(  H c $ ? HARDDRIVEHDPARMKERNELENHANCEMENT KERNELCOMPILEGRUBPATCHESTIPSINFOBOOKS?p 3Paaaa?p 3Paaaapv  ),:@BDJM_ewz\bdflo  .4L_U [  % * 1 K R " $ nkorxqv !U]h!$`$49_bchlr !!!!!!:!;!@!B!D!I!c!d!h!z!|!_"d""""""" ##I#O#W#_#####$ $-$1$f%s%%%%%%%&!&,&0&7&@&D&Y&&&'')$)?)I)j)q)x){)))));*A*I*S*w++ ,,.,7,#-0-8-;-o.v.~..../ /F/H/t/{///////////00000%040;0G0N0v0000 1(1M2O2]2k222222222<3@3_3h333334 4444444k5m5{5555667777778888889:A: <<.<<<<=&=4=7=====/>4>Z>^>t>z>??!?'???@@@@aAfAAAAACCBDJDPD]DDD>ECEhEmEEEEEEE%F.FFFAGFGGGHHHHI#ImIyIIIIII J JJFJJJJJJJJJ KK4K;KZK]KKKKK:MEM^McMMMMMMNNN$N*N3N>NONZNtNyNNNNOOOPP\PPPP QQ RR,R/RhRmR}SSSSTTUU7U;U=U?UCU^UUUUUUUVVVVWW&W+W,W9WTW[WWWWWWW0X1XhXjXkXpXXXXXXXXXXY"Y=Y@YPYbY|YYYVZXZnZuZwZyZ{ZZZZZZZZZZZZZZZZ[[`[s[z[}[[[[[[[[;\D\K\S\\\Z]e]]]+^8^?`L`~````RaVa]adaa}U [ densEM%.MRU]x}op  !!B!D!""##R#V###%%&!&&&]'^'B(C()):)>)e)i)))))I*S***3-7---y.}... / ///F/H/?2C2M2O22222j3q333334 4 44;4?444445 51555F5L55555$6+66667W7]777x8|89:A: <<*=.=8=;=~============)>.>t>z>>>>>>> ??!?'?a?e?s?w?-D0D>ECE^EaEEEEEFF%F.FSFZFFFAGFGGGGGHHI#IIIIIIIIIJJ2J7JJJKKKKQQ|SSSSnTrT7U;UlUqUhXjXXXVZXZwZyZ}[[o]] _ _&_'_J_M_z_{_________``9`:`S`U`y`z```````aaa:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::QQBBaaaaa Image v5.05PgE:\Secure\CIS228\Handouts\Linux Tutorial System Enhancements, Optimization and Compiling the Kernel.doc3'H0:p[% 320r6T;5 nM± Tfքzc W|1YLB ;\j9f Vxj$W1`c^`CJOJQJo(^`CJOJQJo(opp^p`CJOJQJo(@ @ ^@ `CJOJQJo(^`CJOJQJo(^`CJOJQJo(^`CJOJQ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Jo(opp^p`CJOJQJo(@ @ ^@ `CJOJQJo(^`CJOJQJo(^`CJOJQJo(^`CJOJQJo(^`CJOJQJo(PP^P`CJOJQJo(^`CJOJQJo(^`CJOJQJo(opp^p`CJOJQJo(@ @ ^@ `CJOJQJo(^`CJOJQJo(^`CJOJQJo(^`CJOJQJo(^`CJOJQJo(PP^P`CJOJQJo(^`CJOJQJo(^`CJOJQJo(opp^p`CJOJQJo(@ @ ^@ `CJOJQJo(^`CJOJQJo(^`CJOJQJo(^`CJOJQJo(^`CJOJQJo(PP^P`CJOJQJo(9f3'Vx6%\nMzc W020|1Y T;W1z F7XZ ?@p[b J8j7i^qWD ]8Ү4L)b 꺰:r,DlЗ&Dp Rz9uZ(=YvȾIx5uuP>&dk|d4+%"9 *8Fd:&gΒLฟog2 Z|3ڌִ|.l5ŜfqJ6NxN(JZhXYRt<VeRl*JT8dwq22(__yk@.(dYxjfrB(\o4^Z0fK\t87pB=PRSBGop j355*=??DDDDEEuFvFFFFHGGGG=H>HHHH%IOIPIIKJLJKKKKKKKKKKKLLL&L'L)L>L?LALXLYL[LwLxLzLLLLLLLLLLLLLLLLLLLLLLMMM#M$M P;Ppc33k2JLinux Tutorial: System Enhancements, Optimization and Compiling the Kernel Image v5.05P Image v5.05POh+'0(< T` |  KLinux Tutorial: System Enhancements, Optimization and Compiling the Kernelinu Image v5.05Pl: magmag Normal.dotP Image v5.05Pl: 2agMicrosoft Word 9.0t@F#@0JR@0JR$P՜.+,D՜.+,@ hp   RR DonnelleyARD)c KLinux Tutorial: System Enhancements, Optimization and Compiling the Kernel Title 8@ _PID_HLINKSA2b=http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=patch-=@http://www.kernel.org/pub/linux/kernel/v2.2/linux-2.2.20.tar.gzo(<ftp://ftp.microsoft.com/developr/drg/Plug-and-Play/PnpspecsK-http://www.roestock.demon.co.uk/isapnptools/x?http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=modinfoh ~>http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=depmodi{@http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=modprobeb x=http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=rmmodcu>http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=insmod|r=http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=lsmodfo?http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=modules%4l/http://yolinux.com/HOWTO/BootPrompt-HOWTO.html{iAhttp://node1.yo-linux.com/cgi-bin/man2html?cgi_command=bootparamkWfAhttp://node1.yo-linux.com/cgi-bin/man2html?cgi_command=lilo.conf pc<http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=liloo`@http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=mkinitrd@I].http://www.gnu.org/software/grub/grub.en.html#Z+C:\usr\src\linux\Documentation\modules.txt%W/C:\usr\src\linux-2.4\Documentation\modules.txtp"T;http://uwsg.iu.edu/hypermail/linux/kernel/0007.3/0587.html|/QC:\usr\src\linux-2.4\README)NC:\usr\src\linux\README+*K(http://www.kernel.org/pub/linux/kernel/`H:http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=ln!QEC:\usr\src\linux-2.4\"WBC:\usr\src\linux\Q"?C:\usr\src\redhat\SOURCES\w<$C:\usr\src\linux\include\linux\fs.hY|9C:\usr\include\limits.hwl6(C:\usr\src\linux\include\linux\limits.hdJ3Ahttp://node1.yo-linux.com/cgi-bin/man2html?cgi_command=sane-scsiA0Ihttp://node1.yo-linux.com/cgi-bin/man2html?cgi_command=sched_setaffinityp-?http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=tasksetek*(http://sourceforge.net/projects/iometer'9http://ssdweb01.storage.ibm.com/hdd/support/download.htm.$/C:\usr\src\linux-2.4\Documentation\ramdisk.txtqk!?http://www.linuxfocus.org/English/November1999/article124.htmlbx4http://www.linuxnetmag.com/en/issue7/m7hdparm1.html&http://linux.oreillynet.com/lpt/a/272e>http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=hdparme>http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=hdparmk4<http://yolinux.com/TUTORIALS/LinuxTutorialOptimization.htmlBOOKSi1<http://yolinux.com/TUTORIALS/LinuxTutorialOptimization.htmlINFOb* <http://yolinux.com/TUTORIALS/LinuxTutorialOptimization.htmlTIPS W <http://yolinux.com/TUTORIALS/LinuxTutorialOptimization.htmlPATCHES}$<http://yolinux.com/TUTORIALS/LinuxTutorialOptimization.htmlKERNELCOMPILEy8<http://yolinux.com/TUTORIALS/LinuxTutorialOptimization.htmlKERNELENHANCEMENTq1<http://yolinux.com/TUTORIALS/LinuxTutorialOptimization.html HARDDRIVE}nPNormal}nD Normal}nE Normal  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdeghijklmnopqrstvwxyz{|}~Root Entry FDCJRData f1TableuvWordDocument&SummaryInformation(DocumentSummaryInformation8 CompObjjObjectPoolDCJRDCJR  FMicrosoft Word Document MSWordDocWord.Document.89q