From: matthieu castet <castet.matthieu@free.fr>
To: greg@kroah.com
Cc: linux-kernel@vger.kernel.org, usbatm@lists.infradead.org,
linux-usb-devel@lists.sourceforge.net,
ueagle <ueagleatm-dev@gna.org>
Subject: [PATCH 1/3] UEAGLE : use interruptible sleep
Date: Tue, 03 Oct 2006 21:49:29 +0200 [thread overview]
Message-ID: <4522BEC9.4050806@free.fr> (raw)
[-- Attachment #1: Type: text/plain, Size: 252 bytes --]
Hi,
this patch use wait_event_interruptible_timeout and msleep_interruptible
beacause uninterruptible sleep (task state 'D') is counted as 1 towards
load average, like running processes.
Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
[-- Attachment #2: eagle-interruptible --]
[-- Type: text/plain, Size: 1184 bytes --]
use *_interruptible :
Uninterruptible sleep (task state 'D') is counted as 1 towards load average, lik
e running processes. Interruptible sleep is not.
Signed-off-by: matthieu castet <castet.matthieu@free.fr>
Index: linux/drivers/usb/atm/ueagle-atm.c
===================================================================
--- linux.orig/drivers/usb/atm/ueagle-atm.c 2006-09-22 22:05:13.000000000 +0200
+++ linux/drivers/usb/atm/ueagle-atm.c 2006-09-22 22:06:16.000000000 +0200
@@ -744,7 +744,7 @@
static inline int wait_cmv_ack(struct uea_softc *sc)
{
- int ret = wait_event_timeout(sc->cmv_ack_wait,
+ int ret = wait_event_interruptible_timeout(sc->cmv_ack_wait,
sc->cmv_ack, ACK_TIMEOUT);
sc->cmv_ack = 0;
@@ -1176,7 +1176,7 @@
if (!ret)
ret = uea_stat(sc);
if (ret != -EAGAIN)
- msleep(1000);
+ msleep_interruptible(1000);
if (try_to_freeze())
uea_err(INS_TO_USBDEV(sc), "suspend/resume not supported, "
"please unplug/replug your modem\n");
@@ -1605,7 +1605,7 @@
{
struct uea_softc *sc = usbatm->driver_data;
- wait_event(sc->sync_q, IS_OPERATIONAL(sc));
+ wait_event_interruptible(sc->sync_q, IS_OPERATIONAL(sc));
return 0;
reply other threads:[~2006-10-03 19:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4522BEC9.4050806@free.fr \
--to=castet.matthieu@free.fr \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=ueagleatm-dev@gna.org \
--cc=usbatm@lists.infradead.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 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.