当前位置:首页 » 编程软件 » 内核关闭编译优化

内核关闭编译优化

发布时间: 2022-11-05 04:29:27

编译内核的目的是什么重新编译内核有什么好处重新编译内核的步骤有哪些

> 编译内核的目的是什么?重新编译内核有什么好处?
编译内核的目的主要是改变内核的默认选项,比如内核原来不支持某硬件,原因是内核的相应选项默认状态是disactivated,需要改变。
当然,也有人把新版的linux装在旧机子上。这样,许多在内核里activated的硬件,他没有,将来也不需要。那么,就可以在内核里去掉。以及一些服务、特殊的功能等等,如果用不着,比如机子是服务器的话,最好在内核里关掉,"精兵简政"。这是以系统安全和提高效率为目的。
> 重新编译内核的步骤有哪些?
具体不好说,这取决于你装了哪个linux, 哪个版本,等等。最好请你阅读在线文档、说明书,或参考有关专业书刊。

② 如何关掉autoconf的优化编译选项

在调测一些C/C++开源代码时,经常需要编译生成带有调试信息,并且未进行编译期优化的软件版本,经过查阅autoconf的资料并实际尝试,发现可以使用如下方式关闭编译期优化(默认情况下autoconf会自动以 -O2 配置编译参数)。
./configure CFLAGS='-g -O0' CXXFLAGS='-g -O0'

③ linux为什么要编译内核

Linux内核版本是不断更新的,通常,更新的内核会支持更多的硬件,具备更好的进程管理能力,运行速度更快、 更稳定,并且一般会修复老版本中发现的许多漏洞等。而已安装好的Linux系统如果不是滚动升级的,或者没有内核更新选择的话,如果用户想要使用这些新特性,或想根据自己的硬件平台定制一个更高效,更稳定,更快速的内核,就需要重新编译内核。

下载源码编译内核,如果不做相关优化,直接编译,结果就跟现在正在使用的系统没什么区别。

学习linux驱动,必须要有实践的平台环境吧,至于需不需要购置平台,要看你的学习目的了。

④ keil uvision4 stm32 如何降低编译优化设置

keil-project-options for target-选项卡c/c++
左侧中间有个optimization 后面的对应的就是编译优化设置
level 0就是不优化

⑤ 关于ubuntu内核编译的问题

解决办法 修改 menu.lst 将 root=/UUIDxxxxxxx 这个改为 root=/dev/sdax
另外 从Filesystem type is ntfs.partition type 0x07 这一行我大概可看出,你是wubi安装的, 这种情况 我建议你重新编译内核并生成initrd, 因为内核不支持uuid的,initrd才支持,如果把filesystem编译进内核了,启动不用initrd.img的话,就只能用root=/dev/sdax的参数作为内核引导参数…

所以关键在于 一定要打开initrd支持并生成initrd

至于具体在那里,我这边环境所限无法告知, 麻烦你自己在make menuconfig里面仔细看看或者google一下

/dev/sdxx 是你的硬盘的/的设备名称 可以用正常启动的内核引导后 输入sudo df -h或者 sudo fdisk -l

目前的机器来讲 编译20分钟很正常, 我的内核优化的很小 大概十分钟左右就编译完了 .

另外 内核源码解开后会占用接近200M的空间, 而gcc编译内核和大型软件时候产生的临时文件占用好几百M乃至上G是很常见的的, 可以进入源代码文件夹运行 make clean && make mrproper 来清理一下

⑥ 如何编译内核及制作RPM包

前言

要编译自内核能各种同答案列举:
1 研究习内核源码
2 支持新硬件或者打某项内核功能
3 升级内核更新版本
4 按自要求定制优化内核功能
种种...
折腾需要理由我说面直接进入主题
编译式
编译内核种式kernel.org载选择载需要版本内核源码
:linux-2.6.32-rc1.tar.bz2载内核源码/home/user/目录进入载目录解压压缩

#cd /home/user/
#tar -xjvf linux-2.6.32-rc1.tar.bz2

二 准备编译环境

始前首先确认面软件包已经安装(编译标普华4.0直接全部安装CD3保证条件)
* rpmdevtools
* yum-utils
fedora系统使用命令安装:
#yum install yum-utils rpmdevtools

1. rpmbuild命令工作所需目录树面命令完该操作手建立目录树
命令建立:
#rpmdev-setuptree

命令/usr/src/rpmbuild/目录目录结构(位置没则能前用户目录).

# tree /usr/src/rpmbuild/
rpmbuild/
|-- BUILD
|-- RPMS
|-- SOURCES
|-- SPECS
`-- SRPMS
面部rpmbuild环境建立rpm
3. 安装内核源码包需要依赖组件(跳步操作)

su -c 'yum-builddep kernel-.src.rpm'
4.安装内核源码系统默认目录/usr/src/neoshine:

rpm -Uvh kernel-.src.rpm

三 配置内核(config配置文件)

面介绍何解源码包并修改配置重新打包源码
1. 解源码包并打所补丁BUILD目录

cd ~/rpmbuild/SPECS
rpmbuild -bp --target=`uname -m` kernel.spec

kernel源码找:

/usr/src/neoshine/rpmbuild/BUILD/kernel-/linux-. directory

配置内核源码
1. 进入内核源码:

cd ~/rpmbuild/BUILD/kernel-2.6.$ver/linux-2.6.$ver.$arch/
2. 复制/boot/config*配置文件源码目录,config文件已经配或者其备份kernel配置文件:

cp /boot/config2.6- 2.6.$ver.$arch .config
3. 先检查kernel配置新增选项:

make oldconfig
4. 定制内核功能关闭initrd支持选项执行图形化内核配置工具:

make menuconfig
注:generic setup选项找initial RAM system and RAM disk(initramfs and initrd) support 项取消编译同确保跟文件系统应驱系统所存储器应驱都已经编译内核(否则启系统).

5. .config文件第行改面内容(注意:没行面编译报错)

# i386
6. 拷贝.configSOURCES/:

cp .config ../SOURCES/config-$arch

四 编译新内核

1. 面始准备编译新内核包
打SPEC/kernel.spec

vim SPEC/kernel.spec
改变面行内容定制自内核扩展名(fc10类):

%define buildid .
步新内核rpm包程需要编译内核源码包
使用面命令新内核源码包
rpmbuild -bb --with baseonly --without debuginfo --target=`uname -m` kernel.spec

参数说明:bb表示编译二进制包即源码包without debuginfo 表示没调试信息
target=`uname -r`表示应前平台内核包
面命令功执行完BUILD/i686目录新内核安装包

五 安装新内核

rpm -ivh kernel-$ver-$arch.rpm
步操作自安装内核boot目录安装应内核模块/lib/moles/目录并且新内核应grub引导菜单
修改grub引导菜单格式

title new kernel
kernel /boot/vmlinuz-$ver-$arch root=/dev/sdax(hdax)

注意处要使用uuid指定跟文件系统(能挂载根区导致内核死机)要再加显示相关参数(内核支持应设置看黑黑屏幕)
至禁用initrd新内核配置安装完毕

java 编译优化问题

java编译的结果是字节码而不是二进制,所以在运行时vm的优化才是重要的,包括VM的回收策略、分配给VM内存的大小都能在一定程度上影响性能。Sun的VM支持热点编译,对高频执行的代码段翻译的2进制会进行缓存,这也是VM的一种优化。

IBM JVM处理数学运算速度最快,BEA JVM处理大量线程和网络socket性能最好,而Sun JVM处理通常的商业逻辑性能最好。不过Hotspot的Server mode被报告有稳定性的问题。

Java 的最大优势不是体现在执行速度上,所以对Compiler的要求并不如c++那样高,代码级的优化还需要程序员本身的功底。

贴个java的运行参数:

Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)

where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.

-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print proct version and exit
-version:<value>
require the specified version to run
-showversion print proct version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see

java.lang.instrument

-Xmixed mixed mode execution (default)
-Xint interpreted mode execution only
-Xbootclasspath:<directories and zip/jar files separated by ;>
set search path for bootstrap classes and resources
-Xbootclasspath/a:<directories and zip/jar files separated by ;>
append to end of bootstrap class path
-Xbootclasspath/p:<directories and zip/jar files separated by ;>
prepend in front of bootstrap class path
-Xnoclassgc disable class garbage collection
-Xincgc enable incremental garbage collection
-Xloggc:<file> log GC status to a file with time stamps
-Xbatch disable background compilation
-Xms<size> set initial Java heap size
-Xmx<size> set maximum Java heap size
-Xss<size> set java thread stack size
-Xprof output cpu profiling data
-Xfuture enable strictest checks, anticipating future default
-Xrs rece use of OS signals by Java/VM (see

documentation)
-Xcheck:jni perform additional checks for JNI functions
-Xshare:off do not attempt to use shared class data
-Xshare:auto use shared class data if possible (default)
-Xshare:on require using shared class data, otherwise fail.

Java虚拟机(JVM)参数配置说明

在Java、J2EE大型应用中,JVM非标准参数的配置直接关系到整个系统的性能。
JVM非标准参数指的是JVM底层的一些配置参数,这些参数在一般开发中默认即可,不需

要任何配置。但是在生产环境中,为了提高性能,往往需要调整这些参数,以求系统达

到最佳新能。
另外这些参数的配置也是影响系统稳定性的一个重要因素,相信大多数Java开发人员都

见过“OutOfMemory”类型的错误。呵呵,这其中很可能就是JVM参数配置不当或者就没

有配置没意识到配置引起的。

为了说明这些参数,还需要说说JDK中的命令行工具一些知识做铺垫。

首先看如何获取这些命令配置信息说明:
假设你是windows平台,你安装了J2SDK,那么现在你从cmd控制台窗口进入J2SDK安装目

录下的bin目录,然后运行java命令,出现如下结果,这些就是包括java.exe工具的和

JVM的所有命令都在里面。

-----------------------------------------------------------------------
D:\j2sdk15\bin>java
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)

where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.

-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print proct version and exit
-version:<value>
require the specified version to run
-showversion print proct version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see

java.lang.instrument
-----------------------------------------------------------------------
在控制台输出信息中,有个-X(注意是大写)的命令,这个正是查看JVM配置参数的命

令。

其次,用java -X 命令查看JVM的配置说明:
运行后如下结果,这些就是配置JVM参数的秘密武器,这些信息都是英文的,为了方便

阅读,我根据自己的理解翻译成中文了(不准确的地方还请各位博友斧正)
-----------------------------------------------------------------------
D:\j2sdk15\bin>java -X
-Xmixed mixed mode execution (default)
-Xint interpreted mode execution only
-Xbootclasspath:<directories and zip/jar files separated by ;>
set search path for bootstrap classes and resources
-Xbootclasspath/a:<directories and zip/jar files separated by ;>
append to end of bootstrap class path
-Xbootclasspath/p:<directories and zip/jar files separated by ;>
prepend in front of bootstrap class path
-Xnoclassgc disable class garbage collection
-Xincgc enable incremental garbage collection
-Xloggc:<file> log GC status to a file with time stamps
-Xbatch disable background compilation
-Xms<size> set initial Java heap size
-Xmx<size> set maximum Java heap size
-Xss<size> set java thread stack size
-Xprof output cpu profiling data
-Xfuture enable strictest checks, anticipating future default
-Xrs rece use of OS signals by Java/VM (see

documentation)
-Xcheck:jni perform additional checks for JNI functions
-Xshare:off do not attempt to use shared class data
-Xshare:auto use shared class data if possible (default)
-Xshare:on require using shared class data, otherwise fail.

The -X options are non-standard and subject to change without notice.
-----------------------------------------------------------------------

JVM配置参数中文说明:
-----------------------------------------------------------------------
1、-Xmixed mixed mode execution (default)
混合模式执行

2、-Xint interpreted mode execution only
解释模式执行

3、-Xbootclasspath:<directories and zip/jar files separated by ;>
set search path for bootstrap classes and resources
设置zip/jar资源或者类(.class文件)存放目录路径

3、-Xbootclasspath/a:<directories and zip/jar files separated by ;>
append to end of bootstrap class path
追加zip/jar资源或者类(.class文件)存放目录路径

4、-Xbootclasspath/p:<directories and zip/jar files separated by ;>
prepend in front of bootstrap class path
预先加载zip/jar资源或者类(.class文件)存放目录路径

5、-Xnoclassgc disable class garbage collection
关闭类垃圾回收功能

6、-Xincgc enable incremental garbage collection
开启类的垃圾回收功能

7、-Xloggc:<file> log GC status to a file with time stamps
记录垃圾回日志到一个文件。

8、-Xbatch disable background compilation
关闭后台编译

9、-Xms<size> set initial Java heap size
设置JVM初始化堆内存大小

10、-Xmx<size> set maximum Java heap size
设置JVM最大的堆内存大小

11、-Xss<size> set java thread stack size
设置JVM栈内存大小

12、-Xprof output cpu profiling data
输入CPU概要表数据

13、-Xfuture enable strictest checks, anticipating future default
执行严格的代码检查,预测可能出现的情况

14、-Xrs rece use of OS signals by Java/VM (see

documentation)
通过JVM还原操作系统信号

15、-Xcheck:jni perform additional checks for JNI functions
对JNI函数执行检查

16、-Xshare:off do not attempt to use shared class data
尽可能不去使用共享类的数据

17、-Xshare:auto use shared class data if possible (default)
尽可能的使用共享类的数据

18、-Xshare:on require using shared class data, otherwise fail.
尽可能的使用共享类的数据,否则运行失败

The -X options are non-standard and subject to change without notice.

⑧ 如何在命令行中使用intel c++编译器,并使用openmp和mkl来编译自己的程序,并运算

1、icc

Intel C/C++编译器接受遵守ANSI C/C++ , ISO C/C++ standards,GNU inline ASM for IA-32 architecture标准的输入。与linux下常用的gcc兼容并支持更大的C语言扩展,包括源文件、命令行参数、目标文件。不支持gcc的inline方式的汇编。例,f.c

#include<stdio.h>

int main(int argc, char* argv[]){

printf("Hello\n");

return 0;

}

编译:icc -c f.cpp -o f.o

链接:icc f.o -o f

运行:./f

注意,编译与链接都由icc来完成,icc常用命令行参数:

-o 输出文件命名

-I include路径

-L lib路径

-l 包含的lib名

-c 仅生成目标文件(*.o),不链接

-On n=0,1,2,3 编译器优化选项,n=0关闭编译器优化,n=3使用最激进的优化

-c99[-] 打开/关闭 c99规范的支持

详细的请参照icc的manpage.

2、ifort

Intel Fortran编译器支持F77/90/95标准并与CFV(Compaq Visual Fortran)兼容。例,f.f90

program f

print *, "Hello"

stop

end

编译:ifort -c f.f90 -o f.o

链接:ifort f.o -o f

运行:./f

编译与连接同样由ifort来完成,ifort常用命令行参数:

-o 输出文件命名

-I include路径

-L lib路径

-l 包含的lib名

-c 仅生成目标文件(*.o),不链接

-On n=0,1,2,3 编译器优化选项,n=0关闭编译器优化,n=3使用最激进的优化

-std90 使用F90标准编译

-std95 使用F 95标准编译

-f77rtl 编译使用F77运行方式的代码(用于解决特殊问题)

These options optimize application performance for a particular Intel? processor or family of processors. The compiler generates code that takes advantage of features of the specified processor.

Option

Description
tpp5 or G5 Optimizes for Intel? Pentium? and Pentium? with MMX? technology processors.
tpp6 or G6 Optimizes for Intel? Pentium? Pro, Pentium? II and Pentium? III processors.
tpp7 or G7 Optimizes for Intel? Pentium? 4, Intel? Xeon?, Intel? Pentium? M processors, and Intel? Pentium? 4 processors with Streaming SIMD Extensions 3 (SSE3) instruction support.
On Intel? EM64T systems, only option tpp7 (Linux) or G7 (Windows) is valid.

About tpp:

http://www.ncsa.illinois.e/UserInfo/Resources/Software/Intel/Compilers/9.0/main_for/mergedProjects/copts_for/common_options/option_tpp567_g567.htm

https://wiki.ke.e/display/SCSC/Compilers+and+Libraries

Intel Fortran Compiler Options: http://geco.mines.e/guide/ifort.html

Intel(R) Fortran Compiler Options: http://www.rcac.pure.e/userinfo/resources/common/compile/compilers/intel/man/ifort.txt

ifort编译器提供了非常多的优化参数

$ ifort --help | more 查看就可以
也可以定位到某个参数

$ifort --help | grep -5 '-mkl'
-5表示显示查找到的行及下面5行的内容。

3、Intel MKL数学库针对Intel系列处理器进行了专门的优化,主要包含的库有:

基本线形代数运算(BLAS)

向量与向量、向量与矩阵、矩阵与矩阵的运算

稀疏线形代数运算

快速傅立叶变换(单精度/双精度)

LAPACK(求解线形方程组、最小方差、特征值、Sylvester方程等)

向量数学库(VML)

向量统计学库(VSL)

高级离散傅立叶变换

编译:

icc multi.c -I/opt/intel/mkl/include –L/intel/mkl/lib –lmpi_ipf –o multi

4、MPI程序编译

消息传递接口(MPI)并行程序设计模型程序的编译命令。例,f.c

include<stdio.h>

#include<mpi.h>

main(argc,argv)

int argc;

char *argv[];

{

char name[BUFSIZ];

int length;

MPI_Init(&argc,&argv);

MPI_Get_processor_name(name, &length);

printf("%s: hello world\n", name);

MPI_Finalize();

}

编译与连接均使用mpicc,参数与mpicc中定义的编译器相同,这里与icc相同。

mpicc –c hello.c –o hello.o

mpicc hello.o –o hello

运行使用mpirun 命令,将运行需要的节点定义在文件中并在-machinfile中制定。

文件: nodelist

node1

node1

node2

node3

运行:

$mpirun –machefile nodelist –np 4 ./hello

node1: hello world

node1: hello world

node2: hello world

node3: hello world

5、32位向64位的移植

32位程序到64位移植中应注意的常见问题:

数据截断:

由于long类型变量的运算(赋值、比较、移位等)产生。long定义在x86上为32bits,而在ia64上为64bits.容易在与int型变量运算时出现异常。

处理方法:尽量避免不同类型变量间的运算,避免将长度较长的变量赋值到较短的变量中,统一变量长度可以解决这个问题。简单的对于32位转移到64位可以将所有long定义转换为int定义。

⑨ linux内核编译详细教程及开发Linux系统

已发送到[email protected]

⑩ 技术问题

Code maturity level options
代码成熟度选项

Prompt for development and/or incomplete code/drivers
显示尚在开发中或尚未完成的代码与驱动.除非你是测试人员或者开发者,否则请勿选择

General setup
常规设置

Local version - append to kernel release
在内核版本后面加上自定义的版本字符串(小于64字符),可以用"uname -a"命令看到
Automatically append version information to the version string
自动在版本字符串后面添加版本信息,编译时需要有perl以及git仓库支持
Support for paging of anonymous memory (swap)
使用交换分区或者交换文件来做为虚拟内存
System V IPC
System V进程间通信(IPC)支持,许多程序需要这个功能.必选,除非你知道自己在做什么

IPC Namespaces
IPC命名空间支持,不确定可以不选

POSIX Message Queues
POSIX消息队列,这是POSIX IPC中的一部分
BSD Process Accounting
将进程的统计信息写入文件的用户级系统调用,主要包括进程的创建时间/创建者/内存占用等信息

BSD Process Accounting version 3 file format
使用新的第三版文件格式,可以包含每个进程的PID和其父进程的PID,但是不兼容老版本的文件格式

Export task/process statistics through netlink
通过netlink接口向用户空间导出任务/进程的统计信息,与BSD Process Accounting的不同之处在于这些统计信息在整个任务/进程生存期都是可用的

Enable per-task delay accounting
在统计信息中包含进程等候系统资源(cpu,IO同步,内存交换等)所花费的时间

UTS Namespaces
UTS名字空间支持,不确定可以不选
Auditing support
审计支持,某些内核模块(例如SELinux)需要它,只有同时选择其子项才能对系统调用进行审计

Enable system-call auditing support
支持对系统调用的审计

Kernel .config support
把内核的配置信息编译进内核中,以后可以通过scripts/extract-ikconfig脚本来提取这些信息

Enable access to .config through /proc/config.gz
允许通过/proc/config.gz访问内核的配置信息

Cpuset support
只有含有大量CPU(大于16个)的SMP系统或NUMA(非一致内存访问)系统才需要它
Kernel->user space relay support (formerly relayfs)
在某些文件系统上(比如debugfs)提供从内核空间向用户空间传递大量数据的接口
Initramfs source file(s)
initrd已经被initramfs取代,如果你不明白这是什么意思,请保持空白
Optimize for size (Look out for broken compilers!)
编译时优化内核尺寸(使用"-Os"而不是"-O2"参数编译),有时会产生错误的二进制代码
Enable extended accounting over taskstats
收集额外的进程统计信息并通过taskstats接口发送到用户空间
Configure standard kernel features (for small systems)
配置标准的内核特性(为小型系统)

Enable 16-bit UID system calls
允许对UID系统调用进行过时的16-bit包装
Sysctl syscall support
不需要重启就能修改内核的某些参数和变量,如果你也选择了支持/proc,将能从/proc/sys存取可以影响内核行为的参数或变量
Load all symbols for debugging/kksymoops
装载所有的调试符号表信息,仅供调试时选择

Include all symbols in kallsyms
在kallsyms中包含内核知道的所有符号,内核将会增大300K
Do an extra kallsyms pass
除非你在kallsyms中发现了bug并需要报告这个bug才打开该选项

Support for hot-pluggable devices
支持热插拔设备,如usb与pc卡等,Udev也需要它
Enable support for printk
允许内核向终端打印字符信息,在需要诊断内核为什么不能运行时选择
BUG() support
显示故障和失败条件(BUG和WARN),禁用它将可能导致隐含的错误被忽略
Enable ELF core mps
内存转储支持,可以帮助调试ELF格式的程序
Enable full-sized data structures for core
在内核中使用全尺寸的数据结构.禁用它将使得某些内核的数据结构减小以节约内存,但是将会降低性能
Enable futex support
快速用户空间互斥体可以使线程串行化以避免竞态条件,也提高了响应速度.禁用它将导致内核不能正确的运行基于glibc的程序
Enable eventpoll support
支持事件轮循的系统调用
Use full shmem filesystem
启用shmem支持.shmem是基于共享内存的文件系统(可能用到swap),在启用TMPFS后可以挂载为tmpfs供用户空间使用,它比简单的ramfs先进许多
Use full SLAB allocator
使用SLAB完全取代SLOB进行内存分配,SLAB是一种优秀的内存分配管理器,推荐使用
Enable VM event counters for /proc/vmstat
允许在/proc/vmstat中包含虚拟内存事件记数器

Loadable mole support
可加载模块支持

Enable loadable mole support
打开可加载模块支持,如果打开它则必须通过"make moles_install"把内核模块安装在/lib/moles/中

Mole unloading
允许卸载已经加载的模块

Forced mole unloading
允许强制卸载正在使用中的模块(比较危险)

Mole versioning support
允许使用其他内核版本的模块(可能会出问题)
Source checksum for all moles
为所有的模块校验源码,如果你不是自己编写内核模块就不需要它
Automatic kernel mole loading
让内核通过运行modprobe来自动加载所需要的模块,比如可以自动解决模块的依赖关系

Block layer
块设备层

Enable the block layer
块设备支持,使用硬盘/USB/SCSI设备者必选

Support for Large Block Devices
仅在使用大于2TB的块设备时需要
Support for tracing block io actions
块队列IO跟踪支持,它允许用户查看在一个块设备队列上发生的所有事件,可以通过blktrace程序获得磁盘当前的详细统计数据
Support for Large Single Files
仅在可能使用大于2TB的文件时需要
IO Schelers
IO调度器

Anticipatory I/O scheler
适用于大多数环境,但不太合适数据库应用
Deadline I/O scheler
通常与Anticipatory相当,但更简洁小巧,更适合于数据库应用
CFQ I/O scheler
为所有进程分配等量的带宽,适合于桌面多任务及多媒体应用
Default I/O scheler
默认IO调度器

Processor type and features
中央处理器(CPU)类型及特性

Symmetric multi-processing support
对称多处理器支持,如果你有多个CPU或者使用的是多核CPU就选上.此时"Enhanced Real Time Clock Support"选项必须开启,"Advanced Power Management"选项必须关闭
Subarchitecture Type
处理器的子架构,大多数人都应当选择"PC-compatible"
Processor family
处理器系列,请按照你实际使用的CPU选择
Generic x86 support
通用x86支持,如果你的CPU能够在上述"Processor family"中找到就别选
HPET Timer Support
HPET是替代8254芯片的新一代定时器,i686及以上级别的主板都支持,可以安全的选上
Maximum number of CPUs
支持的最大CPU数,每增加一个内核将增加8K体积
SMT (Hyperthreading) scheler support
支持Intel的超线程(HT)技术
Multi-core scheler support
针对多核CPU进行调度策略优化
Preemption Model
内核抢占模式

No Forced Preemption (Server)
适合服务器环境的禁止内核抢占
Voluntary Kernel Preemption (Desktop)
适合普通桌面环境的自愿内核抢占
Preemptible Kernel (Low-Latency Desktop)
适合运行实时程序的主动内核抢占

Preempt The Big Kernel Lock
可以抢占大内核锁,应用于实时要求高的场合,不适合服务器环境
Machine Check Exception
让CPU检测到系统故障时通知内核,以便内核采取相应的措施(如过热关机等)

Check for non-fatal errors on AMD Athlon/Duron / Intel Pentium 4
每5秒检测一次这些cpu的非致命错误并纠正它们,同时记入日志
check for P4 thermal throttling interrupt
当P4的cpu过热时显示一条警告消息

Enable VM86 support
虚拟X86支持,在DOSEMU下运行16-bit程序或XFree86通过BIOS初始化某些显卡的时候才需要
Toshiba Laptop support
Toshiba笔记本模块支持
Dell laptop support
Dell笔记本模块支持
Enable X86 board specific fixups for reboot
修正某些旧x86主板的重起bug,这种主板基本绝种了
/dev/cpu/microcode - Intel IA32 CPU microcode support
使用不随Linux内核发行的IA32微代码,你必需有IA32微代码二进制文件,仅对Intel的CPU有效
/dev/cpu/*/msr - Model-specific register support
在多cpu系统中让特权CPU访问x86的MSR寄存器
/dev/cpu/*/cpuid - CPU information support
能从/dev/cpu/x/cpuid获得CPU的唯一标识符(CPUID)
Firmware Drivers
固件驱动程序

BIOS Enhanced Disk Drive calls determine boot disk
有些BIOS支持从某块特定的硬盘启动(如果BIOS不支持则可能无法启动),目前大多数BIOS还不支持
BIOS update support for DELL systems via sysfs
仅适用于DELL机器
Dell Systems Management Base Driver
仅适用于DELL机器

High Memory Support
最高内存支持,总内存小于等于1G的选"off",大于4G的选"64G"
Memory split
如果你不是绝对清楚自己在做什么,不要改动这个选项
Memory model
一般选"Flat Memory",其他选项涉及内存热插拔
64 bit Memory and IO resources
使用64位的内存和IO资源
Allocate 3rd-level pagetables from highmem
在内存很多(大于4G)的机器上将用户空间的页表放到高位内存区,以节约宝贵的低端内存
Math emulation
数学协处理器仿真,486DX以上的cpu就不要选它了
MTRR (Memory Type Range Register) support
打开它可以提升PCI/AGP总线上的显卡2倍以上的速度,并且可以修正某些BIOS错误
Boot from EFI support
EFI是一种可代替传统BIOS的技术(目前的Grub/LILO尚不能识别它),但是现在远未普及
Enable kernel irq balancing
让内核将irq中断平均分配给多个CPU以进行负载均衡,但是要配合irqbanlance守护进程才行
Use register arguments
使用"-mregparm=3"参数编译内核,将前3个参数以寄存器方式进行参数调用,可以生成更紧凑和高效的代码
Enable seccomp to safely compute untrusted bytecode
只有嵌入式系统可以不选
Timer frequency
内核时钟频率,桌面推荐"1000 HZ",服务器推荐"100 HZ"或"250 HZ"
kexec system call
提供kexec系统调用,可以不必重启而切换到另一个内核
kernel crash mps
被kexec启动后产生内核崩溃转储
Physical address where the kernel is loaded
内核加载的物理地址,除非你知道自己在做什么,否则不要修改.在提供kexec系统调用的情况下可能要修改它
Support for hot-pluggable CPUs
对热插拔CPU提供支持
Compat VDSO support
如果Glibc版本大于等于2.3.3就不选,否则就选上

更多问题请点这里:http://www.chinaunix.net/jh/4/885597.html

热点内容
手机ea服务器连不上怎么办 发布:2025-05-15 01:35:03 浏览:450
数据库数据插入语句 发布:2025-05-15 01:30:01 浏览:871
js是无需编译直接运行吗 发布:2025-05-15 01:28:30 浏览:476
android文件夹重命名 发布:2025-05-15 01:13:50 浏览:481
cns脚本 发布:2025-05-15 01:13:38 浏览:722
数据结构与算法笔试题 发布:2025-05-15 01:04:20 浏览:417
搜狗输入法如何直接编辑配置文件 发布:2025-05-15 00:51:47 浏览:668
电箱都有哪些配置 发布:2025-05-15 00:30:21 浏览:74
安卓qq邀请码在哪里寻找 发布:2025-05-15 00:02:04 浏览:35
三菱fx编程口 发布:2025-05-15 00:01:23 浏览:810