public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sched_setscheduler and pids/threads
@ 2005-03-10  4:12 Dave Airlie
  2005-03-10  4:33 ` Robert Love
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Airlie @ 2005-03-10  4:12 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Hi all,

I'm a bit confused over 2.6 threading with respects to real time
scheduling settings...

In 2.6 all my threads appear as a single PID, if I use chrt -p <pid>
will it set the scheduling priority for my main thread or for all
threads in the application?

Can I used the thread IDs from /proc/<pid>/task/ to chrt the other
threads in my app to different priorities?

Thanks,
Dave.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: sched_setscheduler and pids/threads
  2005-03-10  4:12 sched_setscheduler and pids/threads Dave Airlie
@ 2005-03-10  4:33 ` Robert Love
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Love @ 2005-03-10  4:33 UTC (permalink / raw)
  To: Dave Airlie; +Cc: Linux Kernel Mailing List

On Thu, 2005-03-10 at 15:12 +1100, Dave Airlie wrote:

> In 2.6 all my threads appear as a single PID,if I use chrt -p <pid>
> will it set the scheduling priority for my main thread or for all
> threads in the application?

For just the main thread (or the thread of whatever PID you give).  You
need to set the PID of each thread individually.  The "everything
appears as a single PID" is just an elaborate parlor trick.  Wool pulled
over your eyes.

> Can I used the thread IDs from /proc/<pid>/task/ to chrt the other
> threads in my app to different priorities?

You can use the PID's in /proc/<pid>/task/, yes.

Or you can just set the PID of the main thread before it starts other
threads, or use chrt to launch the program, or use chrt to set the PID
of a shell script that starts the application:  Scheduler properties are
inherited.

Best,

	Robert Love



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-10  4:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-10  4:12 sched_setscheduler and pids/threads Dave Airlie
2005-03-10  4:33 ` Robert Love

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox