netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Joseph Barrow <D.Barow@option.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linux USB kernel mailing list <linux-usb@vger.kernel.org>,
	Linux netdev Mailing list <netdev@vger.kernel.org>
Subject: Re: [PATCH]  hso.c against 2.6.27-rc5 throttle/unthrottle to prevent loss of serial data
Date: Fri, 05 Sep 2008 16:06:22 +0200	[thread overview]
Message-ID: <48C13CDE.2030100@option.com> (raw)
In-Reply-To: <20080905145902.1f84e729@lxorguk.ukuu.org.uk>

Thanks Alan,
I didn't see that check.

I'll shave a few lines off my code & send the patch again. 

Alan Cox wrote:
> O> If my understanding of the n_tty.c code is correct it will
>> only start throttling when there is TTY_THRESHOLD_THROTTLE
>> i.e. 128 bytes left in the n_tty ring buffer this is a very low limit
>> for my driver. This means
>> that if I try to do a tty_flip_buffer_push of
>> of a tty buffer larger than 128 bytes when the threshold
>> is reached I will lose data. My urb buffers are 4k in
>> size 2 buffers of this size up to the tty layer in a row 
>> quickly I believe I'll lose data in the n_tty layer.
> 
> If there is 128 bytes left in the n_tty buffer and you push data it ends
> up in the tty_buffer queue where it will accumulate up to 64K of data
> which will be fired into the tty layer when the tty layer is willing to
> accept it (sets its receive_room).
> 
> Alan


-- 
best regards,
D.J. Barrow

      reply	other threads:[~2008-09-05 14:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-05  9:35 [PATCH] hso.c against 2.6.27-rc5 throttle/unthrottle to prevent loss of serial data Denis Joseph Barrow
     [not found] ` <48C0FD6A.10706-x9gZzRpC1QbQT0dZR+AlfA@public.gmane.org>
2008-09-05 13:09   ` Alan Cox
     [not found]     ` <20080905140919.05f9edd8-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
2008-09-05 13:30       ` Denis Joseph Barrow
     [not found]         ` <48C13458.50803-x9gZzRpC1QbQT0dZR+AlfA@public.gmane.org>
2008-09-05 13:59           ` Alan Cox
2008-09-05 14:06             ` Denis Joseph Barrow [this message]

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=48C13CDE.2030100@option.com \
    --to=d.barow@option.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).