how to process data recvd from a device that wont give interrupts

devendra.aaru devendra.aaru at gmail.com
Fri Oct 5 00:54:15 EDT 2012


On Thu, Oct 4, 2012 at 1:50 PM, Mulyadi Santosa
<mulyadi.santosa at gmail.com> wrote:
> Hi...
>
> On Thu, Oct 4, 2012 at 7:03 PM, devendra.aaru <devendra.aaru at gmail.com> wrote:
>> Hi all,
>>
>> I found that you can use a kernel timer and poll for the hardware
>> interrupt registers whether the interrupt flag is set or not,
>>
>> but this will take atleast some good amount of CPU.
>
> yeah, thing is, as you know, timer fires interrupt and CPU will
> certainly have to service it. So, it's impossible to work around it
> IMHO
>
>> are there any ways other than using the kernel timer?
>
> perhaps something less intrusive like creating kernel thread and its
> function is solely checking register state?
>

yes, more or less similar to what the kernel timer does, :)

I think actually when i get the data , i am just copying it to my
local structures,

This job is done in the kernel timer itself, with this itself its
taking a 10% of cpu
which is actually too much.

let me try with softirqs, i am going to use tasklets, what do you think ? :)
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com



More information about the Kernelnewbies mailing list