From: Adam Kropelin <akropel1@rochester.rr.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: VDA@port.imtp.ilyichevsk.odessa.ua, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.5: ewrk3 cli/sti removal by VDA
Date: Fri, 25 Oct 2002 18:54:50 -0400 [thread overview]
Message-ID: <20021025225450.GA18623@www.kroptech.com> (raw)
In-Reply-To: <3DB9C970.3010305@pobox.com>
On Fri, Oct 25, 2002 at 06:45:04PM -0400, Jeff Garzik wrote:
> Adam Kropelin wrote:
> >
> > /* Wait a little while */
> > spin_unlock_irqrestore(&lp->hw_lock, flags);
> >- ret = delay;
> >- __wait_event_interruptible_timeout(wait, 0, ret);
> >+ set_current_state(TASK_INTERRUPTIBLE);
> >+ ret = schedule_timeout(HZ>>2);
> >
>
> close -- if schedule_timeout() returns greater than zero, that number is
> the remaining jiffies that schedule_timeout _should_ have slept, but did
> not. Ideally you need to call it in a loop, that decrements a variable
> based on schedule_timeout return code.
My assumption was that the only case in which schedule_timeout() would
return without completing the sleep is if the process was delivered a
signal. So I break the loop immediately in that case. I presume from
your explanation that schedule_timeout() may return for some other reason
(out of curiousity, what?)...and in that case I need to check for a
pending signal, exit if there is one, otherwise schedule_timeout() for
the remaining time. Am I getting warmer?
--Adam
next prev parent reply other threads:[~2002-10-25 22:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-19 2:13 [PATCH] 2.5: ewrk3 cli/sti removal by VDA Adam Kropelin
2002-10-19 2:46 ` Adam Kropelin
2002-10-19 14:55 ` Denis Vlasenko
2002-10-22 0:36 ` Jeff Garzik
2002-10-22 2:09 ` Adam Kropelin
2002-10-22 2:16 ` Jeff Garzik
2002-10-25 22:45 ` Jeff Garzik
2002-10-25 22:54 ` Adam Kropelin [this message]
2002-11-01 21:17 ` Adam Kropelin
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=20021025225450.GA18623@www.kroptech.com \
--to=akropel1@rochester.rr.com \
--cc=VDA@port.imtp.ilyichevsk.odessa.ua \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.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 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.