Skip to content
This repository has been archived by the owner on May 28, 2021. It is now read-only.

Commit

Permalink
rtsx_usb_ms: use schedule_timeout_idle() in polling loop
Browse files Browse the repository at this point in the history
First version of this patch has already been posted to LKML by Ben
Hutchings ~6 months ago, but no further action were performed.

Ben's original message:

: rtsx_usb_ms creates a task that mostly sleeps, but tasks in
: uninterruptible sleep still contribute to the load average (for
: bug-compatibility with Unix).  A load average of ~1 on a system that
: should be idle is somewhat alarming.
:
: Change the sleep to be interruptible, but still ignore signals.

References: https://bugs.debian.org/765717
Link: http://lkml.kernel.org/r/b49f95ae83057efa5d96f532803cba47@natalenko.name
Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: Roger Tseng <rogerable@realtek.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
pfactum authored and torvalds committed May 24, 2016
1 parent a0c20de commit a831979
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/memstick/host/rtsx_usb_ms.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ static int rtsx_usb_detect_ms_card(void *__host)
if (host->eject)
break;

msleep(1000);
schedule_timeout_idle(HZ);
}

complete(&host->detect_ms_exit);
Expand Down

0 comments on commit a831979

Please sign in to comment.