mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
[Translated] 10 The Linux Kernel--Configuring the Kernel Part 6
This commit is contained in:
parent
4d4449d015
commit
3f1ea74b30
@ -1,99 +0,0 @@
|
||||
Translating------------------------geekpi
|
||||
|
||||
10 The Linux Kernel: Configuring the Kernel Part 6
|
||||
================================================================================
|
||||
![](http://www.linux.org/attachments/slide-jpeg.464/)
|
||||
|
||||
Welcome to the next article on configuring the Linux kernel! There are still numerous options to configure. This particular article will mainly discuss configuring PCI and ACPI.
|
||||
|
||||
Here, we can enable support for ACPI-controlled docking stations and removable drive bays (Dock). Remember, ACPI (Advanced Configuration and Power Management Interface) is a power management system. A docking station is a device that allows extra devices to be plugged in through extra ports. A docking station may contain many various ports and connectors. So, an ACPI-controlled docking station is a docking station that has its power managed by ACPI. A drive bay is a set of hardware for adding hard-drives. This too can be managed by ACPI.
|
||||
|
||||
Next, we can allow ACPI to be used as the idle manager for the CPU (Processor). This will cause the processor to enter the ACPI C2 and C3 states when idle. This will save power and reduce the temperature of the CPU chip. Processors only idle when they are 100% free. No application must request CPU resources for a set period of time.
|
||||
|
||||
There are four CPU power states – C0, C1, C2, and C3. C0 is the active operating state. C1 (Halt) is an active state that is not executing instructions, but can do so instantly. C2 (Stop-Clock) is a powered down state. C3 (Sleep) is more powered down than C2. In C3, the cache is now longer synchronized or managed until the CPU leaves this state. There is a fifth state called C1E (Enhanced Halt State) that has lower power consumption.
|
||||
|
||||
If the IPMI driver is enabled, then ACPI can access the BMC controller (IPMI). A Baseboard Management Controller is a microcontroller that manages the connection between the software and hardware. The Intelligent Platform Management Interface (IPMI) is a framework for managing the computer through a direct network at the hardware level rather than going through a login shell or the operating system.
|
||||
|
||||
The ACPI v4.0 process aggregator allows the kernel to apply a CPU configuration to all processors on the system (Processor Aggregator). As of ACPI v4.0, only idling can be configured with this method.
|
||||
|
||||
After that, the ACPI thermal zone can be enabled (Thermal Zone). Most hardware supports this feature. This allows the fan's power to be managed by ACPI.
|
||||
|
||||
A custom DSDT can be linked to the kernel if this option is enabled (Custom DSDT Table file to include). In this setting, the developer must include the full path name to the file. The Differentiated System Description Table is a file that contains the system's information for supported power events. It is not required to enter a path name. These tables exist on the firmware. The kernel will handle this for you. The main purpose for this is if a developer need to use tables that are different from ones that are built-in to a device.
|
||||
|
||||
Arbitrary ACPI tables can be overridden using initrd (ACPI tables override via initrd). ACPI tables are basically rules and instructions on how to control and interact with the hardware.
|
||||
|
||||
Like all other parts of the kernel, the ACPI system can also generate debugging messages (Debug Statements). Like other debugging features, you may want to disable this and save about fifty kilobytes.
|
||||
|
||||
Enabling this next feature will create files (/sys/bus/pci/slots/) for each PCI slot detected on the system (PCI slot detection driver). A PCI slot is a port on a PCI motherboard that allows users to attach other PC devices. PCI is a type of motherboard. PCI refers to the way the components communicate with one another. Some applications may need these files.
|
||||
|
||||
The power management timer is another power-managing system (Power Management Timer Support). This is one of many system timers for keeping track of time. This one requires less power. The processor idling, voltage/frequency scaling, and throttling do not effect this timer. Numerous systems require this feature to be enabled.
|
||||
|
||||
Next, ACPI module and container device drivers can be enabled (Container and Module Devices). This enables hotplug support for processors, memory, and nodes. This is needed for NUMA systems.
|
||||
|
||||
This following driver offers support for ACPI memory hotplugging (Memory Hotplug). Some devices will not support hotpluggable memory even with this driver enabled. If this driver is added as a module, the module will be called acpi_memhotplug.
|
||||
|
||||
NOTE: For the kernel to have a particular feature, the hardware, BIOS, and firmware must support the feature in question. Some systems have a BIOS that does not control the hardware much. This type of BIOS will not restrict features often. If the kernel does have a particular feature, the hardware must have the ability to complete such a task.
|
||||
|
||||
The Smart Battery System driver offers access to the battery's status and information (Smart Battery System).
|
||||
|
||||
Next, we have a driver for a "Hardware Error Device". This device reports hardware errors through SCI. Usually, most of the reports will be on corrected errors.
|
||||
|
||||
Here is another ACPI debugging feature (Allow ACPI methods to be inserted/replaced at run time). This permits ACPI AML methods to be managed without rebooting the system. AML stands for ACPI Machine Language. With this debugging feature, the AML code can be changed and tested with requiring a reboot.
|
||||
|
||||
APEI is the ACPI error interface (ACPI Platform Error Interface (APEI)). APEI reports errors from the chipset to the operating system. This error interface also offers error injection abilities.
|
||||
|
||||
The hardware's firmware can send messages to the operating system when "SFI (Simple Firmware Interface) Support" is enabled. The firmware communicates with the operating system through static tables in memory. SFI-only computers will require this feature for the kernel to work.
|
||||
|
||||
To be able to change the processor's clock speed on runtime, enable this feature (CPU Frequency scaling). CPU frequency scaling means changing the processor's clock speed. This driver can be used to lower the clock speed to conserve power.
|
||||
|
||||
Next, is another power management subsystem (CPU idle PM support). When the processor is not active, it is best that it idles in an efficient way to reduce power consumption and reduce wear-and-tear on the CPU. Reduced power consumption will also lower the heat production from the the internal components.
|
||||
|
||||
The Linux kernel offers many CPU idle drivers. On systems with multiple processors, some users may have a reason to use a different driver on each CPU (Support multiple cpuidle drivers). Enabling this driver will allow users to set a different driver to each processor.
|
||||
|
||||
For Intel processors, the kernel has a driver specific for managing the idleness of such CPU chips (Cpuidle Driver for Intel Processors).
|
||||
|
||||
When the memory chips are idle, those can also use reduced power (Intel chipset idle memory power saving driver). This driver is specific for Intel devices with IO AT support.
|
||||
|
||||
Different computers use different types of motherboards (PCI support). One type is PCI. This driver will allow the kernel to run on PCI motherboards.
|
||||
|
||||
Next, we can enable/disable "Support mmconfig PCI config space access".
|
||||
|
||||
After that, we have an option of enabling/disabling a driver for host bridge windows (Support mmconfig PCI config space access). WARNING: This driver is incomplete (at least in kernel version 3.9.4)
|
||||
|
||||
As mentioned above, there are other types of motherboards. This next option offers a driver for "PCI Express (PCIe) support". PCIe is an improved and faster version of PCI.
|
||||
|
||||
After that, this following driver should be enabled to allow hotplugging on PCIe motherboards (PCI Express Hotplug driver).
|
||||
|
||||
Next, we can enable/disable error reporting for PCIe motherboards (Root Port Advanced Error Reporting). This is the PCI Express AER driver.
|
||||
|
||||
This next feature can allow users to override BIOS and firmware settings for PCIe ECRC (PCI Express ECRC settings control). In the next option, there is an error injector for PCIe (PCIe AER error injector support).
|
||||
|
||||
The following setting offers the operating system control over PCIe active state and clock power management (PCI Express ASPM control). Normally, the firmware would control the ASPM, but this feature allows the operating system to take control.
|
||||
|
||||
Again, like so many components of the kernel, there is debugging support for ASPM (Debug PCI Express ASPM).
|
||||
|
||||
Next, in this menu, select the "Default ASPM policy".
|
||||
|
||||
After that choice, the next one is about allowing device drivers to enable Message Signaled Interrupts (MSI). It is usually best to allow devices to send the CPU interrupts.
|
||||
|
||||
To add numerous debugging messages to the system log, enable "PCI Debugging".
|
||||
|
||||
This next setting allows the PCI core to detect if it needs to enable PCI resource re-allocation (Enable PCI resource re-allocation detection).
|
||||
|
||||
When hosting a virtual operating system on Linux, it can sometimes help to reserve a PCI device for the virtual OS (PCI Stub driver). With operating system virtualization, one OS is running inside or beside another operating system. Sometimes they can compete for resources. Being able to reserve a device for the guest system (the virtual OS) can reduce competition and increase performance.
|
||||
|
||||
The next driver offered allows hypertransport devices to use interrupts (Interrupts on hypertransport devices). Hypertransport is a bus system/protocol for high-speed communication between processors.
|
||||
|
||||
This next driver for PCI virtualization allows virtual devices to be made that share their owned physical resources (PCI IOV support).
|
||||
|
||||
The PCI Page Request Interface (PRI) gives PCI devices that are behind an IOMMU (input/output memory management unit) to recover from page faults (PCI PRI support). A page fault is not an error; it refers to the event of software trying to access data not on physical memory.
|
||||
|
||||
Again, there are still more features to configure in the Linux kernel as you will see in the following articles.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.linux.org/threads/the-linux-kernel-configuring-the-kernel-part-6.4457/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -0,0 +1,98 @@
|
||||
10 Linux 内核: 配置内核 (Part 6)
|
||||
================================================================================
|
||||
![](http://www.linux.org/attachments/slide-jpeg.464/)
|
||||
|
||||
欢迎来到下一篇关于内核配置文章!还有大量的选项需要配置。这篇文章将主要讨论PCI和ACPI。
|
||||
|
||||
这里我们可以启用由ACPI控制的扩展坞和可移动驱动器槽的支持(Dock)。记住,ACPI(Advanced Configuration and Power Management Interface)是一个电源管理系统。扩展坞是一种其他的设备通过额外的接口插入的设备。扩展坞可能可以容纳许多不同的端口和连接器。所以一个基于ACPI控制的扩展坞是一个自身由ACPI控制的扩展坞。驱动器槽是一套可以增加硬盘的设备,这也可以由ACPI管理。
|
||||
|
||||
下面,我们允许ACPI用来管理空闲的CPU(Processor)。这会让处理器在空闲时进入ACPI C2或者C3状态。这可以节省电源并降低CPU芯片的温度。处理器只在100%没有占用时才进入空闲状态。没有程序可以请求一段时间的CPU资源。
|
||||
|
||||
CPU电源有四个状态 - C0、C1、C2和C3。C0是操作激活状态。C1(Halt)是一个不执行指令激活状态,但是可以立刻执行指令。C2(Stop-Clock)是一种断电状态。C3(Sleep)是一种比C2更彻底的断电状态。在C3状态中,缓存现在不再同步或者管理知道CPU离开这个状态。第五个状态称作C1E(Enhanced Halt State),他拥有低功耗。
|
||||
|
||||
如果启用了IPMI驱动,那么ACPI可以访问BMC控制器(IPMI)。基板管理控制器(BMC)是一种管理软件和硬件间连接的微控制器。智能平台管理接口(IPMI)是一种框架,通过直接的硬件层面而不是硬件层面或者操作系统层面来管理计算机。
|
||||
|
||||
ACPi v4.0过程聚合器允许内核应用一个CPU配置到所有系统中的处理器中(Processor Aggregator)。截止到ACPI v4.0,只有idle状态可以用这个方式配置。
|
||||
|
||||
接下来,可以启用ACPI热区(Thermal Zone)。多数硬件支持这个特性。这允许风扇的电源由ACPI管理。
|
||||
|
||||
如果启用这个选项,自定义DSDT可以链接到内核。在这个设置中,开发者必须在文件中包含完整的路径名。系统差异表(DSDT)是一个包含了系统支持的电源事件信息的文件。它不需要输入路径名这些表存在于固件中。内核会帮你处理这些。这个主要的目的是用于如果开发者需要使用不同于设备内置的表时用到。
|
||||
|
||||
任意ACPI表都可以通过initrd来覆盖(ACPI tables override via initrd)。ACPI表是指示如何控制并与硬件交互的基础规则和指令。
|
||||
|
||||
像内核的其他部分一样,ACPI系统也可以生成调试信息(Debug Statements)。像其他调试特性一样,或许希望禁用它并省下50KB。
|
||||
|
||||
启用下面的特性会为受系统检测每个PCI插槽(PCI slot detection driver)创建文件(/sys/bus/pci/slots/)。一个PCI插槽是在PCI主板上的一个端口,它允许用户接上其他的PC设备。PCI是主板的一种类型。PCI是指组件互相通信的方式。有些应用程序可能需要这些文件。
|
||||
|
||||
电源管理定时器是另外一种电源管理系统(Power Management Timer Support)。这是许多系统追踪时间的方式。这个需要更少的电源。处理器的空闲、电压/频率调节和节流都不会影响这个定时器。大量的系统需要使用这个特性。
|
||||
|
||||
下面,可以启用ACPI模块和容器设备驱动(Container and Module Devices)。这会启用处理器、内存和节点的热插拔支持。它需要NUMA系统。
|
||||
|
||||
下面的驱动提供对ACPI内存的热插拔支持(Memory Hotplug)。有些设备甚至启用这个驱动也不支持热插拔。如果驱动以模块形式加入,那么模块将会被acpi_memhotplug调用。
|
||||
|
||||
注意:对于内核某个特定的功能,硬件、BIOS和固件在必须支持时会有问题。有些系统的BIOS是不控制硬件的。这种类型的BIOS通常不会限制特性。如果内核确实有一个特定的功能,硬件必须有能力完成这样的任务。
|
||||
|
||||
智能电源管理驱动提供访问电池的状态和信息(Smart Battery System)。
|
||||
|
||||
下面,我们有一个"Hardware Error Device"驱动。设备通过SCI报告硬件错误。通常上,大多数的错误会是已纠正的错误。
|
||||
|
||||
下面的是ACPI调试特性(Allow ACPI methods to be inserted/replaced at run time)。这允许ACPI AML方式不通过重启系统管理。 AML代表的是ACPI机器语言(ACPI Machine Language)。AML代码可以通过请求重启来改变和测试。
|
||||
|
||||
APEI是ACPI的错误接口(ACPI Platform Error Interface (APEI))。APEI从芯片给操作系统报告错误。这个错误接口同样提供错误注射的能力。
|
||||
|
||||
当"SFI (Simple Firmware Interface) Support" 启用后,硬件固件可以发送消息给操作系统。固件与操作系统间的通信通过内存中的静态表。SFI-only的计算机的内核工作需要这个特性。
|
||||
|
||||
想要改变处理器的时钟速度和运行时,就启用这个特性(CPU Frequency scaling)。CPU频率调整意味着改变处理器的时钟速度。这个驱动可以用于降低时钟频率以保留电源。
|
||||
|
||||
下面是另外一个电源管理子系统(CPU idle PM support)。当处理器不在活跃状态时,它最好处在有效的空闲方式来减少电源消耗和减少CPU损耗。减少电源消耗同样可以降低内部元件的产热。
|
||||
|
||||
Linux内核提供了很多CPU空闲驱动。在多处理器系统上,一些用户可能有一个理由在每个CPU上使用不同的驱动(Support multiple cpuidle drivers)。启用这个驱动可以允许用户给每个处理器设置不同的驱动。
|
||||
|
||||
对于Intel处理器,内核有一个特别为管理这类CPU芯片空闲的驱动(Cpuidle Driver for Intel Processors)。
|
||||
|
||||
当内存芯片空闲时,这些同样可以低功耗(Intel chipset idle memory power saving driver)。这个驱动是特别为支持IO AT的Intel设备。
|
||||
|
||||
不同的计算机使用不同类型的主板(PCI support)。其中一种类型是PCI。这个驱动允许内核运行在PCI主板上。
|
||||
|
||||
下面,我们可以启用/禁用 "Support mmconfig PCI config space access"。
|
||||
|
||||
接下来,我们有一个选择启用/禁用主桥窗口驱动(Support mmconfig PCI config space access)。警告:这个驱动还不完全(至少在3.9.4中是这样)。
|
||||
|
||||
像上面提到的主板,还有另一种类型的主板。写一个选项是提供"PCI Express (PCIe) support"的驱动。PCIe是一种改进并且更快速的PCI。
|
||||
|
||||
在这之后,下面的驱动应该被启用以支持PCIe主板上的热插拔(PCI Express Hotplug driver)。
|
||||
|
||||
接着,我们可以启用/禁用PCIe主板报错(Root Port Advanced Error Reporting)。这就是PCIe AER驱动。
|
||||
|
||||
下一个特性允许用户使用PCIe EREC(PCI Express ECRC settings control)覆盖BIOS和固件设置。下一个选项,这是对PCIe的错误注射(PCIe AER error injector support)。
|
||||
|
||||
下面的设置提供了操作系统控制PCI的活跃状态和时钟电源管理(PCI Express ASPM control)。通常上,固件会控制ASPM,但是这个特性允许操作系统采取控制。
|
||||
|
||||
再说一次,像内核的许多组件一样,这里提供了ASPM的调试支持(Debug PCI Express ASPM)。
|
||||
|
||||
下面,在这个菜单选择"Default ASPM policy"。
|
||||
|
||||
在这选项之后,下一个是关于允许设备驱动启消息信号中断(Message Signaled Interrupts (MSI))。通常上最好允许设备给CPU发送中断。
|
||||
|
||||
为了在系统日志中加入大量的调试信息,启用"PCI Debugging"。
|
||||
|
||||
下一个选项允许PCI核心检测是否有必要启用PCI资源重分配(Enable PCI resource re-allocation detection)。
|
||||
|
||||
当在Linux上托管一个虚拟操作系统时,它有时可以帮助为虚拟系统保留PCI设备(PCI Stub driver)。在系统虚拟化下,一个操作系统可能在另一个系统的内部或者旁边运行。有时它们会竞争资源。可以为客户机保留设备可以减小竞争和增加性能。
|
||||
|
||||
下面的驱动允许超传输设备(hypertransport devices)使用中断(Interrupts on hypertransport devices)。HyperTransport是一种系统/协议总线用于处理器之间的高速通信。
|
||||
|
||||
下一个驱动用于PCI虚拟化,它允许虚拟设备间共享它们的物理资源(PCI IOV support)。
|
||||
|
||||
The PCI Page Request Interface (PRI) gives PCI devices that are behind an IOMMU (input/output memory management unit) to recover from page faults (PCI PRI support). A page fault is not an error; it refers to the event of software trying to access data not on physical memory.
|
||||
PCI页面请求接口(PRI)使在IOMMU(输入/输出内存管理单元)之后的PCI设备能够从页错误中恢复(PCI PRI support)。页错误不是一种错误;它指的是软件尝试访问不在物理内存上的数据的事件
|
||||
|
||||
再次说明,你会在之后的文章中看到更多的需要配置Linux内核特性。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.linux.org/threads/the-linux-kernel-configuring-the-kernel-part-6.4457/
|
||||
|
||||
译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
Loading…
Reference in New Issue
Block a user