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]
Date:	Wed, 25 Jul 2007 11:59:10 +0200
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Jeremy Fitzhardinge <jeremy@...p.org>,
	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	stable@...nel.org, Greg KH <greg@...ah.com>,
	Chris Wright <chrisw@...s-sol.org>
Subject: Re: [patch] fix the softlockup watchdog to actually work

On Wed, Jul 25 2007, Ingo Molnar wrote:
> 
> * Andrew Morton <akpm@...ux-foundation.org> wrote:
> 
> > >   * 2^30ns == 1.074s.
> > >   */
> > > -static unsigned long get_timestamp(void)
> > > +static unsigned long get_timestamp(int this_cpu)
> > >  {
> > > -	return sched_clock() >> 30;  /* 2^30 ~= 10^9 */
> > > +	return cpu_clock(this_cpu) >> 30;  /* 2^30 ~= 10^9 */
> > >  }
> > >  
> > >  void touch_softlockup_watchdog(void)
> > >  {
> > > -	__raw_get_cpu_var(touch_timestamp) = get_timestamp();
> > > +	int this_cpu = raw_smp_processor_id();
> > > +
> > > +	per_cpu(touch_timestamp, this_cpu) = get_timestamp(this_cpu);
> > >  }
> > >  EXPORT_SYMBOL(touch_softlockup_watchdog);
> > >  
> > > @@ -95,7 +97,7 @@ void softlockup_tick(void)
> > >  		return;
> > 
> > argh.  afacit this was never sent, except as part of some jumbopatch 
> > called "sched: implement cpu_clock(cpu) high-speed time source".
> > 
> > That patch helped.
> > 
> > It's all a plot.
> 
> sorry, it's really my fault: i decoupled it from the jumbopatch (so that 
> the new API could go in first) but forgot to re-send that crutial bit. 
> There's also the patch below (Jens Cc:-ed) to update blktrace. I guess i 
> should do a softlockup.git tree to avoid such foul-ups in the future.
> 
> 	Ingo
> 
> ----------------------->
> Subject: blktrace: use cpu_clock() instead of sched_clock()
> From: Ingo Molnar <mingo@...e.hu>
> 
> use cpu_clock() instead of sched_clock(). (the latter is not a proper
> clock-source)
> 
> Signed-off-by: Ingo Molnar <mingo@...e.hu>

I tested it, seems to work fine for me.

Acked-by: Jens Axboe <jens.axboe@...cle.com>

-- 
Jens Axboe

-
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