[torquedev] processor affinity
Sergio Gelato
Sergio.Gelato at astro.su.se
Sat Jun 2 14:49:20 MDT 2007
* Menshutin Anton [2007-06-02 17:02:12 +0400]:
> I found that there is no processor affinity in torque. Jobs assigned to run
> on some cpu's selected by scheduler, could also run on other cpus on this
> node.
Really? I see in the trunk's src/resmom/start_exec.c a few
#elif defined(PENABLE_LINUX26_CPUSETS)
which make me think that something related to what you are looking for
is already implemented.
> This property is inherited by child process. It is obvious that setting it
> after fork() and before exec() will be enough. The only thing I don't know -
> where can I get info about cpus assigned to me by scheduler.
The code already uses
pattr = &pjob->ji_wattr[(int)JOB_ATR_resource];
prd = find_resc_def(svr_resc_def,"ncpus",svr_resc_size);
presc = find_resc_entry(pattr,prd);
to find the value of the job resource "ncpus".
> Qstat shows this info in exec_host attribute, and I suppose I can get this
> string, parse it, find out localhostname and get CPUs numbers. But may be
> there is a better way for getting this info?
>
> I'm asking for help from torque-dev mailing list :) Given an advice, I could
> try to implement and test it myself or may be anybody could send me a patch?
More information about the torquedev
mailing list