login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
April
»
21
Re: [PATCH 1/6] [watchdog] combine nmi_watchdog and softlockup
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Frederic Weisbecker
Subject:
Re: [PATCH 1/6] [watchdog] combine nmi_watchdog and softlockup
Date: Wednesday, April 21, 2010 - 1:24 pm
On Wed, Apr 21, 2010 at 01:50:21PM -0400, Don Zickus wrote:
quoted text
> On Wed, Apr 21, 2010 at 07:27:33PM +0200, Frederic Weisbecker wrote: > > Some minor things: > > > > > > On Tue, Apr 20, 2010 at 11:23:58AM -0400, Don Zickus wrote: > > > +#ifdef CONFIG_PERF_EVENTS_NMI > > > +struct perf_event_attr wd_hw_attr = { > > > + .type = PERF_TYPE_HARDWARE, > > > + .config = PERF_COUNT_HW_CPU_CYCLES, > > > + .size = sizeof(struct perf_event_attr), > > > + .pinned = 1, > > > + .disabled = 1, > > > +}; > > > > > > > > Shouldn't it be static? > > yes. thanks. > > > > > > > > + > > > +/* Callback function for perf event subsystem */ > > > +void watchdog_overflow_callback(struct perf_event *event, int nmi, > > > + struct perf_sample_data *data, > > > + struct pt_regs *regs) > > > +{ > > > + int this_cpu = smp_processor_id(); > > > + unsigned long touch_ts = per_cpu(watchdog_touch_ts, this_cpu); > > > + char warn = per_cpu(watchdog_warn, this_cpu); > > > > > > > > You can use __get_cpu_var() here > > well, I already have this_cpu and need it later, I figured I would just > use it with per_cpu and save _get_cpu_var the work of re-running > smp_processor_id().
This is more about code clarity in fact. per_cpu() suggests we are fetching something from another cpu. This is a very minor issue though. --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 0/6] lockup detector changes
, Don Zickus
, (Tue Apr 20, 8:23 am)
[PATCH 1/6] [watchdog] combine nmi_watchdog and softlockup
, Don Zickus
, (Tue Apr 20, 8:23 am)
[PATCH 4/6] [watchdog] remove nmi_watchdog.c file
, Don Zickus
, (Tue Apr 20, 8:24 am)
Re: [PATCH 1/6] [watchdog] combine nmi_watchdog and softlockup
, Randy Dunlap
, (Tue Apr 20, 8:53 am)
Re: [PATCH 1/6] [watchdog] combine nmi_watchdog and softlockup
, Don Zickus
, (Tue Apr 20, 9:11 am)
[PATCH 7/6] [watchdog] resolve softlockup.c conflicts
, Don Zickus
, (Tue Apr 20, 9:16 am)
Re: [PATCH 1/6] [watchdog] combine nmi_watchdog and softlockup
, Frederic Weisbecker
, (Wed Apr 21, 10:27 am)
Re: [PATCH 1/6] [watchdog] combine nmi_watchdog and softlockup
, Don Zickus
, (Wed Apr 21, 10:50 am)
Re: [PATCH 1/6] [watchdog] combine nmi_watchdog and softlockup
, Frederic Weisbecker
, (Wed Apr 21, 1:24 pm)
Re: [PATCH 1/6] [watchdog] combine nmi_watchdog and softlockup
, Don Zickus
, (Wed Apr 21, 1:49 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
FUJITA Tomonori
Re: [Scst-devel] Integration of SCST in the mainstream Linux kernel
Uwe Kleine-König
Re: [PATCH v2] ARM: allow, but warn, when issuing ioremap() on RAM
Ingo Molnar
Re: [RFC/RFT PATCH] sched: automated per tty task groups
Borislav Petkov
drm_vm.c:drm_mmap: possible circular locking dependency detected (was: Re: Linux 2...
Rezwanul_Kabir
RE: Dell Studio 1555 eject key does not work ( small patch to fix included )
git-commits-head
:
Linux Kernel Mailing List
libata: disable ATAPI AN by default
Linux Kernel Mailing List
ARM: 5905/1: ARM: Global ASID allocation on SMP
Linux Kernel Mailing List
Disallow gcc versions 4.1.{0,1}
Linux Kernel Mailing List
timer: Try to survive timer callback preempt_count leak
Linux Kernel Mailing List
Documentation/timers/hpet_example.c: only build on X86
linux-netdev
:
Arnaldo Carvalho de Melo
Re: [PATCH 06/37] dccp: Limit feature negotiation to connection setup phase
Gerrit Renker
[PATCH 1/5] dccp: Initialisation framework for feature negotiation
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
Badalian Vyacheslav
Re: tc filter flow hash question
git
:
Junio C Hamano
Re: [PATCH] Detached HEAD (experimental)
Stefan Richter
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Mike Miller
git message
A Large Angry SCM
Re: [RFC] origin link for cherry-pick and revert
Petr Baudis
Re: PPC SHA-1 Updates in "pu"
openbsd-misc
:
Stuart Henderson
Re: Kuro5hin: OpenBSD Founder Theo deRaadt Has Conflict of Interest With AMD
Darrin Chandler
Re: strange output on openbsd C code
Nick Holland
Re: Install OpenBSD from USB ?
KURS ENGLESKOG JEZIKA NA 10 CD-a
AUDIO-VIZUELNA METODA UCENJA ENGLESKOG JEZIKA na 10 CD-a
Christian Weisgerber
Re: CARP with a single public IP address
Colocation donated by:
Syndicate