當前位置:首頁 » 編程軟體 » 內核關閉編譯優化

內核關閉編譯優化

發布時間: 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

熱點內容
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
醫院招商引資宣傳片腳本 發布:2025-05-15 00:01:21 瀏覽:368
linuxcftp伺服器 發布:2025-05-14 23:58:18 瀏覽:718
探岳什麼配置才有駕駛模式選擇 發布:2025-05-14 23:53:17 瀏覽:146