linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: anish singh <anish198519851985@gmail.com>
Cc: Jan Kara <jack@suse.cz>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	jslaby@suse.cz
Subject: Re: [PATCH] printk: Avoid softlockups in console_unlock()
Date: Thu, 31 Jan 2013 13:21:18 -0800	[thread overview]
Message-ID: <20130131132118.6c4a484a.akpm@linux-foundation.org> (raw)
In-Reply-To: <CAK7N6vptwoT+D4=Qs6D0a-vB8DbcHya_taJ6s7JxG7gQxEfwtw@mail.gmail.com>

On Thu, 31 Jan 2013 13:14:05 +0530
anish singh <anish198519851985@gmail.com> wrote:

> > If it does need ratelimiting, I'd worry about using jiffies for that.
> > If the kernel is spending a long time with interrupts disabled, jiffies
> > might not be incrementing.  Using the CPU timestamp would be better
> > (eg, sched_clock()).
> 
> http://lxr.free-electrons.com/source/kernel/sched/clock.c#L75
> I am puzzled because of this definition(above link).Sched_clock is
> dependent on jiffies and jiffies is blocked so how sched_clock would
> be better(I am 100% missing something very obvious)?
> 
> Is it that sched_clock is not dependent on jiffies?

yes, I think sched_clock is dependent on jiffies for some architectures.

I was really using sched_clock as a place-filler for "some timer which
keeps running when interrupts are disabled" ;) I'm not really sure what
that would be nowadays - even get_cycles() isn't implemented on some
architectures.  I guess some architectures will need a lame fallback or
some sort.



      reply	other threads:[~2013-01-31 21:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15 17:58 [PATCH] printk: Avoid softlockups in console_unlock() Jan Kara
2013-01-16  7:37 ` Andrew Morton
2013-01-16 10:16   ` Jan Kara
2013-01-16 22:50     ` Andrew Morton
2013-01-16 23:55       ` Jan Kara
2013-01-17  0:11         ` Andrew Morton
2013-01-17 21:04           ` Jan Kara
2013-01-17 21:39             ` Andrew Morton
2013-01-17 23:46               ` Jan Kara
2013-01-17 23:50                 ` Andrew Morton
2013-01-21 21:00                   ` Jan Kara
2013-01-29 14:54                     ` Jan Kara
2013-01-31  0:08                       ` Andrew Morton
2013-01-31 12:46                         ` Jan Kara
2013-01-31  7:44               ` anish singh
2013-01-31 21:21                 ` Andrew Morton [this message]

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=20130131132118.6c4a484a.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=anish198519851985@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jack@suse.cz \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).