linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: monstr@monstr.eu, linux-serial@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@suse.de>,
	LKML <linux-kernel@vger.kernel.org>,
	Peter Korsgaard <jacmet@sunsite.dk>
Subject: Re: Using serial driver 16550A in poll mode without interrupt connected
Date: Wed, 12 Oct 2011 11:19:37 -0400	[thread overview]
Message-ID: <20111012151937.GL11548@thunk.org> (raw)
In-Reply-To: <20111012145153.5490b592@lxorguk.ukuu.org.uk>

On Wed, Oct 12, 2011 at 02:51:53PM +0100, Alan Cox wrote:
> > Driver is probed with no IRQ (NO_IRQ = -1 on Microblaze)
> > 83e00000.serial: ttyS0 at MMIO 0x83e01003 (irq = -1) is a 16550A
> 
> Zero means no IRQ. NO_IRQ is a legacy internal thing for the old IDE code
> so not something other code should be using. Setting the IRQ to -1 is
> bogus and will confuse the rest of the kernel.
> 
> > Is it possible to use serial driver without IRQ - or blocking IRQ, etc.?
> 
> Within limits - it kills your power management and data rates because of
> the continual polling.

It was something that I implemented years ago primarily for crappy
hardware that didn't get interrupts right.  It's not something which
where I would advise anyone to intentionally design hardware to use.

If you have really deep FIFO's (i.e., a kilobyte or more), and you're
primarily interested in throughput, not latency, and/or you are trying
to support tens or hundreds of serial ports for some kind of modem
pool, there is a place for a polled implementation.  See the Comtrol
Rockport for an example of hardware and with a linux driver that will
handle this.  It's basically a "NAPI for serial ports" sort of
approach to minimize the overhead of potentially hundreds of thousands
of interrupts per second if you are driving large numbers of ports
(and at that point, power management is the least of your concerns
:-).  But you need special hardware to do this, not a random 16550A
with a pathetically small 16 byte FIFO.

						- Ted

  reply	other threads:[~2011-10-12 15:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-12 13:03 Using serial driver 16550A in poll mode without interrupt connected Michal Simek
2011-10-12 13:51 ` Alan Cox
2011-10-12 15:19   ` Ted Ts'o [this message]
2011-10-13 10:08     ` Michal Simek
2011-10-13  9:56   ` Michal Simek

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=20111012151937.GL11548@thunk.org \
    --to=tytso@mit.edu \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=gregkh@suse.de \
    --cc=jacmet@sunsite.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=monstr@monstr.eu \
    /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).