All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@saeurebad.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH 3/3] softlockup: fix watchdog task wakeup frequency
Date: Tue, 01 Jul 2008 09:12:04 +0200	[thread overview]
Message-ID: <871w2e6ptn.fsf@skyscraper.fehenstaub.lan> (raw)
In-Reply-To: <20080701061146.GE14658@elte.hu> (Ingo Molnar's message of "Tue, 1 Jul 2008 08:11:46 +0200")

Hi Ingo,

Ingo Molnar <mingo@elte.hu> writes:

> * Johannes Weiner <hannes@saeurebad.de> wrote:
>
>> Hi,
>> 
>> Ingo Molnar <mingo@elte.hu> writes:
>> 
>> > * Johannes Weiner <hannes@saeurebad.de> wrote:
>> >
>> >> > +	/*
>> >> > +	 * Wake up the high-prio watchdog task twice per
>> >> > +	 * threshold timespan.
>> >> > +	 */
>> >> > +	if (now > touch_timestamp + softlockup_thresh/2)
>> >> >  		wake_up_process(per_cpu(watchdog_task, this_cpu));
>> >> 
>> >> That defeats patch 1/3 and I think it can be dropped (#1).
>> >
>> > applied this updated patch to tip/core/softlockup. #3 didnt apply - 
>> > could you send a delta patch against tip/core/softlockup please? You can 
>> > pick it up via:
>> >
>> >   http://people.redhat.com/mingo/tip.git/README
>> >
>> > do:
>> >
>> >   git-checkout -b core/softlockup tip/core/softlockup
>> >
>> > to check it out.
>> 
>> Uhm, I see this patch is already in.  Misunderstanding or did you fix 
>> it up yourself?
>
> i applied and tested everything that would apply (modulo trivial 
> conflict resolution) - but not all of your patches applied so if there's 
> still anything missing please send a delta patch against this branch. 
> (or against tip/master, which too has all these changes included)

#1 is crap, #3 is in the tree and here is #2 against tip/core/softlockup:

--
From: Johannes Weiner <hannes@saeurebad.de>
Subject: softlockup: sanitize timestamp comparison

The print_timestamp can never be bigger than the touch_timestamp, at
maximum it can be equal.  And if it is, the second check for
touch_timestamp + 1 bigger print_timestamp is always true, too.

The check for equality is sufficient as we proceed in one-second-steps
and are at least one second away from the last print-out if we have
another timestamp.

Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
---
 kernel/softlockup.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/kernel/softlockup.c b/kernel/softlockup.c
index d53ab70..7bd8d1a 100644
--- a/kernel/softlockup.c
+++ b/kernel/softlockup.c
@@ -116,11 +116,8 @@ void softlockup_tick(void)
 	print_timestamp = per_cpu(print_timestamp, this_cpu);
 
 	/* report at most once a second */
-	if ((print_timestamp >= touch_timestamp &&
-			print_timestamp < (touch_timestamp + 1)) ||
-			did_panic) {
+	if (print_timestamp == touch_timestamp || did_panic)
 		return;
-	}
 
 	/* do not print during early bootup: */
 	if (unlikely(system_state != SYSTEM_RUNNING)) {

  reply	other threads:[~2008-07-01  7:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-27  0:04 [PATCH 0/3] softlockup fixlets Johannes Weiner
2008-06-27  0:04 ` [PATCH 1/3] softlockup: only reset timestamp from NMI code Johannes Weiner
2008-06-27  0:04 ` [PATCH 2/3] softlockup: sanitize print-out limit checks Johannes Weiner
2008-06-27  0:04 ` [PATCH 3/3] softlockup: fix watchdog task wakeup frequency Johannes Weiner
2008-06-27 12:03   ` Ingo Molnar
2008-06-27 12:33     ` Johannes Weiner
2008-06-27 12:43       ` Ingo Molnar
2008-06-27 13:07         ` Johannes Weiner
2008-06-28  0:45           ` Johannes Weiner
2008-06-30 13:08             ` Ingo Molnar
2008-07-01  5:40               ` Johannes Weiner
2008-07-01  6:11                 ` Ingo Molnar
2008-07-01  7:12                   ` Johannes Weiner [this message]
2008-07-01  7:22                     ` Ingo Molnar

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=871w2e6ptn.fsf@skyscraper.fehenstaub.lan \
    --to=hannes@saeurebad.de \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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.