From: Andy Parkins <andyparkins@gmail.com>
To: rich+ml@lclogic.com
Cc: linux-serial@vger.kernel.org
Subject: Re: tcdrain / TCSBRK / wait_until_sent delay
Date: Fri, 6 May 2005 09:01:06 +0100 [thread overview]
Message-ID: <200505060901.10692.andyparkins@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0505051023210.21399@deadrat.localdomain>
[-- Attachment #1: Type: text/plain, Size: 1360 bytes --]
On Thursday 2005 May 05 18:51, rich+ml@lclogic.com wrote:
> > Is it unreasonable to expect Linux to do a 200us turnaround?
>
> Assuming you have 2.6 kernel? HZ=1000 and you'll only get 1mS resolution
Thanks for your response. You'll have to forgive me, I'm only vaguely
familiar with the kernel internals. I thought that because all of the work
is being done in the kernel that the HZ value wouldn't have an effect? In
serial_core.c: uart_wait_until_sent() the character timeout is defined as
char_time = (port->timeout - HZ/50) / port->fifosize;
char_time = char_time / 5;
From this I guess that port->timeout is the estimated time for the whole
transmit buffer, which is then divided by port->fifosize to make this a per
character time which is then divided by five to ensure that the check for
tx_empty() is done five times per character (the comments say this is to
satisfy NIST-PCTS, whatever that is). I'm not sure what the HZ/50 is for.
These times will all be significantly smaller than 1ms; if the value of HZ
where going to affect this then why has the author bothered to calculate
these times at all? 1ms would drown these other timeouts out.
Apologies if these are all stupid questions; as I say, I don't really know
what I'm talking about.
Andy
--
Dr Andrew Parkins, M Eng (hons), AMIEE
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2005-05-06 8:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-05 15:50 tcdrain / TCSBRK / wait_until_sent delay Andy Parkins
2005-05-05 17:51 ` rich+ml
2005-05-06 8:01 ` Andy Parkins [this message]
2005-05-06 19:14 ` rich+ml
2005-05-07 9:35 ` Andy Parkins
2005-05-07 18:09 ` rich+ml
2005-05-09 8:01 ` Andy Parkins
[not found] ` <Pine.LNX.4.58.0505090825470.750@deadrat.localdomain>
2005-05-10 7:44 ` Andy Parkins
2005-05-09 8:16 ` Tosoni
2005-05-09 8:59 ` Russell King
2005-05-09 10:03 ` Tosoni
2005-05-09 10:13 ` Russell King
2005-05-09 15:43 ` Theodore Ts'o
2005-05-07 10:32 ` Gerald Emig
2005-05-09 9:15 ` Christer Weinigel
2005-05-09 9:22 ` Christer Weinigel
2005-05-09 11:05 ` Andy Parkins
2005-05-09 15:53 ` Andy Parkins
2005-05-09 19:45 ` rich+ml
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=200505060901.10692.andyparkins@gmail.com \
--to=andyparkins@gmail.com \
--cc=linux-serial@vger.kernel.org \
--cc=rich+ml@lclogic.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 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.