shanecode / psutil

Automatically exported from code.google.com/p/psutil
Other
0 stars 0 forks source link

CPU affinity on many core windows #317

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run print(p.get_cpu_affinity()) on many core (>32) hardware.

What is the expected output?
cannot set/get process affinity above core 31

What do you see instead?

What version of psutil are you using? What Python version?
0.6.0

On what operating system? Is it 32bit or 64bit version?
Windows server 2008 R2 (64bit)

Please provide any additional information below.

I want change process affinity mask on 48 core server, but psutil doesn't 
support 64-bit affinity mask. It truncates affinity mask to 32-bit value, so I 
did some change. It works.

http://code.google.com/p/psutil/source/browse/trunk/psutil/_psutil_mswindows.c#1
974

from 

if (! PyArg_ParseTuple(args, "l", &pid)) {
    return NULL;
}

to 

if (! PyArg_ParseTuple(args, "LK", &pid)) {
    return NULL;
}

http://code.google.com/p/psutil/source/browse/trunk/psutil/_psutil_mswindows.c#2
002

from 

if (! PyArg_ParseTuple(args, "lk", &pid, &mask)) {
    return NULL;
}

to 

if (! PyArg_ParseTuple(args, "LK", &pid, &mask)) {
    return NULL;
}

Original issue reported on code.google.com by picky...@gmail.com on 16 Aug 2012 at 2:06

GoogleCodeExporter commented 9 years ago
I should have fixed this in r1560.
Once you have a chance to try it please confirm everything is ok as I haven't 
that many cores to actually test against.

Original comment by g.rodola on 13 Dec 2012 at 4:41

GoogleCodeExporter commented 9 years ago
Updated csets after the SVN -> Mercurial migration:
r2 == revision ???
r1560 == revision 039c1bc71093

Original comment by g.rodola on 2 Mar 2013 at 12:12

GoogleCodeExporter commented 9 years ago

Original comment by g.rodola on 8 Apr 2013 at 1:21

GoogleCodeExporter commented 9 years ago

Original comment by g.rodola on 11 Apr 2013 at 9:17

GoogleCodeExporter commented 9 years ago

Original comment by g.rodola on 12 Apr 2013 at 6:21