mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Olaf Hering <olh@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>, Hannes Reinecke <hare@suse.de>,
	linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: calibrate_migration_costs takes ages on s390
Date: Tue, 14 Feb 2006 11:56:08 +0100	[thread overview]
Message-ID: <20060214105608.GD19896@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <20060214080942.GC19896@osiris.boeblingen.de.ibm.com>

> I did a quick git bisect search. This is one is the hurting one:
> 
> Author: Ingo Molnar <mingo@elte.hu>  2006-02-07 21:58:54
> Committer: Linus Torvalds <torvalds@g5.osdl.org>  2006-02-08 01:12:33
> Parent: 8519fb30e438f8088b71a94a7d5a660a814d3872 ([PATCH] mm: compound release fix)
> Child:  0d4c3e7a8c65892c7d6a748fdbb4499e988880db ([PATCH] unshare system call -v5: Documentation file)
>
>     The fix is to include a __delay(1) call in the loop, to correctly approximate
>     the intended delay timeout of 1 second.  The code assumes that every
>     architecture implements __delay(1) to last around 1/(loops_per_jiffy*HZ)
>     seconds.
> 
> I guess we're once again suffering from being a virtualized platform: the
> formerly used call to cpu_relax() informed the underlying hypervisor that
> we want to give up the current cpu while __delay() keeps it.
> Unless we're scheduled away involuntarily.
> The "Detect Soft Lockups" option doesn't make too much sense too on our
> platform, since we get a lot of false positives.
> Quick fix: turn off the options CONFIG_DEBUG_SPINLOCK and
> CONFIG_DETECT_SOFTLOCKUP.

Wrong analysis. Our __delay() implementation is broken. This doesn't help for
the CONFIG_DETECT_SOFTLOCKUP case, but at least CONFIG_DEBUG_SPINLOCK works
again with this.

Andrew, could you pick this one up, or should I send it separately?

[PATCH] s390: fix __delay implementation

From: Heiko Carstens <heiko.carstens@de.ibm.com>

Fix __delay implementation. Called with an argument "1" or "0" it
would loop nearly forever (since (1/2)-1 = 0xffffffff).

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---

 arch/s390/lib/delay.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/lib/delay.c b/arch/s390/lib/delay.c
index e96c35b..71f0a2f 100644
--- a/arch/s390/lib/delay.c
+++ b/arch/s390/lib/delay.c
@@ -30,7 +30,7 @@ void __delay(unsigned long loops)
          */
         __asm__ __volatile__(
                 "0: brct %0,0b"
-                : /* no outputs */ : "r" (loops/2) );
+                : /* no outputs */ : "r" ((loops/2) + 1));
 }
 
 /*

  reply	other threads:[~2006-02-14 10:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-13 10:26 Heiko Carstens
2006-02-13 10:34 ` David S. Miller
2006-02-13 10:54   ` Ingo Molnar
2006-02-13 20:57     ` David S. Miller
2006-02-13 10:46 ` Ingo Molnar
2006-02-13 16:13   ` Heiko Carstens
2006-02-13 23:42   ` Olaf Hering
2006-02-14  0:08     ` Olaf Hering
2006-02-14  8:09       ` Heiko Carstens
2006-02-14 10:56         ` Heiko Carstens [this message]
2006-02-14 12:35           ` Ingo Molnar
2006-02-14 12:37             ` Ingo Molnar
2006-02-16  6:27   ` Heiko Carstens

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=20060214105608.GD19896@osiris.boeblingen.de.ibm.com \
    --to=heiko.carstens@de.ibm.com \
    --cc=akpm@osdl.org \
    --cc=hare@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=olh@suse.de \
    /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

Powered by JetHome