From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Johan Hovold <jhovold@gmail.com>
Cc: Johan Hovold <jhovold@gmail.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
Michael Trimarchi <trimarchi@gandalf.sssup.it>,
Oliver Neukum <oliver@neukum.org>,
linux-usb@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency.
Date: Sat, 3 Oct 2009 14:18:07 +0100 [thread overview]
Message-ID: <20091003141807.1dc27e4e@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <20091003114229.GB605@localhost>
On Sat, 3 Oct 2009 13:42:29 +0200
Johan Hovold <jhovold@gmail.com> wrote:
> On Fri, Oct 02, 2009 at 05:33:08PM +0100, Alan Cox wrote:
> > For upstream how does this look as a tidy up
>
> I found a couple of issues:
>
> - The patch breaks unthrottling, as it checks THROTTLE before resubmitting
> urb whereas unthrottle checks ACTUALLY_UNTROTTLED which is never set.
>
> - The countread stuff should also be removed from
> ftdi_read_bulk_callback as they where only used for updating
> rx_bytes,
>
> And, obviously, this doesn't solve the problem of tty_flip_buffer_push
> being called from interrupt context (but I assume that was never the
> intention).
Calling tty_flip_buffer_push from an interrupt is perfectly acceptable
providing tty->low_latency isn't set: which it isn't.
> I've actually been working on cleaning up ftdi_sio inspired by the
> generic driver. I also threw out the work queue, but had not noticed the
> unused rx_byte yet. I also used the generic drivers scheme of not
> pushing to tty until unthrottled, but as you point out this is not really
> needed anymore.
The generic driver is a very bad example to follow in some areas but
this looks a big improvement. There are some patches reworking the
generic code to use kfifo on the output side which make it vastly better.
Not sure where the relevant google submissions went ?
> - spin_lock_irqsave(&priv->rx_lock, flags);
> - priv->rx_flags &= ~(THROTTLED | ACTUALLY_THROTTLED);
> - spin_unlock_irqrestore(&priv->rx_lock, flags);
> + spin_lock_irqsave(&port->lock, flags);
> + port->throttled = 0;
> + spin_unlock_irqrestore(&port->lock, flags);
If you only have a single bit use the set_bit/clear_bit/test_and_xxx_bit
stuff as it's faster on most boxes
> + * The per character mucking around with sysrq path it too slow, so
> + * shortcircuit it in the 99.9999999% of cases where the USB serial is
> + * not a console anyway.
> + */
> + ch = packet + 2;
> + len -= 2;
> + if (!port->console || !port->sysrq)
You need && flag == TTY_NORMAL ?
Definitely a move in the right direction
next prev parent reply other threads:[~2009-10-03 13:16 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-24 15:40 Johan Hovold
2009-09-24 19:03 ` Oliver Neukum
2009-09-24 19:21 ` Alan Cox
2009-09-24 21:15 ` Johan Hovold
2009-09-25 17:46 ` Michael Trimarchi
2009-09-29 14:55 ` Johan Hovold
2009-09-29 22:52 ` Alan Cox
2009-09-30 6:33 ` Michael Trimarchi
2009-09-30 9:05 ` Johan Hovold
2009-10-02 2:52 ` Eric W. Biederman
2009-10-02 8:47 ` Johan Hovold
2009-10-02 16:33 ` Alan Cox
2009-10-02 22:29 ` Eric W. Biederman
2009-10-03 10:21 ` Johan Hovold
2009-10-02 23:00 ` Eric W. Biederman
2009-10-03 13:09 ` Alan Cox
2009-10-03 23:51 ` Eric W. Biederman
2009-11-17 18:35 ` Eric W. Biederman
2009-11-17 18:41 ` Oliver Neukum
2009-11-17 18:56 ` Eric W. Biederman
2009-11-17 20:05 ` Eric W. Biederman
2009-11-18 1:08 ` Eric W. Biederman
2009-11-18 3:10 ` [PATCH] ftdi_sio: Keep going when write errors are encountered Eric W. Biederman
2009-11-18 3:44 ` Greg KH
2009-10-03 11:42 ` [PATCH] USB: ftdi_sio: Remove tty->low_latency Johan Hovold
2009-10-03 12:11 ` Oliver Neukum
2009-10-03 12:28 ` Johan Hovold
2009-10-03 13:31 ` Oliver Neukum
2009-10-03 14:41 ` Johan Hovold
2009-10-03 13:18 ` Alan Cox [this message]
2009-10-03 13:27 ` Oliver Neukum
2009-10-03 14:05 ` Johan Hovold
2009-10-03 16:33 ` Alan Cox
2009-10-03 16:46 ` Johan Hovold
2009-10-04 19:48 ` Johan Hovold
2009-10-04 23:39 ` Eric W. Biederman
2009-10-05 7:01 ` Johan Hovold
2009-10-02 16:59 ` Greg KH
2009-10-02 9:04 ` Alan Cox
2009-10-02 9:53 ` Alan Cox
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=20091003141807.1dc27e4e@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=gregkh@suse.de \
--cc=jhovold@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oliver@neukum.org \
--cc=trimarchi@gandalf.sssup.it \
/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
all inboxes | Powered by JetHome®