From: Val Henson <val@nmt•edu>
To: Tom Rini <trini@kernel•crashing.org>, Paul Mackerras <paulus@samba•org>
Cc: linuxppc-dev@lists•linuxppc.org
Subject: Heartbeat revisited
Date: Tue, 6 Nov 2001 18:47:17 -0700 [thread overview]
Message-ID: <20011106184716.A18004@boardwalk> (raw)
Y'all will recall the debate a few months ago about the proper
behaviour of the ppc_md.heartbeat function. The conclusion was that
the heartbeat function should be run once on each cpu per hearbeat
interval.
Unfortunately, the solution made the interval between calls of the
heartbeat function dependent on the number of cpus in the system:
if (ppc_md.heartbeat && !ppc_md.heartbeat_count--)
ppc_md.heartbeat();
Since it decrements the heartbeat_count once per cpu per timer
interrupt. If this is declared to be the desired and intended
behavior, I'll change Gemini to work around it. Otherwise, I suggest
something like:
if (ppc_md.heartbeat) {
if (!smp_processor_id())
ppc_md.heartbeat_count--;
if (!ppc_md.heartbeat_count)
ppc_md.heartbeat();
}
Or the simpler and originally intended form that only executes on one CPU:
if (ppc_md.heartbeat && !smp_processor_id() &&
!ppc_md.heartbeat_count--)
ppc_md.heartbeat();
Also, you need to be careful to reset the heartbeat even if you aren't
executing the heartbeat function. The last heartbeat discussion left
Gemini with a negative heartbeat count after a few calls of the
heartbeat function.
-VAL
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
reply other threads:[~2001-11-07 1:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011106184716.A18004@boardwalk \
--to=val@nmt$(echo .)edu \
--cc=linuxppc-dev@lists$(echo .)linuxppc.org \
--cc=paulus@samba$(echo .)org \
--cc=trini@kernel$(echo .)crashing.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox