mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Toby Gray <toby.gray@realvnc.com>
Cc: Oliver Neukum <oliver@neukum.name>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB: cdc-acm: Prevent loss of data when filling tty buffer
Date: Wed, 8 Jun 2011 16:46:26 +0100	[thread overview]
Message-ID: <20110608164626.22bc893c@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <1307547519-29246-1-git-send-email-toby.gray@realvnc.com>

> This patch adds checking for how many bytes have been inserted into the tty
> buffer and places data which hasn't been inserted into a pending buffer list.
> The pending buffer list is pushed to the tty buffer when the tty unthrottles

I don't think this is the way to tackle it.

If the kernel tty buffer code is shedding data then not only have we
asserted a throttle but 64K has been accumulated or the system is out of
memory.

So the questions to me are:

a) Why is your setup filling 64K in the time it takes the throttle
response to occur

b) Do we care (is the right thing to do to lose bits anyway at that point)

c) What should we do about it in the *general* case


It seems to me either its a cdc-acm specific problem with throttle
response behaviour, or its a general case at very high speed (which seems
more likely). In neither case is adding an extra queue to paper over it
the right solution.



  reply	other threads:[~2011-06-08 15:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-08 15:38 Toby Gray
2011-06-08 15:46 ` Alan Cox [this message]
2011-06-08 17:08   ` Toby Gray

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=20110608164626.22bc893c@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oliver@neukum.name \
    --cc=toby.gray@realvnc.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

all inboxes | Powered by JetHome®