Binding Process/Process Group to CPU (Core) via Scheduler - Linux
This is a discussion on Binding Process/Process Group to CPU (Core) via Scheduler - Linux ; Hi All.
I read sometime (year or so) ago about a move to include in the 2.6 kernel
the option to have a system call that "binds a process or process group to
a particular CPU or CPU core" so ...
-
Binding Process/Process Group to CPU (Core) via Scheduler
Hi All.
I read sometime (year or so) ago about a move to include in the 2.6 kernel
the option to have a system call that "binds a process or process group to
a particular CPU or CPU core" so as to make the process ultra
effective/efficient as far as CPU cache & memory latency was concerned.
Has anything evolved from this discussion? If so what?
Is there any experimentation of same under the 2.6 release to allow such
functionality for GCC 4.2+ Option --fopenmp for OpenMP integration/usage?
Any and all comments appreciated.
Grahame.
-
Re: Binding Process/Process Group to CPU (Core) via Scheduler
G wrote in
news:48214683$0$31676$5a62ac22@per-qv1-newsreader-01.iinet.net.au:
> I read sometime (year or so) ago about a move to include in the 2.6
> kernel the option to have a system call that "binds a process or
> process group to a particular CPU or CPU core" so as to make the
> process ultra effective/efficient as far as CPU cache & memory latency
> was concerned.
>
> Has anything evolved from this discussion? If so what?
If the process group leader sets its affinity (via sched_setaffinity(2)),
all its descendant processes will inherit that affinity. I don't see that
there's anything additional required. (Or perhaps the discussion you saw
was from the time before this was implemented though that discussion would
have taken place far more than a year ago.)
GH
-
Re: Binding Process/Process Group to CPU (Core) via Scheduler
Gil Hamilton wrote:
> If the process group leader sets its affinity (via sched_setaffinity(2)),
> all its descendant processes will inherit that affinity. I don't see that
> there's anything additional required. (Or perhaps the discussion you saw
> was from the time before this was implemented though that discussion would
> have taken place far more than a year ago.)
This is a different mechanism than the one cpusets in cgroups (kernel
2.6.24) right? He could also use that one...
-
Re: Binding Process/Process Group to CPU (Core) via Scheduler
linuxnewbie1234 wrote in
news:48245a1f$0$87956$892e0abb@auth.newsreader.oct anews.com:
> Gil Hamilton wrote:
>> If the process group leader sets its affinity (via
>> sched_setaffinity(2)), all its descendant processes will inherit that
>> affinity. I don't see that there's anything additional required.
>> (Or perhaps the discussion you saw was from the time before this was
>> implemented though that discussion would have taken place far more
>> than a year ago.)
>
> This is a different mechanism than the one cpusets in cgroups (kernel
> 2.6.24) right? He could also use that one...
You're absolutely right. I was not aware of cgroups and cpusets. I just
skimmed the documentation from the 2.6.25 kernel and it looks like that's
exactly what the OP must have seen being discussed a "year or so" ago.
Thanks for the heads-up.
GH