Thread (6 messages) 6 messages, 3 authors, 2012-10-05

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

From: devendra.aaru <hidden>
Date: 2012-10-05 09:46:40

On Fri, Oct 5, 2012 at 2:32 AM, Kshemendra KP [off-list ref] wrote:
Hi Devendra,

     In the kernel thread if you continuously in a loop read a register it
will increase
the CPU usage. After every register read if data is not ready call a
schedule() (or related
call). This may help to reduce CPU utilization
[please no top posting],

I Know, i didn't say i use copy_from(to)user in the softirqs. its
wrong, and you can use the copy to (from) user in a different context,
ie our fops callbacks.

coming to threads,

these are also one and the same as your timers,

and your threading is wrong, since there is only register read, should
be checking at every 10 - 20 msec,
so coming back to timers :) no?

anyways thanks for letting me know .
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help