none
PROC_THREAD_ATTRIBUTE_PREFERRED_NODE does not work as expected RRS feed

  • Question

  • Recently I've been encountering problems with processor groups where a process is constrained to a single processor group.

    I would like to solve this by starting multiple processes and explicitly assigning them to processor groups.

    Since we start our processes via a 'watchdog' process, I thought that this could be done by specifying PROC_THREAD_ATTRIBUTE_PREFERRED_NODE in STARTUPINFOEX when we call CreateProcess(), but while this seems to work on some systems, on others I'm finding that the process is always started on group zero.

    Is this a bug? This whitepaper suggests that this should cause the process to be assigned to the group of the 'preferred' numa node so it seems like a bug: 

    "This attribute specifies a preferred NUMA node for the new process and causes Windows to assign the new process to the group that contains the specified node, assuming that it is a valid node and contains processors."

    (the whitepaper is "Supporting Systems That Have More Than 64 Processors", I can't link to it)

    There are some workarounds to this by using NtSetInformationProcess() or SetThreadGroupAffinity() but both have drawbacks and curiously there is no SetProcessGroupAffinity() function. It would be really nice if we could reliably start the processes on the desired processor group.

    Thursday, January 9, 2020 11:08 AM

All replies

  • This seems like a bug in the ACPI processor topology table (PPTT) on those systems. I'd contact the vendor

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    Friday, January 10, 2020 8:43 PM
    Moderator