[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140530123533.GB10549@amd.pavel.ucw.cz>
Date: Fri, 30 May 2014 14:35:33 +0200
From: Pavel Machek <pavel@....cz>
To: Miguel Oliveira <cmroliv@...il.com>
Cc: gregkh@...uxfoundation.org, gulsah.1004@...il.com,
pali.rohar@...il.com, peter.p.waskiewicz.jr@...el.com,
kristina.martsenko@...il.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: nokia_h4: nokia_core.c: use usleep_range()
instead of msleep()
Hi!
> So the /Documentation/timers/timers-howto.txt stats:
>
> SLEEPING FOR ~USECS OR SMALL MSECS ( 10us - 20ms):
> * Use usleep_range
>
> - Why not msleep for (1ms - 20ms)?
> Explained originally here:
> http://lkml.org/lkml/2007/8/3/250
> msleep(1~20) may not do what the caller intends, and
> will often sleep longer (~20 ms actual sleep for any
> value given in the 1~20ms range). In many cases this
> is not the desired behavior.
...
> Should the documentation should be ignored?
Caller wants to sleep for 10ms; docs said it may sleep for 10-20msec;
that sounds reasonable. You replaced it with busy-loop for 10-15msec.
That does not sound like improvement.
Thanks,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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