linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Williams <steve@icarus.com>
To: linuxppc-embedded@ozlabs.org
Subject: Embedded Linux, pthreads and scheduling
Date: Thu, 30 Sep 2004 10:39:40 -0700	[thread overview]
Message-ID: <415C44DC.8090508@icarus.com> (raw)


[This is probably not unique to ppc linux, but it is imbedded
and I am running linux on an embedded pc in this case...]

I have a multi-threaded (pthreads) application running on an
embedded PPC. One of the threads operates a scanner video input,
and I want to give it (and only it) high priority, so that if
a device driver wakes it up, it is scheduled as close to "now"
as possible.

I code the thread in question to capp pthread_setschedparam
to set its policy to SCHED_FIFO and the priority to some
number >0. I'm using glibc-ppc_4xx-2.3.1 as packaged in the
Denx ELDK-3.0. Can I expect this to work? Is any priority >0
enough to get it priority over other threads, or do I need
to give it a high (i.e. 99) priority to get past the sliding
priorities of threads with default scheduling?

For the particular case I'm seeing, it seems to *not* have
any effect. My interrupt handler is activated (I see on the
scope) and in the first few cases the response is immediate,
but sometimes the response is delayed significantly. Where
I look for the problem may depend on whether the collective
understanding is that the SCHED_FIFO has the effect I expect.

-- 
Steve Williams                "The woods are lovely, dark and deep.
steve at icarus.com           But I have promises to keep,
http://www.icarus.com         and lines to code before I sleep,
http://www.picturel.com       And lines to code before I sleep."

             reply	other threads:[~2004-09-30 18:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-30 17:39 Stephen Williams [this message]
2004-10-01  6:47 ` Embedded Linux, pthreads and scheduling Jaap-Jan Boor
2004-10-01 15:39   ` Stephen Williams

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=415C44DC.8090508@icarus.com \
    --to=steve@icarus.com \
    --cc=linuxppc-embedded@ozlabs.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;
as well as URLs for NNTP newsgroup(s).