Skip to contentSkip to conversation

kernel threads.

DISCUSSION Vahid Fereydunkolahi 2 participants 2 messages Apr 12, 2002

lore
Share & tools
lore
#0 lore raw

Folks,
I have a problem using kernel_thread. The problem is when I use kernel threads I see a lot of context
switch.
I monitor the system activity using vmstat.

Regards,
--vahid

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

#1 lore raw

Hi,
Context switch happens when one of your running processes (or kernel threads) is running and then makes a request (like reading from a device and it has to wait for result). therefore scheduler selects another runnable process/kthread to run.
If you think you have a lot of context switches, you might want to redesign your thread so it blocks less (for example, make several requests for reading several blocks, all at the same time, and wait for first to complete where there is higher probability for the rest of blocks to be ready when you check for their readiness). regards,
Masoud

Quoted 18 lines · Vahid Fereydunkolahi

Folks,
I have a problem using kernel_thread. The problem is
when I use kernel threads I see a lot of context switch. I monitor the system activity using vmstat.

Regards,
--vahid

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
-
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/