public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@suse.cz>
To: Jeff Garzik <jeff@garzik.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Andi Kleen <andi@firstfloor.org>,
	linux-kernel@vger.kernel.org
Subject: Re: better msleep for drivers
Date: Wed, 21 May 2008 21:01:03 +0200	[thread overview]
Message-ID: <20080521190103.GA19261@elf.ucw.cz> (raw)
In-Reply-To: <48343EBC.70703@garzik.org>

Hi!

>>>> Still longer term I suppose there's really no way around having accurate
>>>> sleep functions and it's probably better to start testing earlier than later.
>>> No objections, but we should not do that with a stupid msleep
>>> replacement interface; instead we should expose a flexible in kernel
>>> variant of hrtimer_nanosleep() which lets the user utilize
>>> ABS/REL_TIME and the different clocks. A msleep helper can be built on
>>> top of this very easily.
>>
>> While you are at it... it would be cool to have
>>
>> 'mdelay(2500 msec), but it is okay to wait 100msec more' -- type
>> interface, so we could use that for nohz benefit.
>>
>> Currently, mdelay is 'it is okay to wait 10msec more' interface, and
>> it would be nice to have that explicit.
>
> eh, I think you transposed mdelay with msleep?
>
> msleep() is the "it is okay to wait longer than I said" interface, not 
> mdelay().  mdelay() has always been non-sleeping and exact (as much as the 
> delay loop allows)

Okay, I was a bit confused.

Actually, both can delay for longer... msleep() in case of scheduling
load, mdelay() in case of interrupt load...

But the above was about hrtimer_nano*sleep*(), so that "how much
latency we can tolarate" parameter would still be good.

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

      reply	other threads:[~2008-05-21 19:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-11 11:01 better msleep for drivers Andi Kleen
2008-05-11 13:43 ` Thomas Gleixner
2008-05-21 10:41   ` Pavel Machek
2008-05-21 15:24     ` Jeff Garzik
2008-05-21 19:01       ` Pavel Machek [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=20080521190103.GA19261@elf.ucw.cz \
    --to=pavel@suse.cz \
    --cc=andi@firstfloor.org \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.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