From: Yejune Deng <yejune.deng@gmail.com>
To: axboe@kernel.dk, hare@suse.de, jack@suse.cz,
gregkh@linuxfoundation.org, tj@kernel.org,
linux@dominikbrodowski.net
Cc: yejune.deng@gmail.com, linux-kernel@vger.kernel.org
Subject: [PATCH] init: fix msleep() is not accurate
Date: Fri, 11 Dec 2020 11:24:12 +0800 [thread overview]
Message-ID: <1607657052-17608-1-git-send-email-yejune.deng@gmail.com> (raw)
See Documentation/timers/timers-howto.rst, msleep() is not
for (1ms - 20ms),use usleep_range() instead.
Signed-off-by: Yejune Deng <yejune.deng@gmail.com>
---
init/do_mounts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/init/do_mounts.c b/init/do_mounts.c
index a78e44e..e007b47 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -606,7 +606,7 @@ void __init prepare_namespace(void)
saved_root_name);
while (driver_probe_done() != 0 ||
(ROOT_DEV = name_to_dev_t(saved_root_name)) == 0)
- msleep(5);
+ usleep_range(5000, 6000);
async_synchronize_full();
}
--
1.9.1
next reply other threads:[~2020-12-11 3:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-11 3:24 Yejune Deng [this message]
2020-12-11 7:28 ` [PATCH] init: fix msleep() is not accurate Dominik Brodowski
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=1607657052-17608-1-git-send-email-yejune.deng@gmail.com \
--to=yejune.deng@gmail.com \
--cc=axboe@kernel.dk \
--cc=gregkh@linuxfoundation.org \
--cc=hare@suse.de \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=tj@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