Hello,
This is the kernel thread in a module. It gets awakened
to do some work as a result of an interrupt. It does
the right thing and works.
But.... `ps` never shows it using ANY cpu time! I know
that the procedure, read_fifo() takes about 600,000 cpu
clocks, measured with rdtsc, so I would expect that
that time would be visible. Does anybody know how to
make the time that a kernel thread uses, become visible
to `ps` ???
static int32_t local_thread(void *unused)
{
DAEMONIZE; // In config.h
SET_PRIORITY(-19); // In config.h
memcpy(current->comm, task_name, sizeof(task_name));
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(0); // Let insmod complete
__asm__ __volatile__("thread:\n.global thread\n");
for(;;)
{
set_current_state(TASK_INTERRUPTIBLE);
if(signal_pending(current))
complete_and_exit(&info->quit, 0);
interruptible_sleep_on(&info->twait);
set_current_state(TASK_RUNNING);
read_fifo();
}
return 0; // Just quiet the compiler
}
Cheers,
Dick Johnson
Penguin : Linux version 2.6.13 on an i686 machine (5589.55 BogoMips).
Warning : 98.36% of all statistics are fiction.
****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.
Thank you.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|