lkml.org 
[lkml]   [2005]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: sched_setscheduler and pids/threads
From
Date
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


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

\
 
 \ /
  Last update: 2005-03-22 14:11    [W:0.169 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site