Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

NUMA-aware AllocateCommonBuffer?

Alex_GrigAlex_Grig Member Posts: 3,238
I want to allocate per-processor data structures in the memory that belongs to their nodes. This memory needs to be accessible to the bus-master devices, so it has to be a common buffer. I could only find MmAllocateContiguousMemorySpecifyCacheNode function, but it won't give the PCIe-visible physical address. Are there any other means?

Comments

  • Don_Burn_1Don_Burn_1 Member Posts: 4,311
    MmGetPhysicalAddress will give you the address for PCIe.


    Don Burn (MVP, Windows DKD)
    Windows Filesystem and Driver Consulting
    Website: http://www.windrvr.com
    Blog: http://msmvps.com/blogs/WinDrvr




    > -----Original Message-----
    > From: xxxxx@broadcom.com [mailto:xxxxx@broadcom.com]
    > Posted At: Friday, June 11, 2010 7:35 PM
    > Posted To: ntdev
    > Conversation: NUMA-aware AllocateCommonBuffer?
    > Subject: NUMA-aware AllocateCommonBuffer?
    >
    > I want to allocate per-processor data structures in the memory that
    belongs to
    > their nodes. This memory needs to be accessible to the bus-master
    devices, so
    > it has to be a common buffer. I could only find
    > MmAllocateContiguousMemorySpecifyCacheNode function, but it won't give
    the
    > PCIe-visible physical address. Are there any other means?
    >
    >
    > __________ Information from ESET Smart Security, version of virus
    signature
    > database 5191 (20100611) __________
    >
    > The message was checked by ESET Smart Security.
    >
    > http://www.eset.com
    >
  • Alex_GrigAlex_Grig Member Posts: 3,238
    >MmGetPhysicalAddress will give you the address for PCIe.

    Only assuming that Microsoft guarantees that processor-visible and device-visible addresses always match. So far, such guarantee was never given, even though it holds true for now.
  • Alex_GrigAlex_Grig Member Posts: 3,238
    I think the solution could be to use KeSetSystemGroupAffinityThread to switch the current thread to different nodes, and call AllocateCommonBuffer from that context.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Developing Minifilters 29 July 2019 OSR Seminar Space
Writing WDF Drivers 23 Sept 2019 OSR Seminar Space
Kernel Debugging 21 Oct 2019 OSR Seminar Space
Internals & Software Drivers 18 Nov 2019 Dulles, VA