mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@csd.uu.se>
To: John Levon <levon@movementarian.org>
Cc: linux-kernel@vger.kernel.org,
	oprofile-list@lists.sourceforge.net, torvalds@osdl.org
Subject: Re: [PATCH] allow drivers to claim the lapic NMI watchdog HW
Date: Tue, 4 May 2004 17:57:37 +0200	[thread overview]
Message-ID: <16535.48497.41972.583857@alkaid.it.uu.se> (raw)
In-Reply-To: <20040504110200.GA9880@compsoc.man.ac.uk>

John Levon writes:
 > On Tue, May 04, 2004 at 04:33:01AM +0200, Mikael Pettersson wrote:
 > 
 > > +/* lapic_nmi_owner:
 > > + * +1: the lapic NMI hardware is assigned to the lapic NMI watchdog
 > > + *  0: the lapic NMI hardware is unassigned
 > 
 > If we're going to have a mini state machine, can't we at least use some
 > defines for each state...
 > 
 > > +		lapic_nmi_owner -= 2; /* +1 -> -1, 0 -> -2 */
 > 
 > ...and make this into some readable english via a little helper?

Thing is, using discrete states makes the code for the checks
and state changes more verbose. However, I can easily hide the
representation behind macros with understandable names.

 > > -EXPORT_SYMBOL(disable_lapic_nmi_watchdog);
 > > -EXPORT_SYMBOL(enable_lapic_nmi_watchdog);
 > > +EXPORT_SYMBOL(reassign_lapic_nmi_watchdog);
 > > +EXPORT_SYMBOL(release_lapic_nmi_watchdog);
 > 
 > I don't like this new naming. Since the patch is really all about
 > ownership of the local APIC, can't we call it something like
 > 
 > acquire_lapic_nmi()
 > release_lapic_nmi()

Yep, those are nicer names.

 > Neither perfctr nor oprofile have anything to do with watchdogs, so
 > this:
 > 
 > > -	disable_lapic_nmi_watchdog();
 > > +	if (reassign_lapic_nmi_watchdog() < 0) {
 > 
 > Looks a little weird now.

A little, yes.

I'll implement these changes this evening and post an updated patch tomorrow.

/Mikael

  reply	other threads:[~2004-05-04 15:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-04  2:33 Mikael Pettersson
2004-05-04 11:02 ` John Levon
2004-05-04 15:57   ` Mikael Pettersson [this message]
2004-05-04 13:49     ` Albert Cahalan
2004-05-05  9:19       ` [PATCH][updated] " Mikael Pettersson

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=16535.48497.41972.583857@alkaid.it.uu.se \
    --to=mikpe@csd.uu.se \
    --cc=levon@movementarian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oprofile-list@lists.sourceforge.net \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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

all inboxes | Powered by JetHome®