Linux内核编译选项学习(二)(***General setup***)(综合整理)

来源:互联网 发布:mac一键切换win10 编辑:程序博客网 时间:2024/04/28 02:46

   今天学习General setup部分。我想暂时不太可能把每个选项都学习到。一些重要的总应该学习到。先把选项贴出来。这里贴出的都为默认的选择。
  │ │    [*] Prompt for development and/or incomplete code/drivers   显示尚在开发中或尚未完成的代码与驱动.有许多设备可能必需选择这个选项才能进行配置,实际上它是安全的.
  │ │    ()  Cross-compiler tool prefix     交叉编译工具前缀,如果你要使用交叉编译工具的话输入相关前缀.默认不使用.不需要.
  │ │    ()  Local version - append to kernel release     在内核版本后面加上自定义的版本字符串(小于64字符),可以用"uname -a"命令看到.
  │ │    [ ] Automatically append version information to the version strin     自动在版本字符串后面添加版本信息,编译时需要有perl以及git仓库支持.
  │ │        Kernel compression mode (Gzip)  --->   内核压缩模式.  gzip,bzip2,lzma,lxo,一般可以按默认的gzip.
  │ │    ((none)) Default hostname   默认主机名称.  
  │ │    [*] Support for paging of anonymous memory (swap)     支持使用交换分区或者交换文件来做为虚拟内存.
  │ │    [*] System V IPC     System V进程间通信(IPC)支持,许多程序需要这个功能.
  │ │    [*] POSIX Message Queues   POSIX消息队列,这是POSIX IPC中的一部分,POSIX 表示可移植操作系统接口(Portable Operating System Interface).
  │ │    [*] BSD Process Accounting   将进程的统计信息写入文件的用户级系统调用,主要包括进程的创建时间/创建者/内存占用等信息.
  │ │    [*]   BSD Process Accounting version 3 file format     使用新的第三版文件格式,可以包含每个进程的PID和其父进程的PID,但是不兼容老版本的文件格式.
  │ │    [*] open by fhandle syscalls   打开文件可以通过句柄子系统调用.(If you say Y here, a user level program will be able to map file names to handle and then later use the handle for different file system operations. This is useful in implementing userspace file servers, which now track files using handlesinstead of names. The handle would remain the same even if file names get renamed.)
  │ │    -*- Export task/process statistics through netlink (EXPERIMENTAL)    通过netlink接口向用户空间导出任务/进程的统计信息,与BSD Process Accounting的不同之处在于这些统计信息在整个任务/进程生存期都是可用的.
  │ │    -*-   Enable per-task delay accounting (EXPERIMENTAL)     在统计信息中包含进程等候系统资源(cpu,IO同步,内存交换等)花费的时间.
  │ │    [*]   Enable extended accounting over taskstats (EXPERIMENTAL)   收集额外的进程统计信息并通过taskstats接口发送到用户空间.
  │ │    [*]   Enable per-task storage I/O accounting (EXPERIMENTAL)    在统计信息中包含I/O存储进程所花费的时间.
  │ │    -*- Auditing support   审计支持,某些内核模块(例如SELinux)需要它,只有同时选择其子项才能对系统调用进行审计.
  │ │    [*]   Enable system-call auditing support     支持对系统调用的审计.
  │ │    [ ]   Make audit loginuid immutable (NEW)   使得审计登录用户ID不可更改(自己翻译,具体作用不明确,新功能).
  │ │        IRQ subsystem  --->   中断请求子系统.  
  │ │        RCU Subsystem  --->   一个高性能的锁机制RCU 子系统.
  │ │    < > Kernel .config support     把内核的配置信息编译进内核中,以后可以通过scripts/extract-ikconfig脚本来提取这些信息.
  │ │    (17) Kernel log buffer size (16 => 64KB, 17 => 128KB)   内核日志缓冲大小. 
  │ │    -*- Control Group support  --->   添加对进程集合分组的支持,用来处理控制子系统如:CPUsets.CFS.内存控制或设备隔离.(This  option adds support for grouping sets of processes together, for use with process control subsystems such as Cpusets, CFS, memory controls or device isolation.).
  │ │    [ ] Checkpoint/restore support (NEW)   检查点和恢复支持.
  │ │    [*] Namespaces support  --->   命名空间支持.
  │ │    [*] Automatic process group scheduling   自动进程分组调度.优化调度器对通常的桌面工作量通过自动创建和填充进任务组.(This option optimizes the scheduler for common desktop workloads by automatically creating and populating task groups. This separation of workloads isolates aggressive CPU burners (like build jobs) from desktop applications. Task group autogeneration is currently based upon task session.)
  │ │    [ ] Enable deprecated sysfs features to support old userspace tools     在某些文件系统上(比如debugfs)提供从内核空间向用户空间传递大量数据的接口,不选吧.
  │ │    -*- Kernel->user space relay support (formerly relayfs)   在某些文件系统上(比如debugfs)提供从内核空间向用户空间传递大量数据的接口.
  │ │    [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support   初始RAM的文件和RAM磁盘( initramfs      /initrd)支持(如果要采用initrd启动则要选择,否则可以不选),不需要,不用选.
  │ │    ()    Initramfs source file(s)     initrd已经被initramfs取代,如果你不明白这是什么意思,请保持空白.
  │ │    [*]   Support initial ramdisks compressed using gzip            
  │ │    [*]   Support initial ramdisks compressed using bzip2           
  │ │    [*]   Support initial ramdisks compressed using LZMA            
  │ │    [*]   Support initial ramdisks compressed using XZ            
  │ │    [*]   Support initial ramdisks compressed using LZO   以上五项为支持初始化虚拟内存盘压缩使用gzip.bzip2.LZMA.XZ.LZO格式.      
  │ │    [ ] Optimize for size     编译时优化内核尺寸(使用"-Os"而不是"-O2"参数编译),有时会产生错误的二进制代码.
  │ │    [*] Configure standard kernel features (expert users)  --->     配置标准的内核特性(为专家用户).
  │ │    [*] Enable full-sized data structures for core     在内核中使用全尺寸的数据结构.禁用它将使得某些内核的数据结构减小以节约内存,但是将会降低性能.
  │ │    [*] Enable futex support    快速用户空间互斥体可以使线程串行化以避免竞态条件,也提高了响应速度.禁用它将导致内核不能正确的运行基于glibc的程序.
  │ │    [*] Enable eventpoll support      支持事件轮循的系统调用.
  │ │    [*] Enable signalfd() system call   启用signalfd()事件的文件描述符系统调用.
  │ │    [*] Enable timerfd() system call   启用timefd()事件的文件描述符系统调用.
  │ │    -*- Enable eventfd() system call   启用eventfd()事件的文件描述符系统调用.
  │ │    -*- Use full shmem filesystem   完全使用shmem来代替ramfs.shmem是基于共享内存的文件系统(可能用到swap),在启用TMPFS后可以挂载为tmpfs供用户空间使用,它比简单的ramfs先进许多.
  │ │    [*] Enable AIO support   允许POSIX异步I/O可能会被使用被一些高性能的线程程序(This option enables POSIX asynchronous I/O which may by used by some high performance threaded applications. Disabling this option saves about 7k.).  
  │ │    [ ] Embedded system   嵌入式系统. 
  │ │        Kernel Performance Events And Counters  --->   支持软件和硬件提供的各种性能事件(Enable kernel support for  various performance events provided by software and hardware.Software events are supported either built-in or via the use of generic tracepoints.Most modern CPUs support performance events via performance counter registers.).
  │ │    [*] Enable VM event counters for /proc/vmstat     允许在/proc/vmstat中包含虚拟内存事件记数器.
  │ │    [*] Enable PCI quirk workarounds   这能使工作区从各种PCI芯片组错误中恢复过来(This enables workarounds for various PCI chipset bugs/quirks. Disable this only if your target machine is unaffected by PCI quirks.).
  │ │    [*] Enable SLUB debugging support     支持SLUB内存分配管理器调试.
  │ │    [ ] Disable heap randomization   堆不可随机化  
  │ │        Choose SLAB allocator (SLUB (Unqueued Allocator))  --->   选择内存分配管理器(强烈推荐使用SLUB)SLAB:各种环境通用的内存分配管理器.SLUB :(Unqueued Allocator)更加优秀的内存分配管理器.SLOB:(Simple Allocator)嵌入式应用的内存分配管理.
  │ │    [*] Profiling support     支持系统评测(对于大多数用户来说并不是必须的).
  │ │    <M> OProfile system profiling     OProfile评测和性能监控工具.
  │ │    [ ]   OProfile multiplexing support (EXPERIMENTAL)   硬件计数器数字被限制(The number of hardware counters limited. The multiplexing feature enables OProfile to gather more events than counters are provided by the hardware. This is realized by switching between events at an user specified time interval.).
  │ │    [*] Kprobes   Kernel Dynamic Probes.内核动态探针.(provides a lightweight interface for kernel modules to implant probes and register corresponding probe handlers.).
  │ │    [*] Optimize trace point call sites   优化追踪点调用位置(If it is detected that the compiler has support for  "asm goto", the kernel will compile trace point locations with just a nop instruction. When trace points are enabled, the nop will be converted to a jump to the trace function.).
  │ │        GCOV-based kernel profiling  --->   这个选项允许gcov-based代码剖析(gcov是gnu/gcc工具库中的一个组件,一般来说,都被安装的)(This option enables gcov-based code profiling (e.g. for code coverage measurements).).

   要断电了。有一些是自己翻译的。多有不妥之处。后边应该还会给出修改。后两项暂时只有英文。(2012.05.03)

   今天对之前的进行排版,删除了一些内容,后两项进行了翻译,虽然很多选项还是不懂。之前装gentoo的时候,genoo自己的内核在装xorg时都出错了,然后就试着用之前下载的kernel-3.3.3,改了一些针对xorg和nvidia显卡的选项,然后就编译了,很多地方的配置都没有优化,之前发现gentoo的根目录占用空间好大。今天查看了一下,原来在/usr/src的kernel-3.3.3中就占了N大的空间,这就是木有进行优化的后果啊。刚刚看到[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support这项,想起gentoo里并不需要initrd RAM来启动,所以是不用选的,当然还有很多,比如在设备驱动上,很多硬件驱动并不是自己所需要的,本来装gentoo就是要定制,所以之后要学的还有很多。(2012.05.12)

原创粉丝点击