Skip to main content

ログ取得ツール (移転先予定地)

CPUをオフにする方法

SMPのCPU数を制御して1つに見せる方法は、カーネルのブートパラメータにmaxcpus=0もしくはnosmpもしくはmaxcpus=1と指定する。

なんとなれば、arch/i386/kernel/smpboot.cに以下のような記述があるのだ。


/*
 * Setup routine for controlling SMP activation
 *
 * Command-line option of "nosmp" or "maxcpus=0" will disable SMP
 * activation entirely (the MPS table probe still happens, though).
 *
 * Command-line option of "maxcpus=<NUM>", where <NUM> is an integer
 * greater than 0, limits the maximum number of CPUs activated in
 * SMP mode to <NUM>.
 */