All of lore.kernel.org
 help / color / mirror / Atom feed
* interrupt handler
@ 2002-08-23 11:58 sanket rathi
  2002-08-23 12:17 ` Richard B. Johnson
  0 siblings, 1 reply; 20+ messages in thread
From: sanket rathi @ 2002-08-23 11:58 UTC (permalink / raw)
  To: linux-kernel

hi,
Can i use spin lock in the interrupt handler for a singlre processor machine. because books says u can not use locks but spin lock is some thing diffrent 

thanks in advance

--Sanket
---------
-- 
Get your free email from www.linuxmail.org 


Powered by Outblaze

^ permalink raw reply	[flat|nested] 20+ messages in thread
* Interrupt handler
@ 2004-04-15 10:02 MNH
  2004-04-17 18:57 ` Karim Yaghmour
  0 siblings, 1 reply; 20+ messages in thread
From: MNH @ 2004-04-15 10:02 UTC (permalink / raw)
  To: Linux-Kernel

hi,

I have a general question.

If a process is executing a system call, and an interrupt is invoked,
the process blocks. Now since interrupt handlers cannot block, the time
for which the IH runs is taken out of the process's time-slice ( Is this
right ?).

What if the IH takes up all of the process's time-slice, does the
process gets knocked off the current list and thrown into the expired
list or is there something more to it?

thanks for your time


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Sound-card question: HELP
@ 2003-03-17  4:47 William W. Austin
  2003-03-17  9:17 ` Interrupt handler Giuliano Pochini
  0 siblings, 1 reply; 20+ messages in thread
From: William W. Austin @ 2003-03-17  4:47 UTC (permalink / raw)
  To: alsa-devel

(Apologies if you see this twice: I also posted a very similar query to the
alsa-user list, earlier tonight.)

I have been using alsa for some time (I'm at the 0.9.1-fr1 level now), and I
have a problem, and to solve that I will probably have to get a new sound card.

I have an sb live! 2.1 card, and had not had any difficult problems until about
a month ago when I got a new machine.  On previous machine (same card) I had
been able to load some very large sound font files into the card with sfxload
(we are talking 125+ Mb of files here) and everthing worked without a whimper.

My wife composes, and the ability to load the above sound fonts is _extremely_
important.

However, due to some upcoming work schedule changes (which were the reason for
the new machine), I will be working very late for several months.  Normally I
play music (MP3's, cd's) when working, but soundproofing is a problem here and I
will have switch to headphones part of the time.  (But only part: I've been
using 4 speakers + subwoofer for a while, and would still like to maintain this
ability with whatever solution I choose.)

I had thought of perhaps getting an Audigy platinum (with the easy headphone
access) but ONLY IF it supports soundfont loading/usage better than the SBlive! 
does  (and I already know it supports the 4 speakers + subwoofer setup).

HOWEVER in reading both the devel and user lists, and in searching through the
archives, I have not been able to tell whether the audigy handles the loading of
large soundfonts any better than the live! does.  (On previous machine, the
fonts loaded correctly; on the new one, after 8-9 MB of files are loaded, I get
the ENOSPC (No space left on device)" message and loading terminates.  However,
on on single occasion for reasons unknown the files loaded correctly -- all 125+
Mb of them.  I still don't understand...).

So my question is, does the Audigy do a better job of handling the loading of
soundfonts, or is it likely to have the same problem?  Failing that, what other
cards offer the capabilities I have mentioned above (large soundfont handling,
front/rear channels, headphone capabilities, not extremely expensive)?

I am running redhat 8.0, kernel-2.4.18-26.8.0 with an Athlon xp2100+ & 1GB of
pc2700 memory; MB is a gigabyte GA-7VAX (the integrated sound on the MB is
disabled). 

ANY help on answering the above questions would be _greatly_ appreciated (feel
free to write me off-list if you'd prefer).

Thanks in advance

-- 
William W. Austin 			bill@34.mumb.atln.nrcrgais.dsl.att.net
       "Life is just a phase I'm going through... this time, anyway..."


-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en

^ permalink raw reply	[flat|nested] 20+ messages in thread
* Interrupt handler
@ 2003-03-15 21:38 Giuliano Pochini
  0 siblings, 0 replies; 20+ messages in thread
From: Giuliano Pochini @ 2003-03-15 21:38 UTC (permalink / raw)
  To: alsa-devel


When an interrupt arrives and I call snd_pcm_period_elapsed(), what
function gets from alsa middle layer the new block to play and sets up
the hardware ?

Bye.




-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en

^ permalink raw reply	[flat|nested] 20+ messages in thread
* Re: interrupt handler
@ 2002-08-23  6:22 Kerenyi Gabor
  0 siblings, 0 replies; 20+ messages in thread
From: Kerenyi Gabor @ 2002-08-23  6:22 UTC (permalink / raw)
  To: root; +Cc: sanket rathi, linux-kernel

8/23/2002 10:07:54 PM, "Richard B. Johnson" <root@chaos.analogic.com> wrote:

>On Fri, 23 Aug 2002, Kerenyi Gabor wrote:
>> Anyway, do anybody know what kind of advantages/disadvantages I can get
>> if I don't disable interrupts at all in my driver? Even if I have to
>> use a circular
>> buffer or anything else? Is it worth trying to find such a solution or is it
>> a wasted time?
>> 
>> Gabor
>
>If your ISR manipulates any data, which is quite likely, then
>your driver code, that is outside the ISR, must be written
>with the knowledge that an interrupt can happen at any time.

Well I wrote it in this way of course.

>There are probably certain critical regions of code that must
>be protected against modification from the ISR code. You need
>to protect those critical regions with spin-locks.

I know. But there are some technics that can be used to workaorund
the irq disabling thing.

>Spin-locks have very little code. If there is no contention,
>they do not affect performance in any measurable way. If there
>is contention, they simply delay execution of the ISR to a time
>where code is executing in a non-critical section. This delay
>is necessary so, even though it does affect performance, the
>system would not work without it.

I talked about irq disabling, not spinlocks. With or without spinlocks.
When you need synch between a bottom half(or user context) and irq
handler on single processor machine you can't use just spinlocks. you have to
disable the irq. so the question is about irq disabling to modify data
in a mutual way.
I solved it without disabling irq using a circular buffer (very simple one)
I think with this solution there is a better response time for the hardware
items. (they can get immediate response from the OS)

Gabor



^ permalink raw reply	[flat|nested] 20+ messages in thread
* Re: interrupt handler
@ 2002-08-23  5:45 Kerenyi Gabor
  2002-08-23 13:07 ` Richard B. Johnson
  0 siblings, 1 reply; 20+ messages in thread
From: Kerenyi Gabor @ 2002-08-23  5:45 UTC (permalink / raw)
  To: root, sanket rathi; +Cc: linux-kernel

8/23/2002 9:17:07 PM, "Richard B. Johnson" <root@chaos.analogic.com> wrote:

>On Fri, 23 Aug 2002, sanket rathi wrote:
>
>> hi,
>> Can i use spin lock in the interrupt handler for a singlre processor
>> machine. because books says u can not use locks but spin lock is some
>> thing diffrent 
>> 
>> thanks in advance
>> 
>> --Sanket
>> ---------
>
>Interrupts default to OFF within an interrupt handler. Given this,
>why would you use a spin-lock within the ISR on a single-processor
>machine?

Because he would like to write a code that can be run on a computer
with more than one CPU. 

Anyway, do anybody know what kind of advantages/disadvantages I can get
if I don't disable interrupts at all in my driver? Even if I have to use a circular
buffer or anything else? Is it worth trying to find such a solution or is it
a wasted time?

Gabor



^ permalink raw reply	[flat|nested] 20+ messages in thread
* Re: interrupt handler
@ 2002-08-23  4:58 Kerenyi Gabor
  0 siblings, 0 replies; 20+ messages in thread
From: Kerenyi Gabor @ 2002-08-23  4:58 UTC (permalink / raw)
  To: sanket rathi, linux-kernel

8/23/2002 8:58:20 PM, "sanket rathi" <sanket@linuxmail.org> wrote:

>hi,
>Can i use spin lock in the interrupt handler for a singlre processor machine. because books says u can not use locks 
>but spin lock is some thing diffrent 

Yes you can. Spinlocks will be compiled in if you choose SMP even on single processor machine.
But look at the documentation in the kernel source.
I think "lock" in your message is a semaphore in real life.

Spinlocks never sleep - they don't perform task switch and you can use them anywhere, while semaphores
can sleep and you can use them only in user context (not in interrupt or bottom half)

Gabor



^ permalink raw reply	[flat|nested] 20+ messages in thread
* Interrupt Handler
@ 2002-08-21 14:25 sanket rathi
  0 siblings, 0 replies; 20+ messages in thread
From: sanket rathi @ 2002-08-21 14:25 UTC (permalink / raw)
  To: linux-kernel

Hi,
I am writing a device driver for a pci card i know that whenever u r writing a interrupt handler there are some restrictions. like u cannot acquire a lock, u can't sleep but i want to know, is there some restriction like i can't use buffers which i have allocated through vmalloc. actually i allocated some structure through vmalloc in init_module() and referencing them in interrupt handler will that create some problem.

Thanks in advance

----Sanket
-------------
-- 
Get your free email from www.linuxmail.org 


Powered by Outblaze

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

end of thread, other threads:[~2004-04-17 18:51 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-23 11:58 interrupt handler sanket rathi
2002-08-23 12:17 ` Richard B. Johnson
2002-08-23 16:17   ` Robert Love
2002-08-23 16:45     ` Richard B. Johnson
2002-08-23 16:52       ` Robert Love
2002-08-23 20:45         ` george anzinger
  -- strict thread matches above, loose matches on Subject: below --
2004-04-15 10:02 Interrupt handler MNH
2004-04-17 18:57 ` Karim Yaghmour
2003-03-17  4:47 Sound-card question: HELP William W. Austin
2003-03-17  9:17 ` Interrupt handler Giuliano Pochini
2003-03-17 12:49   ` Takashi Iwai
2003-03-17 14:22     ` Giuliano Pochini
2003-03-18 13:32       ` Takashi Iwai
2003-03-19  1:15         ` Giuliano Pochini
2003-03-19  9:38           ` Giuliano Pochini
2003-03-15 21:38 Giuliano Pochini
2002-08-23  6:22 interrupt handler Kerenyi Gabor
2002-08-23  5:45 Kerenyi Gabor
2002-08-23 13:07 ` Richard B. Johnson
2002-08-23  4:58 Kerenyi Gabor
2002-08-21 14:25 Interrupt Handler sanket rathi

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.