Rafi Gordon | 1 Dec 09:17 2005
Picon

Maximum number of interruprs a CPU can receive without dropping/losing any

Hello,

  Interrupts are handle by the PIC (Programmable Interrupt Controller) on older
	processors and APIC (Advanced Programmable Interrupt Controller) on more
	modern processors.
	
	I assume that there is a limit on the maximum number of interruprs
	a CPU can receive without dropping or losing interrupts and not handling
	them.
	
	Is there a way in which I can determine in Linux what is this limit
(apart from bombing the CPU irq lines...) ?
	
	Is this a hw detail which is constant regardless
	of which operating system runs on that processor ?
	
	-- RG

=================================================================
To unsubscribe, send mail to linux-il-request@... with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@...

Michael Green | 1 Dec 10:43 2005
Picon

OOM configuration

Is Out Of Memory Killer configurable? Can I tell it not to kill
daemons? Is there any sort of "exclude list"?
OS in question: SLES9 SP1 (kernel 2.6.5).
--
Warm regards,
Michael Green

=================================================================
To unsubscribe, send mail to linux-il-request@... with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@...

Shlomi Fish | 1 Dec 12:06 2005
Picon

I'm Looking for a Job

Hi all!

My name is Shlomi Fish and I'm a very experienced, talented and productive 
software developer, as well as writer (of essays, stories, web pages, etc.). 
I am looking for a job in computing. You can find my "Hire Me!" page with the 
various positions I can hold here:

http://www.shlomifish.org/work/hire-me/

My C.V. in various version is available here:

http://www.shlomifish.org/me/resumes/

As is my homepage ( http://www.shlomifish.org/ ) which is very rich and 
populated, where one can find many works and resources I have created in the 
past.

If you'd like to hire me please contact me in one of the following ways:

http://www.shlomifish.org/me/contact-me/

Regards,

	Shlomi Fish

---------------------------------------------------------------------
Shlomi Fish      shlomif@...
Homepage:        http://www.shlomifish.org/

95% of the programmers consider 95% of the code they did not write, in the
(Continue reading)

Oleg Goldshmidt | 1 Dec 14:42 2005

Re: Maximum number of interruprs a CPU can receive without dropping/losing any

Rafi Gordon <rafigordon@...> writes:

> 	I assume that there is a limit on the maximum number of
> 	interruprs a CPU can receive without dropping or losing
> 	interrupts and not handling them.
> 
> 	Is there a way in which I can determine in Linux what is this
> 	limit (apart from bombing the CPU irq lines...) ?
> 
> 	Is this a hw detail which is constant regardless
> 	of which operating system runs on that processor ?

I suppose it is OS-, device-, and driver-dependent. It is likely
limited by the maximal rate at which the device driver is able to
handle the interrupts: if the handler eats all the cycles on handling
the interrupts then the consumers of the device (applications) won't
get the CPU. Therefore the OS may start dropping interrupts (and yes,
losing data) at some point. 

There is a variety of related mechanisms that an OS can employ.
In some cases the OS may disable interrupts while handling an
interrupt. In some cases it may set a timer, and if the timer
expires and the device in question claims it is ready it is an
indication that an interrupt was missed, and the handler may be
invoked manually.

See, for instance, Chapter 10 of LDD3, 

http://www.oreilly.com/catalog/linuxdrive3/book/ch10.pdf

(Continue reading)

Picon

Looking for a source of fax/modems

Does anyone have a pointer to a supplier of hylafax-compatible fax/modems ? Any recommendations ?


    Thanks in advance


       Yaacov

Geoffrey S. Mendelson | 1 Dec 20:21 2005

Re: Looking for a source of fax/modems

On Thu, Dec 01, 2005 at 08:21:02PM +0200, Yaacov Fenster - System Engineering Troubleshooting and other
stuff wrote:
> Does anyone have a pointer to a supplier of hylafax-compatible 
> fax/modems ? Any recommendations ?

I can't help you, but I have made a point of taking any external data/fax 
modems that people were throwing out or giving away. For example a 28.8
data modem that is at least 10 years old lives on, connected to my
Linux system as an outgoing fax modem. 

Almost any fax/data modem will do, but if you can choose between them
take the one with 14.4 fax capapbility. 

How many do you need and do they need to be identical? I'm sure if you
ask around you can find plenty of them in junk bins.

Geoff.

--

-- 
Geoffrey S. Mendelson, Jerusalem, Israel gsm@...  N3OWJ/4X1GM
IL Voice: (07)-7424-1667  IL Fax: 972-2-648-1443 U.S. Voice: 1-215-821-1838 
You should have boycotted Google while you could, now Google supported
BPL is in action. Time is running out on worldwide radio communication.

=================================================================
To unsubscribe, send mail to linux-il-request@... with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@...

Eli Marmor | 1 Dec 20:45 2005
Picon

Re: Killing pump. Forever.

Tzahi Fadida wrote:

> ifup fires it.

You're right, of course.

Yedidyah Bar-David wrote:

> I don't know about Morphix, but Debian has /etc/network/interfaces for
> NIC configuration. Edit it if you want static addressing. E.g. change
>       auto eth0
>       iface eth0 inet dhcp
> to
>       auto eth0
>       iface eth0 inet static
>           address 10.0.0.1
>           network 10.0.0.0
>           netmask 255.255.255.0
>           broadcast 10.255.255.255
>           gateway 10.0.0.100

It was already "static" and not "dhcp", otherwise I wouldn't raise the
question here.

> or simply comment out 'auto eth0' if you do not want it started.

This is what I did for the meantime, and now I have to wait to see if
it helps (because "pump" is started once per a lot of time).

I can start to play with ifup, but I believe that waiting and see if it
repeats, is the best way to ensure that it fixed (though my feeling is
that it will not fix anything).

> I have no idea what tries to start it other than during boot. 
> If you do
> want to continue having it dhcp and only get annoyed by the process go
> on running (which is usually a good thing, unless you use static
> allocation in your dhcp server), grep for ifup.

As I wrote to Tzahi, you are right...
But I'll wait and see if the problem has gone, before hunting for ifup.

Thank both of you very much!
--

-- 
Eli Marmor
marmor@...
Netmask (El-Mar) Internet Technologies Ltd.
__________________________________________________________
Tel.:   +972-9-766-1020          8 Yad-Harutzim St.
Fax.:   +972-9-766-1314          P.O.B. 7004
Mobile: +972-50-5237338          Kfar-Saba 44641, Israel

=================================================================
To unsubscribe, send mail to linux-il-request@... with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@...

Amit Aronovitch | 2 Dec 17:08 2005
Picon

Re: outofthis mess soundadvice

for backup:

I think the best way would be on HD.
Do you have an empty partition big enough to contain your whole current distro?
Maybe a new hard-disk?

When I moved to amd64 distro I kept my old harddisk connected in a removable "drawer".
 I can still boot to it on emergency, but the best thing is I don't have to! I can just chroot into it and run the old apps anytime - they see the whole old system intact (I can even apt-get new stuff into it without ever interfering with my working new environment).
 This way you can make a fresh install (or dist-upgrade), then copy missing configs from the old system as needed (or even dpkg -i directly from your old apt cache)

About demudi: From here: http://demudi.agnula.org/wiki/DocumentsConcept I see that it's a merge of sid, etch and ubuntu hoary. When you said they advised stop using testing - what did they suggest instead: stable or unstable?
I can tell you that the current version of aptitude on sid has a built in *interactive* dependency problem resolver (you can page through a list of it's suggested operations, view and choose them). It also seems like the resolver algorithm improved much lately.
So maybe, just maybe, next time you run into dependency hell, you'll have an easier way out.

   good luck

Rafi Gordon | 3 Dec 09:17 2005
Picon

Re: Maximum number of interruprs a CPU can receive without dropping/losing any

Hello,
  Thanks for the answer.

> I suppose it is OS-, device-, and driver-dependent.

You don't mention the CPU here directly. I assume the CPU and it's clock speed
has also to do with the upper limit of interrupts from which on
interrupts will be dropped. Am I right ? From your answer it seems that the
device driver is the one (sloely?) which decides this upper limit on
the number of interrupts.

>if the handler eats all the cycles on handling
the interrupts then the consumers of the device (applications) won't
get the CPU. Therefore the OS may start dropping interrupts (and yes,
losing data) at some point.

A practical example which had driven me to post this question originally:
I want to know when I should use NAPI (polling) instead of interrupts
in a network
card so that I won't loss interrupts. (and data , as a result).

The rate of interrupts the nic receives depends of course on the number
of packets which are sent by the application.

So I assume that on machines with sow CPU the amount of maximum
interrupts the CPU can handle will be lower (linearly ?) than the 
amount of maximum interrupts th CPU  can handle on machines with
faster CPU.

Is there a way, except experimenting, in which I can get to know , for
different CPUs
(with different clockspeed)  ,when it is better to use NAPI (polling)
instead of interrupts?

-- RG

On 01 Dec 2005 13:42:23 +0000, Oleg Goldshmidt <pub@...> wrote:
> Rafi Gordon <rafigordon@...> writes:
>
> >       I assume that there is a limit on the maximum number of
> >       interruprs a CPU can receive without dropping or losing
> >       interrupts and not handling them.
> >
> >       Is there a way in which I can determine in Linux what is this
> >       limit (apart from bombing the CPU irq lines...) ?
> >
> >       Is this a hw detail which is constant regardless
> >       of which operating system runs on that processor ?
>
> I suppose it is OS-, device-, and driver-dependent. It is likely
> limited by the maximal rate at which the device driver is able to
> handle the interrupts: if the handler eats all the cycles on handling
> the interrupts then the consumers of the device (applications) won't
> get the CPU. Therefore the OS may start dropping interrupts (and yes,
> losing data) at some point.
>
> There is a variety of related mechanisms that an OS can employ.
> In some cases the OS may disable interrupts while handling an
> interrupt. In some cases it may set a timer, and if the timer
> expires and the device in question claims it is ready it is an
> indication that an interrupt was missed, and the handler may be
> invoked manually.
>
> See, for instance, Chapter 10 of LDD3,
>
> http://www.oreilly.com/catalog/linuxdrive3/book/ch10.pdf
>
> --
> Oleg Goldshmidt | pub@... | http://www.goldshmidt.org
>

=================================================================
To unsubscribe, send mail to linux-il-request@... with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@...

Shachar Shemesh | 3 Dec 10:03 2005

Re: Maximum number of interruprs a CPU can receive without dropping/losing any

Rafi Gordon wrote:

>Hello,
>  Thanks for the answer.
>
>  
>
>>I suppose it is OS-, device-, and driver-dependent.
>>    
>>
>
>You don't mention the CPU here directly.
>
Are you asking about the hardware or about the entire system? If you are
asking about the hardware, it is reasonable (I don't have any actual
knowledge) that each interrupt controller will only be able to hold so
many interrupts until it starts losing some. Read the docs on it for
details. You may find it sends a NMI before doing so.

> I assume the CPU and it's clock speed
>has also to do with the upper limit of interrupts from which on
>interrupts will be dropped.
>
OS, driver and CPU speed only have affect on the number of actual
interrupts the SYSTEM can handle. They affect the rate at which
interrupts are removed from the hardware queue, which affects the
overall rate at which interrupts can arrive.

Put another way, the amount of interrupts the interrupt controller can
cache affects the burst rate the system can handle, the driver OS and
CPU affect the sustained rate.

>A practical example which had driven me to post this question originally:
>I want to know when I should use NAPI (polling) instead of interrupts
>in a network
>card so that I won't loss interrupts. (and data , as a result).
>  
>
This is where I stop following you.

First, I think it should be noted that the entire machine load affects
the maximal rate of data sending interrutps the system can handle. Even
the lowest priority user space program will require CPU eventually in
order to clear the kernel's buffers. What you have is a heirchy, where
the further you get, the less senstive you are for precise performance,
but you are still affected. If the userspace process does not get the
CPU in order to clear the kernel's buffers, the kernel will have to
start dropping data sooner or later.

But more importantly - I know of no network protocol that assumes that
each and every packet sent is also received at the other side. Such an
assumption is NEVER correct. As such, I think what you are trying to
achieve here is an over-optimized solution. Bear in mind that any CPU
time you use for polling is not used by the user-space process that
clears your buffers. As a result, you may find that polling actually
produces worse data yield than losing interrupts would.

>Is there a way, except experimenting, in which I can get to know , for
>different CPUs
>(with different clockspeed)  ,when it is better to use NAPI (polling)
>instead of interrupts?
>  
>
If my answer above proves correct then yes, there is. Constants definition:
cs - cpu speed (in Mhz).
ib - number of interrupts the interrupt controller can buffer
km - size that the kernel can allocate for storing buffers (in MB)
ur - rate at which userspace can use up data (in MB/million cycles)
kc - number of cycles that it takes the kernel to handle each interrupt
uc - number of cycles that it takes the user space to handle each interrupt
poll - the poll efficiency factor. You should probably switch to polling
if this number is above 0.5 or 0.8:

And the actual formula is:
poll=0

>-- RG
>  
>
       Shachar

--

-- 
Shachar Shemesh
Lingnu Open Source Consulting ltd.
Have you backed up today's work? http://www.lingnu.com/backup.html

=================================================================
To unsubscribe, send mail to linux-il-request@... with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@...


Gmane