我是靠谱客的博主 体贴白开水,最近开发中收集的这篇文章主要介绍关于 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.


最后

以上就是体贴白开水为你收集整理的关于 lpj的全部内容,希望文章能够帮你解决关于 lpj所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(47)

评论列表共有 0 条评论

立即
投稿
返回
顶部