Bug 1841455 - Stop updating the watchdog every time an event is processed
Summary: Stop updating the watchdog every time an event is processed
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: systemd
Version: 8.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 8.0
Assignee: systemd maint
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-29 07:51 UTC by Renaud Métrich
Modified: 2023-08-14 11:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Renaud Métrich 2020-05-29 07:51:20 UTC
This bug was initially created as a copy of Bug #1841451

I am copying this bug because: 

Also applies to RHEL 8.


Description of problem:

In current systemd code (including Upstream), the hardware watchdog is updated every time an event is processed in manager_loop():

RHEL 8.2:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
2782 int manager_loop(Manager *m) {
 :
2800         while (m->exit_code == MANAGER_OK) {
2801                 usec_t wait_usec;
2802 
2803                 if (m->runtime_watchdog > 0 && m->runtime_watchdog != USEC_INFINITY && MANAGER_IS_SY     STEM(m))
2804                         watchdog_ping();
 :
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Upstream:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
2888 int manager_loop(Manager *m) {
 :
2905                 watchdog_usec = manager_get_watchdog(m, WATCHDOG_RUNTIME);
2906                 if (timestamp_is_set(watchdog_usec))
2907                         watchdog_ping();
 :
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

This is overkill, in particular this can create issues depending on the watchdog implementation (e.g. when it goes through IPMI, which may be slow).
The update should be done every half period only.

Version-Release number of selected component (if applicable):

systemd-219 and later (including Upstream)


Note You need to log in before you can comment on or make changes to this bug.