lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <871w2e6ptn.fsf@skyscraper.fehenstaub.lan>
Date:	Tue, 01 Jul 2008 09:12:04 +0200
From:	Johannes Weiner <hannes@...urebad.de>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	linux-kernel@...r.kernel.org,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH 3/3] softlockup: fix watchdog task wakeup frequency

Hi Ingo,

Ingo Molnar <mingo@...e.hu> writes:

> * Johannes Weiner <hannes@...urebad.de> wrote:
>
>> Hi,
>> 
>> Ingo Molnar <mingo@...e.hu> writes:
>> 
>> > * Johannes Weiner <hannes@...urebad.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@...urebad.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@...urebad.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)) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ