VirtualBox

Ignore:
Timestamp:
Apr 15, 2015 10:57:04 AM (10 years ago)
Author:
vboxsync
Message:

heartbeat service: document it, sanity check and fixed logging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VMMDev/VMMDev.cpp

    r54995 r55275  
    409409        if (!pThis->fHasMissedHB && uIntervalNs >= pThis->u64HeartbeatInterval)
    410410        {
    411             LogRel(("VMMDev: HeartBeatCheckTimer: Guest seems to be unresponsive. Last heartbeat received %RU64 sec ago\n",
     411            LogRel(("VMMDev: HeartBeatCheckTimer: Guest seems to be unresponsive. Last heartbeat received %RU64 seconds ago\n",
    412412                    uIntervalNs / RT_NS_1SEC_64));
    413413            ASMAtomicWriteBool(&pThis->fHasMissedHB, true);
     
    440440            rc = vmmDevHeartbeatTimerReset(pThis);
    441441            if (RT_SUCCESS(rc))
    442             {
    443                 /** @todo r=ramshankar: Why are we using 500000000 here? The comment in
    444                  *        u64HeartbeatInterval doesn't indicate anything special.  */
    445                 LogRel(("VMMDev: Heartbeat checking timer set to trigger every %RU64 sec\n", pThis->u64HeartbeatInterval / 500000000));
    446             }
     442                LogRel(("VMMDev: Heartbeat checking timer set to trigger every %RU64 milliseconds\n",
     443                        pThis->u64HeartbeatTimeout / RT_NS_1MS));
    447444            else
    448445                LogRel(("VMMDev: Cannot create heartbeat check timer, rc=%Rrc\n", rc));
     
    38743871                                  "GuestCoreDumpDir|"
    38753872                                  "GuestCoreDumpCount|"
     3873                                  "HeartbeatInterval|"
     3874                                  "HeartbeatTimeout|"
    38763875                                  "TestingEnabled|"
    38773876                                  "TestingMMIO|"
     
    39333932        return PDMDEV_SET_ERROR(pDevIns, rc,
    39343933                                N_("Configuration error: Failed querying \"HeartbeatInterval\" as a 64-bit unsigned integer"));
     3934    if (pThis->u64HeartbeatInterval < RT_NS_100MS/2)
     3935        return PDMDEV_SET_ERROR(pDevIns, rc,
     3936                                N_("Configuration error: Heartbeat interval \"HeartbeatInterval\" too small"));
    39353937
    39363938    rc = CFGMR3QueryU64Def(pCfg, "HeartbeatTimeout", &pThis->u64HeartbeatTimeout, pThis->u64HeartbeatInterval * 2);
     
    39383940        return PDMDEV_SET_ERROR(pDevIns, rc,
    39393941                                N_("Configuration error: Failed querying \"HeartbeatTimeout\" as a 64-bit unsigned integer"));
     3942    if (pThis->u64HeartbeatTimeout < RT_NS_100MS)
     3943        return PDMDEV_SET_ERROR(pDevIns, rc,
     3944                                N_("Configuration error: Heartbeat timeout timer interval \"HeartbeatTimeout\" too small"));
    39403945
    39413946#ifndef VBOX_WITHOUT_TESTING_FEATURES
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette