From: Ryan Arnold <rsa@us.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>,
linuxppc64-dev <linuxppc64-dev@lists.linuxppc.org>,
Paul Mackerras <paulus@samba.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: [PATCH] interrupt driven hvc_console as vio device
Date: Wed, 25 Aug 2004 00:09:54 -0500 [thread overview]
Message-ID: <1093410594.3402.106.camel@localhost> (raw)
In-Reply-To: <20040824214620.769e03de.akpm@osdl.org>
On Tue, 2004-08-24 at 23:46, Andrew Morton wrote:
> > static void hvc_close(struct tty_struct *tty, struct file * filp)
> > {
> > ...
> > + while (hp->n_outbuf) {
> > + spin_unlock_irqrestore(&hp->lock, flags);
> > + yield();
> > + spin_lock_irqsave(&hp->lock, flags);
> > + }
>
> ick.
>
> I suspect that if the caller of hvc_close() has realtime scheduling policy,
> this locks up. Unless it's waiting for interrupt activity.
>
> Really, a real sleep/wakeup would be tons better.
Paulus suggested that tty_wait_until_sent() would be most appropriate
since it actually does a sleep/wakeup. I think I'll rearrange this
function a bit so that I won't have to drop the spin_lock and then grab
it again as well. Thanks for the suggestion.
Ryan S. Arnold
IBM Linux Technology Center
next prev parent reply other threads:[~2004-08-25 17:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-25 0:48 [PATCH] interrupt driven hvc_console as vio device Ryan Arnold
2004-08-25 4:46 ` Andrew Morton
2004-08-25 5:09 ` Ryan Arnold [this message]
2004-08-25 4:49 ` Andrew Morton
2004-08-25 5:12 ` Ryan Arnold
2004-08-25 4:59 ` Paul Mackerras
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=1093410594.3402.106.camel@localhost \
--to=rsa@us.ibm.com \
--cc=akpm@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@lists.linuxppc.org \
--cc=paulus@samba.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