关于 lpj

lpj可以通过如下两个方式设置,内核启动时的参数传进去,或是在编译内核时设置 CONFIG_PRESET_LPJ的值。

如果先设置了CONFIG_PRESET_LPJ后在内核启动时设置参数,则CONFIG_PRESET_LPJ的值会被覆盖。

来自:kernel/Documentation/kernel-parameters.txt

lpj=n [KNL]

Sets loops_per_jiffy to given constant, thus avoiding
time-consuming boot-time autodetection (up to 250 ms per
CPU)
. 0 enables autodetection (default). To determine
the correct value for your kernel, boot with normal
autodetection and see what value is printed. Note that
on SMP systems the preset will be applied to all CPUs,
which is likely to cause problems if your CPUs need
significantly divergent settings. An incorrect value
will cause delays in the kernel to be wrong, leading to
unpredictable I/O errors and other breakage. Although
unlikely, in the extreme case this might damage your

hardware.


另外参考:

config PRESET_LPJ
int "Preset loops_per_jiffy" if EMBEDDED
default 0
help
 This is the number of loops used by delay() to achieve a single
 jiffy of delay inside the kernel.  It is normally calculated at
 boot time, but that calculation can take up to 250 ms per CPU.
 Specifying a constant value here will eliminate that delay.


 A value of 0 results in the normal autodetect behavior.


 To determine the correct value for your kernel, first set this
 option to 0, compile and boot the kernel on your target hardware,
 then see what value is printed during the kernel boot.  Use that
 value here.


 The kernel command line parameter "lpj=" can be used to override
 the value configured here.


 Note that on SMP systems the preset will be applied to all CPUs
 which will cause problems if for some reason your CPUs need
 significantly divergent settings.


 If unsure, set this to 0. An incorrect value will cause delays in
 the kernel to be wrong, leading to unpredictable I/O errors and
 other breakage.  Although unlikely, in the extreme case this might
 damage your hardware.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值