All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miguel Oliveira <cmroliv@gmail.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: gregkh@linuxfoundation.org, "Gülşah Köse" <gulsah.1004@gmail.com>,
	pali.rohar@gmail.com, peter.p.waskiewicz.jr@intel.com,
	"Kristina Martšenko" <kristina.martsenko@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: nokia_h4: nokia_core.c: use usleep_range() instead of msleep()
Date: Fri, 30 May 2014 13:58:02 +0100	[thread overview]
Message-ID: <CAMGgR5ui-4+7-VKSpJ5_NukbkuxK1sRWg0RsS=Ai+Vs2xn119A@mail.gmail.com> (raw)
In-Reply-To: <20140530123533.GB10549@amd.pavel.ucw.cz>

Not on my prespective. Its says "~20 ms actual sleep for any value
given in the 1~20ms range", so from my point of view it will sleep for
20ms, so I will save between 5 to 10ms. But maybe I'm seeing it the
wrong way.


Regards

2014-05-30 13:35 GMT+01:00 Pavel Machek <pavel@ucw.cz>:
> 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

  reply	other threads:[~2014-05-30 12:58 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-30 10:27 [PATCH] staging: nokia_h4: nokia_core.c: use usleep_range() instead of msleep() Miguel Oliveira
2014-05-30 11:34 ` Pavel Machek
2014-05-30 11:52   ` Marcel Holtmann
2014-05-30 12:30     ` Pavel Machek
2014-05-30 15:59       ` Greg KH
2014-05-30 16:15         ` Pali Rohár
2014-05-30 16:36           ` Greg KH
2014-08-06 20:56             ` Marcel Holtmann
2014-08-06 21:30               ` Pavel Machek
2014-08-07  0:25                 ` Greg KH
2014-08-07  8:13                   ` [PATCH] staging: nokia_h4: use more consistent name for intermediate object Pavel Machek
2014-08-07 20:24                     ` Greg KH
2014-08-09 15:48                       ` Pavel Machek
2014-08-10  7:29                       ` [PATCH 1/3] staging: nokia_h4: switch to right types and use bdaddr_t Pavel Machek
2014-08-10  7:31                       ` [PATCH 2/3] staging: nokia_h4: avoid __uX types Pavel Machek
2014-08-10  7:33                       ` [PATCH 3/3] staging: use inlines where it makes sense Pavel Machek
2014-08-10  7:34                       ` [PATCH] bluetooth: avoid using __uX types Pavel Machek
2014-08-07  9:07                   ` [PATCH] staging: nokia_h4: merge firmware together so that we can reduce ammount of exports Pavel Machek
2014-08-07  9:36                     ` Pavel Machek
2014-08-07 14:48                     ` Marcel Holtmann
2014-08-09 15:47                       ` Pavel Machek
2014-05-30 12:15   ` [PATCH] staging: nokia_h4: nokia_core.c: use usleep_range() instead of msleep() Miguel Oliveira
2014-05-30 12:35     ` Pavel Machek
2014-05-30 12:58       ` Miguel Oliveira [this message]
2014-05-30 16:01 ` Greg KH
2014-05-30 16:05   ` Miguel Oliveira
2014-05-30 16:13     ` Greg KH

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='CAMGgR5ui-4+7-VKSpJ5_NukbkuxK1sRWg0RsS=Ai+Vs2xn119A@mail.gmail.com' \
    --to=cmroliv@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gulsah.1004@gmail.com \
    --cc=kristina.martsenko@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=peter.p.waskiewicz.jr@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.