public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Should I use Linux to develop driver for specialized ISA card?
@ 2001-09-04 12:57 Rastislav Stanik
  2001-09-04 13:28 ` Richard B. Johnson
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Rastislav Stanik @ 2001-09-04 12:57 UTC (permalink / raw)
  To: linux-kernel

Hi,

I'd like to know your opinion on following problem:

I'm developing specialized plotter.
The moving parts of the plotter are controlled by ISA card that generates
(and responds to) interrupts on each movement or printing event.
The interrupts can be generated quite fast; up to frequency of 4kHz.

I need to write a driver for that.
The 1st prototype is developed in MS-DOS,but I hit problem with memory.
The driver needs to use (and transfer) quite big chunks of memory.
1MB is not enough.

In NT you don't develop drivers so easily. It is actually a pain.
Therefore I'm considering Linux. The machine would be probably 
dedicated and, may be later, embeded in the plotter.
Problems:
- It is unlikely that my driver would ever make it to main-stream kernel source.
- I'm just a C/C++ programmer, I have just rough idea what does it mean to
'develop a driver in Linux'. I'm pretty familiar with Linux as sys-admin though.

All I need is: to have piece of code executed on some interrupt,
read/write IO ports of the card and be able to transfer big pieces
of memory to the card.

What do you think? Is Linux the ideal platform for me?

Please, Cc: to rastos@woctni.sk, I'm not subscribed to the mailing list (yet).
---
        bye
                rastos

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Should I use Linux to develop driver for specialized ISA card?
  2001-09-04 12:57 Should I use Linux to develop driver for specialized ISA card? Rastislav Stanik
@ 2001-09-04 13:28 ` Richard B. Johnson
  2001-09-04 13:30 ` Anton Altaparmakov
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 16+ messages in thread
From: Richard B. Johnson @ 2001-09-04 13:28 UTC (permalink / raw)
  To: Rastislav Stanik; +Cc: linux-kernel

On Tue, 4 Sep 2001, Rastislav Stanik wrote:

> Hi,
> 
> I'd like to know your opinion on following problem:
> 
> I'm developing specialized plotter.
> The moving parts of the plotter are controlled by ISA card that generates
> (and responds to) interrupts on each movement or printing event.
> The interrupts can be generated quite fast; up to frequency of 4kHz.

Linux drivers have no problem with interrupt-rates up to about 150,000
per second if the CPU is 130 MHz or faster and the ISR is small.

> 
> I need to write a driver for that.
> The 1st prototype is developed in MS-DOS,but I hit problem with memory.
> The driver needs to use (and transfer) quite big chunks of memory.
> 1MB is not enough.
> 

Normally, a Linux driver implements open/close/read/write/poll/ioctl. It
transfers chunks of data so the large memory allocations are in
user-space while the chunks are small buffers in kernel space.


> In NT you don't develop drivers so easily. It is actually a pain.
> Therefore I'm considering Linux. The machine would be probably 
> dedicated and, may be later, embeded in the plotter.
> Problems:
> - It is unlikely that my driver would ever make it to main-stream kernel source.
> - I'm just a C/C++ programmer, I have just rough idea what does it mean to
> 'develop a driver in Linux'. I'm pretty familiar with Linux as sys-admin though.
> 

Linux drivers are quite straight-forward and they can be inserted/removed
from a running kernel (modules). This makes development run very quickly
beause you can make small portions, test them, make more, etc., without
ever having to re-boot. As long as you write code that behaves, i.e., no
buffer overflows, and proper data allocation/deallocation, you will
never have to re-boot.

> All I need is: to have piece of code executed on some interrupt,
> read/write IO ports of the card and be able to transfer big pieces
> of memory to the card.
> 
Trivial.

> What do you think? Is Linux the ideal platform for me?
>

It's ideal. But, you have to start thinking like a Linux/Unix
programmer. For instance, you do not allocate large buffers inside
the kernel, you use poll() or select() to let user-mode code know
that some event (like an interrupt) occurred so you can get/put
data using read() or write(). You use ioctl() to send/receive
control information to your device.
 

Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

    I was going to compile a list of innovations that could be
    attributed to Microsoft. Once I realized that Ctrl-Alt-Del
    was handled in the BIOS, I found that there aren't any.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Should I use Linux to develop driver for specialized ISA card?
  2001-09-04 12:57 Should I use Linux to develop driver for specialized ISA card? Rastislav Stanik
  2001-09-04 13:28 ` Richard B. Johnson
@ 2001-09-04 13:30 ` Anton Altaparmakov
  2001-09-04 13:42 ` Erik Mouw
  2001-09-04 15:15 ` Alan Cox
  3 siblings, 0 replies; 16+ messages in thread
From: Anton Altaparmakov @ 2001-09-04 13:30 UTC (permalink / raw)
  To: Rastislav Stanik; +Cc: linux-kernel

At 13:57 04/09/01, Rastislav Stanik wrote:
>I'm developing specialized plotter.
>The moving parts of the plotter are controlled by ISA card that generates
>(and responds to) interrupts on each movement or printing event.
>The interrupts can be generated quite fast; up to frequency of 4kHz.
>
>I need to write a driver for that.
>The 1st prototype is developed in MS-DOS,but I hit problem with memory.
>The driver needs to use (and transfer) quite big chunks of memory.
>1MB is not enough.
>
>In NT you don't develop drivers so easily. It is actually a pain.
>Therefore I'm considering Linux. The machine would be probably
>dedicated and, may be later, embeded in the plotter.
>Problems:
>- It is unlikely that my driver would ever make it to main-stream kernel 
>source.

Why should this is be a problem? - Considering you are talking embedded 
devices here you just need to take a stable kernel, write your driver for 
it and never change kernel. No need. Also you might want to consider one of 
the embedded/realtime Linux offerings out there.

>- I'm just a C/C++ programmer, I have just rough idea what does it mean to
>'develop a driver in Linux'. I'm pretty familiar with Linux as sys-admin 
>though.
>
>All I need is: to have piece of code executed on some interrupt,
>read/write IO ports of the card and be able to transfer big pieces
>of memory to the card.

Read A. Rubbini's Linux Device Drivers 2nd ed from O'Reilly. Have a look at 
http://www.oreilly.com/catalog/linuxdrive2/ where you can also find the 
online edition of the book.

>What do you think? Is Linux the ideal platform for me?

Of course! But then again I am biased. (-; To what other OS do you have all 
the source code with the rights modify it at will? And for what other OS 
can you get help while developing drivers in such an efficient manner as is 
possible with LKML and the other Linux mailinglists/newsgroups/irc? I have 
no idea about ISA handling and Linux so can't comment on technicallities of 
this but in view of embedding it, Linux is probably a good choice for you.

HTH,

Anton


-- 
   "Nothing succeeds like success." - Alexandre Dumas
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS Maintainer / WWW: http://linux-ntfs.sf.net/
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Should I use Linux to develop driver for specialized ISA card?
  2001-09-04 12:57 Should I use Linux to develop driver for specialized ISA card? Rastislav Stanik
  2001-09-04 13:28 ` Richard B. Johnson
  2001-09-04 13:30 ` Anton Altaparmakov
@ 2001-09-04 13:42 ` Erik Mouw
  2001-09-17 19:19   ` Rogier Wolff
  2001-09-04 15:15 ` Alan Cox
  3 siblings, 1 reply; 16+ messages in thread
From: Erik Mouw @ 2001-09-04 13:42 UTC (permalink / raw)
  To: Rastislav Stanik; +Cc: linux-kernel

On Tue, Sep 04, 2001 at 02:57:10PM +0200, Rastislav Stanik wrote:
> I'm developing specialized plotter.
> The moving parts of the plotter are controlled by ISA card that generates
> (and responds to) interrupts on each movement or printing event.
> The interrupts can be generated quite fast; up to frequency of 4kHz.

I just made a driver for a couple of serial A/Ds that runs at 2kHz on a
StrongARM platform. The system doesn't have any problems to keep up
with that frequency, so I think 4kHz would still be OK.

> I need to write a driver for that.
> The 1st prototype is developed in MS-DOS,but I hit problem with memory.
> The driver needs to use (and transfer) quite big chunks of memory.
> 1MB is not enough.
> 
> In NT you don't develop drivers so easily. It is actually a pain.
> Therefore I'm considering Linux. The machine would be probably 
> dedicated and, may be later, embeded in the plotter.
> Problems:
> - It is unlikely that my driver would ever make it to main-stream
>   kernel source.

That's no problem, most of the embedded drivers never do.

> - I'm just a C/C++ programmer, I have just rough idea what does it
> mean to 'develop a driver in Linux'. I'm pretty familiar with Linux
> as sys-admin though.

Forget about C++ for kernel programming, it simply doesn't work (see
the lkml FAQ at http://www.tux.org/lkml/ ). A nice starting point for
kernel programming is http://www.kernelnewbies.org/ together with its
IRC channel #kernelnewbies. Also get a copy of the book "Linux device
drivers (2nd edition)", there is a link in the books section on the
kernelnewbies website.

> All I need is: to have piece of code executed on some interrupt,
> read/write IO ports of the card and be able to transfer big pieces
> of memory to the card.
> 
> What do you think? Is Linux the ideal platform for me?

I don't know if Linux is the *ideal* platform, but driving a plotter
could certainly be done in Linux.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Should I use Linux to develop driver for specialized ISA card?
  2001-09-04 12:57 Should I use Linux to develop driver for specialized ISA card? Rastislav Stanik
                   ` (2 preceding siblings ...)
  2001-09-04 13:42 ` Erik Mouw
@ 2001-09-04 15:15 ` Alan Cox
  2001-09-04 15:26   ` Fred
  3 siblings, 1 reply; 16+ messages in thread
From: Alan Cox @ 2001-09-04 15:15 UTC (permalink / raw)
  To: rastos; +Cc: linux-kernel

> The moving parts of the plotter are controlled by ISA card that generates
> (and responds to) interrupts on each movement or printing event.
> The interrupts can be generated quite fast; up to frequency of 4kHz.

Thats fine. The issue you might need to consider is how long you can wait
between an irq and actually excuting the handler. If that is very tight then
you may want Victor Yodaiken's rtlinux

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Should I use Linux to develop driver for specialized ISA card?
  2001-09-04 15:15 ` Alan Cox
@ 2001-09-04 15:26   ` Fred
  2001-09-04 15:36     ` Alan Cox
                       ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Fred @ 2001-09-04 15:26 UTC (permalink / raw)
  To: Alan Cox, rastos; +Cc: linux-kernel

I'm  curious, Alan, Why? I'm a hardware developer, and I would have assumed 
that linux would have been ideal for real time / embedded projects? (routers 
/ controllers / etc.) Is there, for instance, a reason to suspect that linux 
would not be able to respond to interrupts at say 8Khz?
of course I know nothing of rtlinux so I'll read.

TIA
Fred


 _________________________________________________ 
On Tuesday 04 September 2001 10:15 am, Alan Cox wrote:
> > The moving parts of the plotter are controlled by ISA card that generates
> > (and responds to) interrupts on each movement or printing event.
> > The interrupts can be generated quite fast; up to frequency of 4kHz.
>
> Thats fine. The issue you might need to consider is how long you can wait
> between an irq and actually excuting the handler. If that is very tight
> then you may want Victor Yodaiken's rtlinux
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Should I use Linux to develop driver for specialized ISA card?
  2001-09-04 15:26   ` Fred
@ 2001-09-04 15:36     ` Alan Cox
  2001-09-04 15:40     ` Joel Jaeggli
  2001-09-04 16:24     ` Christopher Friesen
  2 siblings, 0 replies; 16+ messages in thread
From: Alan Cox @ 2001-09-04 15:36 UTC (permalink / raw)
  To: Fred; +Cc: Alan Cox, rastos, linux-kernel

> I'm  curious, Alan, Why? I'm a hardware developer, and I would have assumed 
> that linux would have been ideal for real time / embedded projects? (routers 
> / controllers / etc.) Is there, for instance, a reason to suspect that linux 
> would not be able to respond to interrupts at say 8Khz?
> of course I know nothing of rtlinux so I'll read.

Routers aren't real time for example

The specific issues you have to watch are mostly from user space. Kernel irq
handlers will run very rapidly providing another driver is not holding the
interrupts off for a long time. Certain types of PC device require this 
(some IDE controllers for example). You also have to watch PCI graphics
cards some of which will stall the PCI bus locking the CPU off it for 
milliseconds at a time [its a hack to get better benchmark numbers - sick
isnt it]

So with the kernel you should be able to respond to irqs at 8Khz, with
RtLinux you can make that a definitive mathematically hard guarantee

Depends which you need

Alan

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Should I use Linux to develop driver for specialized ISA card?
  2001-09-04 15:26   ` Fred
  2001-09-04 15:36     ` Alan Cox
@ 2001-09-04 15:40     ` Joel Jaeggli
  2001-09-04 16:24     ` Christopher Friesen
  2 siblings, 0 replies; 16+ messages in thread
From: Joel Jaeggli @ 2001-09-04 15:40 UTC (permalink / raw)
  To: Fred; +Cc: Alan Cox, rastos, linux-kernel

Fred, I'd check out the faq on rtlinux...

           "Worst-case times are
           about 15microseconds between the assertion of an interrupt
           and the starting of the realtime handler on a generic x86
           PC"

there where patches in the 2.2 era (some kind of midi related flamefest
occured at that time) that would take the average in a 2.2 kenel down to
25Us but the worst case was still fairly large...

what a rtos buys is not generally performance but a much higher
level determinism than what we can arrive at.

joelja

On Tue, 4 Sep 2001, Fred wrote:

> I'm  curious, Alan, Why? I'm a hardware developer, and I would have assumed
> that linux would have been ideal for real time / embedded projects? (routers
> / controllers / etc.) Is there, for instance, a reason to suspect that linux
> would not be able to respond to interrupts at say 8Khz?
> of course I know nothing of rtlinux so I'll read.
>
> TIA
> Fred
>
>
>  _________________________________________________
> On Tuesday 04 September 2001 10:15 am, Alan Cox wrote:
> > > The moving parts of the plotter are controlled by ISA card that generates
> > > (and responds to) interrupts on each movement or printing event.
> > > The interrupts can be generated quite fast; up to frequency of 4kHz.
> >
> > Thats fine. The issue you might need to consider is how long you can wait
> > between an irq and actually excuting the handler. If that is very tight
> > then you may want Victor Yodaiken's rtlinux
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

-- 
--------------------------------------------------------------------------
Joel Jaeggli				       joelja@darkwing.uoregon.edu
Academic User Services			     consult@gladstone.uoregon.edu
     PGP Key Fingerprint: 1DE9 8FCA 51FB 4195 B42A 9C32 A30D 121E
--------------------------------------------------------------------------
It is clear that the arm of criticism cannot replace the criticism of
arms.  Karl Marx -- Introduction to the critique of Hegel's Philosophy of
the right, 1843.




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Should I use Linux to develop driver for specialized ISA card?
  2001-09-04 15:26   ` Fred
  2001-09-04 15:36     ` Alan Cox
  2001-09-04 15:40     ` Joel Jaeggli
@ 2001-09-04 16:24     ` Christopher Friesen
  2001-09-04 17:32       ` Mark Frazer
  2001-09-04 18:19       ` Roger Larsson
  2 siblings, 2 replies; 16+ messages in thread
From: Christopher Friesen @ 2001-09-04 16:24 UTC (permalink / raw)
  To: Fred; +Cc: linux-kernel

Fred wrote:
> 
> I'm  curious, Alan, Why? I'm a hardware developer, and I would have assumed
> that linux would have been ideal for real time / embedded projects? (routers
> / controllers / etc.) Is there, for instance, a reason to suspect that linux
> would not be able to respond to interrupts at say 8Khz?
> of course I know nothing of rtlinux so I'll read.

I'm involved in a project where we are using linux in an embedded application. 
We've got a gig of ram, no hard drives, no video, and the only I/O is serial,
ethernet and fiberchannel.

We have a realtime process that tries to run every 50ms.  We're seeing actual
worst-case scheduling latencies upwards of 300-400ms.

So while interrupts can be handled pretty quickly, you'll want to make sure that
your buffers are big enough that your userspace app only needs to run every half
second or so.

You may be better off with rtlinux if you need better response. (Or if you're on
x86 hardware you could look at the low-latency patches.)


-- 
Chris Friesen                    | MailStop: 043/33/F10  
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986
Nepean, ON K2H 8E9 Canada        | email: cfriesen@nortelnetworks.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Should I use Linux to develop driver for specialized ISA card?
  2001-09-04 16:24     ` Christopher Friesen
@ 2001-09-04 17:32       ` Mark Frazer
  2001-09-04 17:53         ` Christopher Friesen
  2001-09-04 18:19       ` Roger Larsson
  1 sibling, 1 reply; 16+ messages in thread
From: Mark Frazer @ 2001-09-04 17:32 UTC (permalink / raw)
  To: linux-kernel

With or without the low-latency patches?

Christopher Friesen <cfriesen@nortelnetworks.com> [01/09/04 12:29]:
> We have a realtime process that tries to run every 50ms.  We're seeing actual
> worst-case scheduling latencies upwards of 300-400ms.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Should I use Linux to develop driver for specialized ISA card?
  2001-09-04 17:32       ` Mark Frazer
@ 2001-09-04 17:53         ` Christopher Friesen
  0 siblings, 0 replies; 16+ messages in thread
From: Christopher Friesen @ 2001-09-04 17:53 UTC (permalink / raw)
  To: Mark Frazer; +Cc: linux-kernel

Mark Frazer wrote:

> Christopher Friesen <cfriesen@nortelnetworks.com> [01/09/04 12:29]:
> > We have a realtime process that tries to run every 50ms.  We're seeing actual
> > worst-case scheduling latencies upwards of 300-400ms.
> 
> With or without the low-latency patches?


Without.  It's PPC hardware, and the lowlatency stuff that I've found seems to
be x86-centric.



-- 
Chris Friesen                    | MailStop: 043/33/F10  
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986
Nepean, ON K2H 8E9 Canada        | email: cfriesen@nortelnetworks.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Should I use Linux to develop driver for specialized ISA card?
  2001-09-04 16:24     ` Christopher Friesen
  2001-09-04 17:32       ` Mark Frazer
@ 2001-09-04 18:19       ` Roger Larsson
  2001-09-04 18:54         ` J Sloan
  2001-09-04 19:35         ` Christopher Friesen
  1 sibling, 2 replies; 16+ messages in thread
From: Roger Larsson @ 2001-09-04 18:19 UTC (permalink / raw)
  To: Christopher Friesen, Fred; +Cc: linux-kernel

On Tuesday den 4 September 2001 18:24, Christopher Friesen wrote:
> Fred wrote:
> > I'm  curious, Alan, Why? I'm a hardware developer, and I would have
> > assumed that linux would have been ideal for real time / embedded
> > projects? (routers / controllers / etc.) Is there, for instance, a reason
> > to suspect that linux would not be able to respond to interrupts at say
> > 8Khz?
> > of course I know nothing of rtlinux so I'll read.
>
> I'm involved in a project where we are using linux in an embedded
> application. We've got a gig of ram, no hard drives, no video, and the only
> I/O is serial, ethernet and fiberchannel.
>
> We have a realtime process that tries to run every 50ms.  We're seeing
> actual worst-case scheduling latencies upwards of 300-400ms.
>
> So while interrupts can be handled pretty quickly, you'll want to make sure
> that your buffers are big enough that your userspace app only needs to run
> every half second or so.
>
> You may be better off with rtlinux if you need better response. (Or if
> you're on x86 hardware you could look at the low-latency patches.)

1) Why shouldn't the low-latency patches work for another architecture?
Andrew Morton might be interested to fix other architectures too.
(but most patches are not in architecture specific code)

2) Montavistas reschedulable kernel is a very interesting approach, newly
released an update by Robert Love
  http://kpreempt.sourceforge.net/
  http://tech9.net/rml/linux/patch-rml-2.4.10-pre2-preempt-kernel-1
(there are still some spikes, but the floor is smooth)

But note you with both approaches you want to run the latency critical process
with a higher priority, and probably with the memory locked down.

See example code (latencytest) at:
 http://www.gardena.net/benno/linux/audio/
(but there is no need to run at the maximum possible priority since your
 process will be alone anyway...)

/RogerL

-- 
Roger Larsson
Skellefteå
Sweden

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Should I use Linux to develop driver for specialized ISA card?
  2001-09-04 18:19       ` Roger Larsson
@ 2001-09-04 18:54         ` J Sloan
  2001-09-04 19:35         ` Christopher Friesen
  1 sibling, 0 replies; 16+ messages in thread
From: J Sloan @ 2001-09-04 18:54 UTC (permalink / raw)
  To: Roger Larsson; +Cc: Christopher Friesen, Fred, linux-kernel

Roger Larsson wrote:

> 1) Why shouldn't the low-latency patches work for another architecture?
> Andrew Morton might be interested to fix other architectures too.
> (but most patches are not in architecture specific code)
>
> 2) Montavistas reschedulable kernel is a very interesting approach, newly
> released an update by Robert Love
>   http://kpreempt.sourceforge.net/
>   http://tech9.net/rml/linux/patch-rml-2.4.10-pre2-preempt-kernel-1
> (there are still some spikes, but the floor is smooth)
>
> But note you with both approaches you want to run the latency critical process
> with a higher priority, and probably with the memory locked down.
>
> See example code (latencytest) at:
>  http://www.gardena.net/benno/linux/audio/
> (but there is no need to run at the maximum possible priority since your
>  process will be alone anyway...)

Just a data point here -

The Andrew Morton patches have worked well for
me here - I test it often with quake 3 arena, and am
currently on 2.4.10-pre4 -

I was never successful in getting the kernel to
compile and run with any of the the other low
latency patches floating around -

cu

jjs


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Should I use Linux to develop driver for specialized ISA card?
  2001-09-04 18:19       ` Roger Larsson
  2001-09-04 18:54         ` J Sloan
@ 2001-09-04 19:35         ` Christopher Friesen
  2001-09-04 19:58           ` Andrew Morton
  1 sibling, 1 reply; 16+ messages in thread
From: Christopher Friesen @ 2001-09-04 19:35 UTC (permalink / raw)
  To: Roger Larsson; +Cc: Fred, linux-kernel

Roger Larsson wrote:
> 
> On Tuesday den 4 September 2001 18:24, Christopher Friesen wrote:
> > Fred wrote:
> > > I'm  curious, Alan, Why? I'm a hardware developer, and I would have
> > > assumed that linux would have been ideal for real time / embedded
> > > projects? (routers / controllers / etc.) Is there, for instance, a reason
> > > to suspect that linux would not be able to respond to interrupts at say
> > > 8Khz?
> > > of course I know nothing of rtlinux so I'll read.
> >
> > I'm involved in a project where we are using linux in an embedded
> > application. We've got a gig of ram, no hard drives, no video, and the only
> > I/O is serial, ethernet and fiberchannel.
> >
> > We have a realtime process that tries to run every 50ms.  We're seeing
> > actual worst-case scheduling latencies upwards of 300-400ms.

> 1) Why shouldn't the low-latency patches work for another architecture?
> Andrew Morton might be interested to fix other architectures too.
> (but most patches are not in architecture specific code)

Well, a while back I took a look at the low latency patch and saw a bunch of
arch-specific files being modified so I assumed that it wouldn't do much on a
different architecture.  I may have been wrong.  I guess its time for me to do
some testing.

Chris

-- 
Chris Friesen                    | MailStop: 043/33/F10  
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986
Nepean, ON K2H 8E9 Canada        | email: cfriesen@nortelnetworks.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Should I use Linux to develop driver for specialized ISA card?
  2001-09-04 19:35         ` Christopher Friesen
@ 2001-09-04 19:58           ` Andrew Morton
  0 siblings, 0 replies; 16+ messages in thread
From: Andrew Morton @ 2001-09-04 19:58 UTC (permalink / raw)
  To: Christopher Friesen; +Cc: Roger Larsson, Fred, linux-kernel

Christopher Friesen wrote:
> 
> > 1) Why shouldn't the low-latency patches work for another architecture?
> > Andrew Morton might be interested to fix other architectures too.
> > (but most patches are not in architecture specific code)
> 
> Well, a while back I took a look at the low latency patch and saw a bunch of
> arch-specific files being modified so I assumed that it wouldn't do much on a
> different architecture.  I may have been wrong.  I guess its time for me to do
> some testing.
> 

It is now arch-neutral.   There used to be a couple of x86 tweaks,
but they became unnecessary when some softirq fixes were merged.

So for other architectures the only thing which needs changing
is the actual config entries in arch/<arch>/config.in.  If you
do take a look at this, please send me the diffs for whatever
your architecture is.

I haven't heard much from non-x86 people; there were some remaining
latency problems with PPC many months ago, but they were never
explained and I don't know if the problems remain, or if indeed
they were ever real.

It's kind of amazing that you're seeing 300 millisec stalls on
a system with no local disks - most problems occur in the
VM list walking, dirty buffer writeout, etc.  Unless you're
performing a lot of fileystem work across that FC controller?
It could be that there is an architecture- or driver-specific
problem in your setup.

-

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Should I use Linux to develop driver for specialized ISA card?
  2001-09-04 13:42 ` Erik Mouw
@ 2001-09-17 19:19   ` Rogier Wolff
  0 siblings, 0 replies; 16+ messages in thread
From: Rogier Wolff @ 2001-09-17 19:19 UTC (permalink / raw)
  To: Erik Mouw; +Cc: Rastislav Stanik, linux-kernel

Erik Mouw wrote:
> On Tue, Sep 04, 2001 at 02:57:10PM +0200, Rastislav Stanik wrote:
> > I'm developing specialized plotter.
> > The moving parts of the plotter are controlled by ISA card that generates
> > (and responds to) interrupts on each movement or printing event.
> > The interrupts can be generated quite fast; up to frequency of 4kHz.
> 
> I just made a driver for a couple of serial A/Ds that runs at 2kHz on a
> StrongARM platform. The system doesn't have any problems to keep up
> with that frequency, so I think 4kHz would still be OK.

I've had a waveform generator generate a square wave into an interrupt
input of an ISA card. At 120k interrupts per second the system would
noticably slow down, and at 140k interrupts it would stop. (and
continue once the interrupt frequency was down below the threshold
again).

So, you have about a factor of 25 of margin beyond "4kHz".

			Roger. 
-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
* There are old pilots, and there are bold pilots. 
* There are also old, bald pilots. 

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2001-09-17 19:19 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-04 12:57 Should I use Linux to develop driver for specialized ISA card? Rastislav Stanik
2001-09-04 13:28 ` Richard B. Johnson
2001-09-04 13:30 ` Anton Altaparmakov
2001-09-04 13:42 ` Erik Mouw
2001-09-17 19:19   ` Rogier Wolff
2001-09-04 15:15 ` Alan Cox
2001-09-04 15:26   ` Fred
2001-09-04 15:36     ` Alan Cox
2001-09-04 15:40     ` Joel Jaeggli
2001-09-04 16:24     ` Christopher Friesen
2001-09-04 17:32       ` Mark Frazer
2001-09-04 17:53         ` Christopher Friesen
2001-09-04 18:19       ` Roger Larsson
2001-09-04 18:54         ` J Sloan
2001-09-04 19:35         ` Christopher Friesen
2001-09-04 19:58           ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox