All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Cohen <david.a.cohen@linux.intel.com>
To: linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, mingo@kernel.org,
	gnomes@lxorguk.ukuu.org.uk, hpa@zytor.com
Subject: Re: Soft lockup regression since kernel 3.13
Date: Thu, 3 Apr 2014 12:11:03 -0700	[thread overview]
Message-ID: <20140403191103.GA17226@psi-dev26.jf.intel.com> (raw)
In-Reply-To: <20140402232948.GA4725@psi-dev26.jf.intel.com>

On Wed, Apr 02, 2014 at 04:29:48PM -0700, David Cohen wrote:
> Hi,
> 
> I've detected a regression from upstream (using an Intel Merrifield
> device) since 3.13 (still exists in 3.14) which I never had much time
> to start to investigate until now. The symptoms are: the device boots
> and works fine for while until it silently hangs.
> 
> I finally bisected v3.12..v3.13 and found exactly which commit created
> the issue:
> 
> commit f27dde8deef33c9e58027df11ceab2198601d6a6
> Author: Peter Zijlstra <peterz@infradead.org>
> Date:   Wed Aug 14 14:55:31 2013 +0200
> 
>     sched: Add NEED_RESCHED to the preempt_count

FWIW I did further investigation and made the issue to go away with this
hack:

diff --git a/arch/x86/include/asm/preempt.h
b/arch/x86/include/asm/preempt.h
index c8b051933b1b..41744d99c88f 100644
--- a/arch/x86/include/asm/preempt.h
+++ b/arch/x86/include/asm/preempt.h
@@ -95,7 +95,7 @@ static __always_inline bool
__preempt_count_dec_and_test(void)
  */
   static __always_inline bool should_resched(void)
    {
    -       return unlikely(!__this_cpu_read_4(__preempt_count));
    +       return unlikely(tif_need_resched());
     }
      
       #ifdef CONFIG_PREEMPT
--

I extended part of this patch to x86:

commit ba1f14fbe70965ae0fb1655a5275a62723f65b77
Author: Peter Zijlstra <peterz@infradead.org>
Date:   Thu Nov 28 14:26:41 2013 +0100

    sched: Remove PREEMPT_NEED_RESCHED from generic code
--

Br, David Cohen

  reply	other threads:[~2014-04-03 19:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-02 23:29 Soft lockup regression since kernel 3.13 David Cohen
2014-04-03 19:11 ` David Cohen [this message]
2014-04-03 21:07   ` David Cohen
2014-04-08  0:08     ` David Cohen
2014-04-08  0:08       ` David Cohen
2014-04-08  0:33       ` David Cohen
2014-04-08  0:33         ` David Cohen
2014-04-08  8:49 ` Peter Zijlstra
2014-04-08 20:13   ` David Cohen
2014-04-15 14:11     ` David Cohen

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=20140403191103.GA17226@psi-dev26.jf.intel.com \
    --to=david.a.cohen@linux.intel.com \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.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.