aboutsummaryrefslogtreecommitdiff
path: root/zh_CN.GB2312/books
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2005-04-06 11:41:35 +0000
committerXin LI <delphij@FreeBSD.org>2005-04-06 11:41:35 +0000
commit51d6615ee37748a8e8ef4ca391fb6efd0c4c7a5e (patch)
tree232e3cf5eae63ee76052882ef06319f11472c8af /zh_CN.GB2312/books
parentd9d098b4384861147367b0d12383f0e52d3d315c (diff)
Notes
Diffstat (limited to 'zh_CN.GB2312/books')
-rw-r--r--zh_CN.GB2312/books/handbook/kernelconfig/chapter.sgml122
1 files changed, 67 insertions, 55 deletions
diff --git a/zh_CN.GB2312/books/handbook/kernelconfig/chapter.sgml b/zh_CN.GB2312/books/handbook/kernelconfig/chapter.sgml
index 099d8a3dff..00c4f4af5d 100644
--- a/zh_CN.GB2312/books/handbook/kernelconfig/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/kernelconfig/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Chinese Documentation Project
- Original Revision: 1.142
+ Original Revision: 1.155
$FreeBSD$
-->
@@ -153,16 +153,18 @@
如果您的情况不是这样, 只需对目录名作相应的调整即可。</para>
<note>
- <para>如果在您的系统上 <emphasis>没有</emphasis> <filename>/usr/src/sys</filename> 这个目录,
- 则说明没有安装内核源代码。
- 最简单的方法是以 <username>root</username> 身份执行
- <command>/stand/sysinstall</command>,
- 选择<guimenuitem>Configure</guimenuitem>,
- 接着是<guimenuitem>Distributions</guimenuitem>,
- 下来<guimenuitem>src</guimenuitem>,
- 最后<guimenuitem>sys</guimenuitem>。
- 如果您已经有一张<quote>官方</quote>&os;系统安装盘;并且您有权限使用
- 光驱,那么您也可以通过下面命令行来安装源代码:</para>
+ <para>如果您的系统中 <emphasis>没有</emphasis>
+ <filename>/usr/src/sys</filename> 这样一个目录,
+ 则说明没有安装内核源代码。 安装它最简单的方法是通过以 root 身份运行
+ <command>sysinstall</command> (对于 &os; 5.2
+ 之前的版本, 则是 <command>/stand/sysinstall</command>), 选择
+ <guimenuitem>Configure</guimenuitem>, 然后
+ <guimenuitem>Distributions</guimenuitem>, 然后
+ <guimenuitem>src</guimenuitem>,
+ <guimenuitem>sys</guimenuitem>。 如果您不喜欢
+ <application>sysinstall</application> 并且可以使用
+ <quote>官方的</quote> &os; CDROM, 则也可以通过命令行来安装:</para>
+
<screen>&prompt.root; <userinput>mount /cdrom</userinput>
&prompt.root; <userinput>mkdir -p /usr/src/sys</userinput>
&prompt.root; <userinput>ln -s /usr/src/sys /sys</userinput>
@@ -191,9 +193,9 @@
<link linkend="cutting-edge">更新代码</link> 时它会被覆盖,
而您的修改也就随之丢失了。</para>
- <para>您可以考虑将内核配置文件放到别的地方,
- 然后在 <filename><replaceable>i386</replaceable></filename>
- 目录中建立一个符号连接指向它。</para>
+ <para>您也可以考虑把内核配置文件放到别的地方,
+ 然后再到 <filename><replaceable>i386</replaceable></filename>
+ 目录中创建一个指向它的符号链接。</para>
<para>例如:</para>
@@ -247,8 +249,10 @@
</listitem>
<listitem>
- <para>如果您运行的是&os;4.0以前的版本的话,而且您<emphasis>不</emphasis>升级到
- &os;&nbsp;4.0或更高版本,只要使用方法1。
+ <para>如果您正运行 &os; 4.0 以前的版本, 而且您
+ <emphasis>不是</emphasis> 准备使用
+ <command>make buildworld</command> 来升级到 &os;&nbsp;4.0
+ 或更高版本的话, 则应使用方法1。
</para>
</listitem>
@@ -259,7 +263,8 @@
</listitem>
<listitem>
- <para>如果您正在重建的内核是作为<maketarget>make world</maketarget>进程的一部分,需要使用方法2。
+ <para>如果您打算把重新构建内核作为
+ <command>make buildworld</command> 过程的一部分来进行, 则应使用方法 2。
</para>
</listitem>
</itemizedlist>
@@ -267,7 +272,6 @@
<indexterm>
<primary><command>cvsup</command></primary>
</indexterm>
- <indexterm><primary>匿名 CVS</primary></indexterm>
<indexterm><primary>CTM</primary></indexterm>
<indexterm>
<primary>CVS</primary>
@@ -279,8 +283,8 @@
(也就是没有运行 <application>CVSup</application>、
<application>CTM</application>, 或使用
<application>anoncvs</application>), 则可以放心使用
- <command>config</command>、 <maketarget>make depend</maketarget>、
- <command>make</command>、 <maketarget>make install</maketarget>。
+ <command>config</command>、 <command>make depend</command>、
+ <command>make</command>、 <command>make install</command>。
</para>
<procedure>
@@ -448,7 +452,7 @@
<indexterm>
<primary>内核</primary>
- <secondary>配置文件例子</secondary>
+ <secondary>配置文件</secondary>
</indexterm>
<para>下面是一个 <filename>GENERIC</filename>
@@ -654,6 +658,16 @@ device loop # Network loopback</programlisting>
<para>这是最基本的硬盘文件系统,如果打算从本地硬盘启动,请保留它。</para>
+ <programlisting>options SOFTUPDATES # Enable FFS Soft Updates support</programlisting>
+
+ <para>这个选项会启用内核中的 Soft Updates 支持,
+ 它会显著地提高磁盘的写入速度。 尽管这项功能是由内核直接提供的,
+ 但仍然需要在每个磁盘上启用它。 请检查 &man.mount.8; 的输出,
+ 以了解您系统中的磁盘上是否已经启用了 Soft Updates。
+ 如果没有看到 <literal>soft-updates</literal> 选项,
+ 则需要使用 &man.tunefs.8; (对于暨存系统)
+ 或 &man.newfs.8; (对于新系统) 命令来激活它。</para>
+
<programlisting>options UFS_ACL # Support for access control lists</programlisting>
<para>这个选项只能在 &os;&nbsp;5.X 和更高版本中使用,
@@ -671,17 +685,6 @@ device loop # Network loopback</programlisting>
您应该在大型服务器和频繁使用的工作站上打开这个选项,而在磁盘操作不是很重要的
小型系统上关闭它,比如防火墙。</para>
- <programlisting>options SOFTUPDATES # Enable FFS Soft Updates support</programlisting>
-
- <para>这个选项将启用内核的 Soft Updates,
- 它有助于提高磁盘的写操作速度。
- 尽管这个功能是内核提供的, 仍然需要对具体的磁盘打开它。
- 请查看 &man.mount.8; 的输出以了解
- Soft Updates 是否已经在您的系统磁盘上启用了。
- 如果您没有看到 <literal>soft-updates</literal>
- 挂接选项, 则需要通过使用 &man.tunefs.8; (对于已经存在的文件系统)
- 或 &man.newfs.8; (对于新的文件系统) 命令来激活它。</para>
-
<programlisting>options MD_ROOT # MD is a potential root device</programlisting>
<para>这个选项将打开以基于内存的虚拟磁盘作为根设备的支持。</para>
@@ -775,13 +778,13 @@ options NFS_ROOT # NFS usable as /, requires NFSCLIENT</progra
不少绘图相关程序会自动使用SHM来提供额外的速度。如果您要使用X Window,您最好加入这个选项。
</para>
- <programlisting>options SYSVSEM # SYSV-style semaphores</programlisting>
+ <programlisting>options SYSVMSG # SYSV-style message queues</programlisting>
- <para>支持System&nbsp;V 信号量,不常用到,只在kernel中占用几百个字节的空间。</para>
+ <para>支持 System&nbsp;V 消息。 这只会在内核中增加数百字节的空间占用。</para>
- <programlisting>options SYSVMSG # SYSV-style message queues</programlisting>
+ <programlisting>options SYSVSEM # SYSV-style semaphores</programlisting>
- <para>支持 System&nbsp;V 消息。 同样地, 这只会在内核中增加数百字节的空间占用。</para>
+ <para>支持System&nbsp;V 信号量, 不常用到, 但只在kernel中占用几百个字节的空间。</para>
<note>
<para>&man.ipcs.1; 命令的 <option>-p</option> 选项可以显示出任何用到这些
@@ -790,7 +793,7 @@ options NFS_ROOT # NFS usable as /, requires NFSCLIENT</progra
<programlisting>options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions</programlisting>
- <para>在1993年&posix;添加的实时扩展. 在ports collection中某些应用程序会用到这些
+ <para>在 1993 年 &posix; 添加的实时扩展。 在 Ports Collection 中某些应用程序会用到这些
(比如<application>&staroffice;</application>)。
</para>
@@ -808,18 +811,24 @@ options AHD_REG_PRETTY_PRINT # Print register bitfields in debug
<programlisting>options ADAPTIVE_GIANT # Giant mutex is adaptive.</programlisting>
- <para>这个选项使得内核全局锁 (Giant) 按照和其它 mutex 类似的方式自适应地自旋。</para>
+ <para>内核全局锁 (Giant) 是一种互斥机制 (休眠互斥体) 的名字,
+ 它用于保护许多内核资源。 现在, 这已经成为了一种无法接受的性能瓶颈,
+ 它已经被越来越多地使用保护单个资源的锁代替。
+ <literal>ADAPTIVE_GIANT</literal> 选项将使得内核全局锁作为一种自适应自旋锁。
+ 这意味着, 当有线程希望锁住内核全局锁互斥体, 但互斥体已经被另一个 CPU
+ 上的线程锁住的时候, 它将继续运行, 直到那个线程释放锁为止。
+ 一般情况下, 另一个线程将进入休眠状态并等待下一次调度。
+ 如果您不确定是否应该这样做的话, 一般应该打开它。</para>
<indexterm>
<primary>内核选项</primary>
<secondary>SMP</secondary>
</indexterm>
- <programlisting># To make an SMP kernel, the next two are needed
-options SMP # Symmetric MultiProcessor Kernel
-device apic # I/O APIC</programlisting>
+ <programlisting>device apic # I/O APIC</programlisting>
- <para>上述两个选项是 SMP 支持所必需的,
- 在单处理器的机器上可以去掉它们。</para>
+ <para>apic 设备将启用使用 I/O APIC 作为中断发送设备的能力。
+ apic 设备可以被 UP 和 SMP 内核使用, 但 SMP 内核必须使用它。
+ 要支持多处理器, 还需要加上 <literal>options SMP</literal>。</para>
<programlisting>device isa</programlisting>
@@ -915,7 +924,7 @@ device ses # SCSI Environmental Services (and SAF-TE)</programli
<para>SSCSI外围设备。也可以像上面一样操作。</para>
<note>
- <para>目前系统提供的 USB &man.umass.4; 驱动 (以及少量其它驱动) 使用了
+ <para>目前系统提供的 USB &man.umass.4; 以及少量其它驱动使用了
SCSI 子系统, 尽管它们并不是真的 SCSI 设备。
因此, 如果在内核配置使用了这类驱动程序, 请务必不要删除
SCSI 支持。</para>
@@ -926,6 +935,7 @@ device amr # AMI MegaRAID
device asr # DPT SmartRAID V, VI and Adaptec SCSI RAID
device ciss # Compaq Smart RAID 5*
device dpt # DPT Smartcache III, IV - See NOTES for options
+device hptmv # Highpoint RocketRAID 182x
device iir # Intel Integrated RAID
device ips # IBM (Adaptec) ServeRAID
device mly # Mylex AcceleRAID/eXtremeRAID
@@ -996,6 +1006,10 @@ device sc</programlisting>
<literal>sc</literal> 设备 &mdash; 而 <literal>vt100</literal>
则几乎每种平台都支持。</para>
+ <indexterm>
+ <primary>APM</primary>
+ </indexterm>
+
<programlisting># Power management support (see NOTES for more options)
#device apm</programlisting>
@@ -1092,12 +1106,12 @@ device miibus # MII bus support</programlisting>
<para>MII总线支持对于一些PCI 10/100 Ethernet NIC来说是必需的。
</para>
- <programlisting>device dc # DEC/Intel 21143 and various workalikes
-device miibus # MII bus support
-device bfe # Broadcom BCM440x 10/100 Ethernet
+ <programlisting>device bfe # Broadcom BCM440x 10/100 Ethernet
device bge # Broadcom BCM570xx Gigabit Ethernet
device dc # DEC/Intel 21143 and various workalikes
device fxp # Intel EtherExpress PRO/100B (82557, 82558)
+device lge # Level 1 LXT1001 gigabit ethernet
+device nge # NatSemi DP83820 gigabit ethernet
device pcn # AMD Am79C97x PCI 10/100 (precedence over 'lnc')
device re # RealTek 8139C+/8169/8169S/8110S
device rl # RealTek 8129/8139
@@ -1108,6 +1122,7 @@ device ste # Sundance ST201 (D-Link DFE-550TX)
device ti # Alteon Networks Tigon I/II gigabit Ethernet
device tl # Texas Instruments ThunderLAN
device tx # SMC EtherPower II (83c170 <quote>EPIC</quote>)
+device vge # VIA VT612x gigabit ethernet
device vr # VIA Rhine, Rhine II
device wb # Winbond W89C840F
device xl # 3Com 3c90x (<quote>Boomerang</quote>, <quote>Cyclone</quote>)</programlisting>
@@ -1241,8 +1256,8 @@ device bpf # Berkeley packet filter</programlisting>
</note>
<programlisting># USB support
-#device uhci # UHCI PCI-&gt;USB interface
-#device ohci # OHCI PCI-&gt;USB interface
+device uhci # UHCI PCI-&gt;USB interface
+device ohci # OHCI PCI-&gt;USB interface
device usb # USB Bus (required)
#device udbp # USB Double Bulk Pipe devices
device ugen # Generic
@@ -1275,12 +1290,9 @@ device fwe # Ethernet over FireWire (non-standard!)</programl
<sect2>
<title>大内存支持(<acronym>PAE</acronym>)</title>
<indexterm>
- <primary>
- 物理地址扩展 (<acronym>PAE</acronym>)
- </primary>
- <secondary>
- 大内存支持的配置
- </secondary>
+ <primary>物理地址扩展
+ (<acronym>PAE</acronym>)</primary>
+ <secondary>大内存</secondary>
</indexterm>
<para>大内存配置的机器需要超过4GB的虚拟地址。