Translated message

A translation of this page exists in English.

Warning message

This translation is outdated. For the most up-to-date information, please refer to the English version.

/var/log/messages が "hpet1: lost 1 rtc interrupts" メッセージで埋め尽くされる

Solution Unverified - Updated -

Environment

  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • VMWare 仮想ゲスト
  • HP ProLiant DL380 Gen9

Issue

  • 一部のプロセスが、ハードウェアクロックにアクセスできません。
  • /dev/rtc はアプリケーションが使用しているためロックされ、その他のプロセスは /dev/rtc にアクセスできません。
  • システムは、ログを生成し続けます。
kernel: hpet1: lost 2 rtc interrupts
kernel: hpet1: lost 1 rtc interrupts
kernel: hpet1: lost 575 rtc interrupts
kernel: hpet1: lost 2594 rtc interrupts
kernel: hpet1: lost 285 rtc interrupts
kernel: hpet1: lost 275 rtc interrupts

Resolution

  • このメッセージを抑制したい場合には、以下のブートパラメータを利用して、起動時に hpet クロックリソースを無効にする必要があります。

    nohpet
    

    次回の起動時からこのパラメータを有効にするためには、 How to manually modify the boot parameter in grub before the system bootsを参照してください。

  • このメッセージは、現在のクロックソースに依存せずに出力される場合がございます。
    Red Hat Enterprise Linux でクロックソースを変更する方法については、How to change the clock source in the system? を参照してください。

    $ cat sys/devices/system/clocksource/clocksource0/current_clocksource 
    tsc
    

    ワークアラウンドとして、(HPET 以外)の別のクロックソースに切ること替えることも考えられますが、効果がない可能性があります。

    以下の VMWare ドキュメントは、ゲストカーネルと VMWare 仮想化プラットフォームの両方に特定の設定情報を提供します。

    ハイパーバイザーの負荷が高すぎる場合は、HPET より解像度が低いクロックソースに切り替えてもこの問題が解決するかどうかは分かりません。この時、ハイパーバイザーで負荷を下げることが唯一の解決策になる可能性があります。

Root Cause

HPET 仕様は、ドリフトまたはレスポンス時間を定義しません。HPET ティックが「行われない」かどうかの選択は、指定したオペレーティングシステムにおける HPET ドライバーの実装によって異なります。

HPET タイマーの割り込みが多数失敗する場合は、メッセージがログに記載されます。

以下の場合に割り込みが失敗する可能性があります。

そのゲスト自身がビジーの場合

ハイパーバイザーが CPU 時間を全部使用してしまうため仮想マシン自体の CPU が「停止」していると思われる場合

アプリケーションが /dev/rtc を使用している可能なすべての割り込みを要求した場合

または指定した時間内でのハイパーバイザーの負荷が高すぎて HPET タイマーのティックを正確にエミュレートできない場合

Diagnostic Steps

このメッセージは以下のコードで生成されます。

"kernel-2.6.32-358.18.1.el6/arch/x86/kernel/hpet.c" 
1174 static void hpet_rtc_timer_reinit(void)
1175 {
1176   unsigned long delta;
1177   int lost_ints = -1;
1178 
1179   if (unlikely(!hpet_rtc_flags))
1180     hpet_disable_rtc_channel();
1181 
1182   if (!(hpet_rtc_flags & RTC_PIE) || hpet_pie_limit)
1183     delta = hpet_default_delta;
1184   else
1185     delta = hpet_pie_delta;
1186 
1187   /*
1188    * Increment the comparator value until we are ahead of the
1189    * current count.
1190    */
1191   do {
1192     hpet_t1_cmp += delta;
1193     hpet_writel(hpet_t1_cmp, HPET_T1_CMP);
1194     lost_ints++;
1195   } while (!hpet_cnt_ahead(hpet_t1_cmp, hpet_readl(HPET_COUNTER)));
1196 
1197   if (lost_ints) {
1198     if (hpet_rtc_flags & RTC_PIE)
1199       hpet_pie_count += lost_ints;
1200     if (printk_ratelimit())
1201       printk(KERN_WARNING "hpet1: lost %d rtc interrupts\n",
1202         lost_ints);
1203   }
1204 }

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments