Re: kernel threads.

Masoud Sharbiani (masouds@oeone.com)
Fri, 12 Apr 2002 13:45:05 -0400


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
Vahid Fereydunkolahi wrote:

>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 majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/