Message ID | 1607592918-14356-1-git-send-email-yejune.deng@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | net: core: fix msleep() is not accurate | expand |
diff --git a/net/core/dev.c b/net/core/dev.c index d33099f..6e83ee03 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -6726,9 +6726,9 @@ void napi_disable(struct napi_struct *n) set_bit(NAPI_STATE_DISABLE, &n->state); while (test_and_set_bit(NAPI_STATE_SCHED, &n->state)) - msleep(1); + fsleep(1000); while (test_and_set_bit(NAPI_STATE_NPSVC, &n->state)) - msleep(1); + fsleep(1000); hrtimer_cancel(&n->timer);
See Documentation/timers/timers-howto.rst, msleep() is not for (1ms - 20ms), There is a more advanced API is used. Signed-off-by: Yejune Deng <yejune.deng@gmail.com> --- net/core/dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)