All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>,
	Andrew Morton <akpm@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Correctly flush 8250 buffers, notify ldisc of line status changes.
Date: Tue, 09 Nov 2004 13:49:19 +0000	[thread overview]
Message-ID: <1100008158.16045.7.camel@localhost.localdomain> (raw)
In-Reply-To: <1100011170.4542.142.camel@hades.cambridge.redhat.com>

On Maw, 2004-11-09 at 14:39, David Woodhouse wrote:
> Actually I needed it to respond to CTS going away, and it provides a
> notification *before* the data are *sent*. Which lets me know that the
> first bytes of my packet were dropped by the automatic contention
> detection circuitry and I need to flush the rest of the packet from the
> FIFO rather than letting the hardware driver wait for CTS to come back
> then then send a corrupt half-packet.

But you can't flush the fifo from that callback, you don't have any
locking on it. What are you locking semantics ? Define them, versus
open, versus close, versus other I/O.

> That solves a different problem, and isn't quite as useful to me. I want
> to be able to respond to CTS going low as quickly as possible, by
> flushing the rest of the characters from the outgoing queue. I was happy
> enough with using a tasklet to actually call the flush method, to avoid
> the deadlock you pointed out without changing the locking of all the
> hardware drivers). 

So you want to replace a tasklet that responds to the event with a
tasklet which is called by the event ? Tell me how they differ when low
latency is set on the tty - I don't see any difference in performance

> > Andrew - please reject the patch.
> 
> I'll submit the bit which makes the flush_buffer method work on its own.
> Alan, would you care to offer a viable alternative which solves the
> problem I'm interested in?

If you can't define the locking semantics, its not viable anyway. I see
two things we can do usefully here. The first is to teach
tty_flip_buffer_push more about urgency - since the new tty code I'm
running/crashing/debugging has a real packet queue not just flip buffers
we can queue a tiny message to the queue front and we can probably begin
to cheat a bit more on low_latency v immediate.



  reply	other threads:[~2004-11-09 14:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-05 13:06 [PATCH] Correctly flush 8250 buffers, notify ldisc of line status changes David Woodhouse
2004-11-05 13:08 ` David Woodhouse
2004-11-09  9:22 ` Andrew Morton
2004-11-09 11:07   ` David Woodhouse
2004-11-09 11:15     ` Alan Cox
2004-11-09 13:28       ` Russell King
2004-11-09 13:17         ` Alan Cox
2004-11-09 14:39           ` David Woodhouse
2004-11-09 13:49             ` Alan Cox [this message]
2004-11-09 14:47           ` Russell King
2004-11-09 14:47             ` Alan Cox
2004-11-13 18:10               ` Russell King
2004-11-13 20:52                 ` Alan Cox
2004-11-13 22:40                   ` Nicolas Pitre
2004-11-09 14:39       ` David Woodhouse

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=1100008158.16045.7.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=akpm@osdl.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    /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.