關於 Linux BootPrompt "idle=" Argument

關於 Linux 的核心開機參數 idle,在之前的文章『不必灰心!NVIDIA GeForce Go 7300 的擁有者!』已經使用過,不過當時只知道可以用來解決某些 NVIDIA 顯示晶片的問題,並不曉得其真正用途與目的。

經過查詢後,在 TLDP 找到了 BootPrompt HowTo,並在『 General Non-Device Specific Boot Args 』章節找到了一段 idle 參數的說明。

Setting this to 'poll' causes the idle loop in the kernel to poll on the need reschedule flag instead of waiting for an interrupt to happen. This can result in an improvement in performance on SMP systems (albeit at the cost of an increase in power consumption).


設 idle=poll 會使 kernel 使用 idle_poll() 取代原有 idle() 的 HLT instruction,提高 SMP 系統的運算效能。另外,因為 idle_poll() 的機制會使 CPU 使用率變高,所以相對的也會耗費更多的電力。如果是單核心 CPU 的環境,就不用考慮了這個機制了,基本上在單核心的環境之下使用 idle_poll() ,只會造 CPU 更大的負擔,效能可能會更差。

現在想想,之前 NVIDIA GeForce Go 7300 也是在雙核心的 CPU 上跑,或許是因為官方的 Driver 對 SMP 的支援還有問題。

留言

這個網誌中的熱門文章

有趣的邏輯問題:是誰在說謊

Web 技術中的 Session 是什麼?

淺談 USB 通訊架構之定義(二)

淺談 USB 通訊架構之定義(一)

Reverse SSH Tunnel 反向打洞實錄