public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masoud Sharbiani <masouds@oeone.com>
To: Vahid Fereydunkolahi <fereydunk@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: kernel threads.
Date: Fri, 12 Apr 2002 13:45:05 -0400	[thread overview]
Message-ID: <3CB71D21.9080005@oeone.com> (raw)
In-Reply-To: <20020412170709.98207.qmail@web10002.mail.yahoo.com>

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/
>




  reply	other threads:[~2002-04-12 17:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-12 17:07 kernel threads Vahid Fereydunkolahi
2002-04-12 17:45 ` Masoud Sharbiani [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-03-08 16:38 Kernel threads Oleg Nesterov
2007-03-09  0:31 ` Roland McGrath
2007-03-09 20:52   ` Oleg Nesterov
2007-03-09 21:38     ` Roland McGrath
2007-03-09 23:46       ` Oleg Nesterov
2007-03-06 16:03 linux-os (Dick Johnson)
2007-03-08  9:00 ` Andrew Morton
2002-11-20  9:36 kernel threads Madhavi
2001-12-13  7:05 blesson paul
     [not found] <no.id>
2001-08-16 22:37 ` Alan Cox
2001-08-21 12:15   ` Christian Widmer
2001-08-16 22:23 Christian Widmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CB71D21.9080005@oeone.com \
    --to=masouds@oeone.com \
    --cc=fereydunk@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox