public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian McGrew <brian@visionpro.com>
To: <linux-kernel@vger.kernel.org>
Subject: Two questions about scheduling and threading.
Date: Thu, 08 May 2008 08:15:43 -0700	[thread overview]
Message-ID: <C448672F.1E24B%brian@visionpro.com> (raw)
In-Reply-To: <C4485A81.1E1EF%brian@visionpro.com>

We're using the 2.6.16.16 kernel in an almost real time, multi processor and
multi threaded environment.

When I start my system for the first time, I start one thread for each
processor/core in the machine (is this the correct thing to do)?  These
threads set a busy flag, go to work and then go to sleep.  I put everything
to sleep as opposed to killing the threads because it saves me on average of
about 400ms each time around.

My problem is, and, it is very reproducable, that if CPU0 is at 100%, none
of my threads see the wakeup!  It doesn't matter what the other CPU's are
doing, if they're all at 0 or 100%, but if CPU0 is 100, I'm toast.  Is there
anyway around this?

Also, I know that we're supposed to sit back and let the scheduler do all
the work for us; but, in the 2.6.16.16 kernel, is there a way to assign a
specific thread and/or process to a designated processor???  I really need
to be able to do this because even with the preemptive scheduling, I'm still
real-time and it's not quite real-time enough!

Thanks!

-brian


       reply	other threads:[~2008-05-08 15:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <C4485A81.1E1EF%brian@visionpro.com>
2008-05-08 15:15 ` Brian McGrew [this message]
2008-05-08 15:47   ` Two questions about scheduling and threading Dan Noe
2008-05-08 19:44   ` David Schwartz

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=C448672F.1E24B%brian@visionpro.com \
    --to=brian@visionpro.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