All of lore.kernel.org
 help / color / mirror / Atom feed
From: Don Zickus <dzickus@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	x86@kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org,
	mguzik@redhat.com
Subject: Re: [PATCH 0/4 V3] Print traces on softlockup
Date: Wed, 23 Apr 2014 20:44:11 +0000	[thread overview]
Message-ID: <20140423204411.GB8488@redhat.com> (raw)
In-Reply-To: <20140423123550.1818553bcdff3ef058efd3f7@linux-foundation.org>

On Wed, Apr 23, 2014 at 12:35:50PM -0700, Andrew Morton wrote:
> On Wed, 23 Apr 2014 15:22:28 -0400 Don Zickus <dzickus@redhat.com> wrote:
> 
> > On Tue, Apr 22, 2014 at 11:28:28AM -0700, Andrew Morton wrote:
> > > On Tue, 22 Apr 2014 11:17:24 -0400 Don Zickus <dzickus@redhat.com> wrote:
> > > 
> > > > Added more patches to handle the 'uniprocessor' panic case by sending NMIs
> > > > to every cpu but self.  Only affects x86, sparc.
> > > > 
> > > 
> > > Looks OK to me.  A couple of things:
> > > 
> > > - Patches 1-3 should be combined so we don't create bisection holes
> > >   due to x86 and sparc build errors.
> > > 
> > > - Patch 4 adds stuff which is unusable on uniprocessor, especially
> > >   the presence of /proc/sys/kernel/softlockup_all_cpu_backtrace.  We
> > >   already have #ifdef CONFIG_SMP in kern_table, so do more of that?
> > 
> > Are you suggesting just add CONFIG_SMP to kern_table entry or all the
> > pieces in kernel/watchdog.c too?  I wasn't sure how messy I should make
> > this patch.
> 
> Well, don't go nuts and be tasteful. 
> 
> /proc/sys/kernel/softlockup_all_cpu_backtrace should disappear.
> 
> Look around for existing #ifdef CONFIG_SMP blocks to use.
> 
> Making sysctl_softlockup_all_cpu_backtrace evaluate to literal zero
> will cause the compiler to remove unused code without ifdefs.  This
> might require that watchdog_timer_fn:softlockup_all_cpu_backtrace (why
> does this local exist btw) be declared const - check the compiler

The local exists because it was pointed out in a private review that there
could be a race in which the sysctl value might change in the middle of
the execution of a softlockup.  This would result in a permanently disable
softlockup_all_cpu_backtrace because the flag would never be cleared.

Hence the snapshot of the local copy to prevent that race.

I posted an update of the patchset.

Cheers,
Don

WARNING: multiple messages have this Message-ID (diff)
From: Don Zickus <dzickus@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	x86@kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org,
	mguzik@redhat.com
Subject: Re: [PATCH 0/4 V3] Print traces on softlockup
Date: Wed, 23 Apr 2014 16:44:11 -0400	[thread overview]
Message-ID: <20140423204411.GB8488@redhat.com> (raw)
In-Reply-To: <20140423123550.1818553bcdff3ef058efd3f7@linux-foundation.org>

On Wed, Apr 23, 2014 at 12:35:50PM -0700, Andrew Morton wrote:
> On Wed, 23 Apr 2014 15:22:28 -0400 Don Zickus <dzickus@redhat.com> wrote:
> 
> > On Tue, Apr 22, 2014 at 11:28:28AM -0700, Andrew Morton wrote:
> > > On Tue, 22 Apr 2014 11:17:24 -0400 Don Zickus <dzickus@redhat.com> wrote:
> > > 
> > > > Added more patches to handle the 'uniprocessor' panic case by sending NMIs
> > > > to every cpu but self.  Only affects x86, sparc.
> > > > 
> > > 
> > > Looks OK to me.  A couple of things:
> > > 
> > > - Patches 1-3 should be combined so we don't create bisection holes
> > >   due to x86 and sparc build errors.
> > > 
> > > - Patch 4 adds stuff which is unusable on uniprocessor, especially
> > >   the presence of /proc/sys/kernel/softlockup_all_cpu_backtrace.  We
> > >   already have #ifdef CONFIG_SMP in kern_table, so do more of that?
> > 
> > Are you suggesting just add CONFIG_SMP to kern_table entry or all the
> > pieces in kernel/watchdog.c too?  I wasn't sure how messy I should make
> > this patch.
> 
> Well, don't go nuts and be tasteful. 
> 
> /proc/sys/kernel/softlockup_all_cpu_backtrace should disappear.
> 
> Look around for existing #ifdef CONFIG_SMP blocks to use.
> 
> Making sysctl_softlockup_all_cpu_backtrace evaluate to literal zero
> will cause the compiler to remove unused code without ifdefs.  This
> might require that watchdog_timer_fn:softlockup_all_cpu_backtrace (why
> does this local exist btw) be declared const - check the compiler

The local exists because it was pointed out in a private review that there
could be a race in which the sysctl value might change in the middle of
the execution of a softlockup.  This would result in a permanently disable
softlockup_all_cpu_backtrace because the flag would never be cleared.

Hence the snapshot of the local copy to prevent that race.

I posted an update of the patchset.

Cheers,
Don

  reply	other threads:[~2014-04-23 20:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22 15:17 [PATCH 0/4 V3] Print traces on softlockup Don Zickus
2014-04-22 15:17 ` Don Zickus
2014-04-22 15:17 ` [PATCH 1/4 v3] nmi: Provide the option to issue an NMI back trace to every cpu but current Don Zickus
2014-04-22 15:17   ` Don Zickus
2014-04-22 15:17 ` [PATCH 2/4 v3] x86, nmi: Add more flexible NMI back trace support Don Zickus
2014-04-22 15:17   ` Don Zickus
2014-04-22 15:17 ` [PATCH 3/4 v3] sparc64, " Don Zickus
2014-04-22 15:17   ` Don Zickus
2014-04-22 15:17 ` [PATCH 4/4 v3] watchdog: Printing traces for all cpus on lockup detection Don Zickus
2014-04-22 15:17   ` Don Zickus
2014-04-22 18:28 ` [PATCH 0/4 V3] Print traces on softlockup Andrew Morton
2014-04-22 18:28   ` Andrew Morton
2014-04-22 19:09   ` Don Zickus
2014-04-22 19:09     ` Don Zickus
2014-04-23 19:22   ` Don Zickus
2014-04-23 19:22     ` Don Zickus
2014-04-23 19:35     ` Andrew Morton
2014-04-23 19:35       ` Andrew Morton
2014-04-23 20:44       ` Don Zickus [this message]
2014-04-23 20:44         ` Don Zickus

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=20140423204411.GB8488@redhat.com \
    --to=dzickus@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mguzik@redhat.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=x86@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.