mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pete Zaitcev <zaitcev@redhat.com>
To: Paul Fulghum <paulkf@microgate.com>
Cc: zaitcev@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.4] usb serial write fix
Date: Mon, 1 Nov 2004 19:36:16 -0800	[thread overview]
Message-ID: <20041101193616.2d517e77@lembas.zaitcev.lan> (raw)
In-Reply-To: <mailman.1099321382.10097.linux-kernel2news@redhat.com>

On Mon, 01 Nov 2004 08:51:08 -0600, Paul Fulghum <paulkf@microgate.com> wrote:

Not a bad idea. I must admit that I thought about that, but then I had
concerns about monopolizing keventd, decided to think later about it, and
forgot about the issue.

> +++ b/drivers/usb/serial/usbserial.c	2004-11-01 08:29:07.000000000 -0600
> +		if (port->tty != NULL) {
> +			int rc;
> +			int sent = 0;
> +			while (sent < job->len) {
> +				rc = __serial_write(port, 0, job->buff + sent, job->len - sent);
> +				if ((rc < 0) || signal_pending(current))
> +					break;

Why testing for signals? Do you expect any?

> +				sent += rc;
> +				if ((sent < job->len) && current->need_resched)
> +					schedule();

That's the main problem here, isn't it. Serial communications are slow.
Tying up a shared thread just because of this just does not look right.
And in such CPU intensive way, too.

Looking at pl2303 in 2.4, I do not see any difference between its ->write
method and generic_write which would be specific to pl2303. The key
difference is that generic_write participates in the protocol governed by
port->write_busy. So why don't you simply drop pl2303_write?

-- Pete

       reply	other threads:[~2004-11-02  3:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1099321382.10097.linux-kernel2news@redhat.com>
2004-11-02  3:36 ` Pete Zaitcev [this message]
2004-11-02 14:03   ` Paul Fulghum
2004-11-02 15:25     ` Paul Fulghum
2004-11-27 18:46       ` Pete Zaitcev
2004-11-01 14:51 Paul Fulghum

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=20041101193616.2d517e77@lembas.zaitcev.lan \
    --to=zaitcev@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulkf@microgate.com \
    /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

Powered by JetHome