[dpdk-dev] [PATCH v9 00/12] Windows basic memory management

Thomas Monjalon thomas at monjalon.net
Mon Jun 15 19:34:37 CEST 2020


15/06/2020 02:43, Dmitry Kozlyuk:
> Note for v9:
> rte_eal_memory.h renamed, dependent patchsets have to be updated.
> 
> This patchset implements basic MM with the following features:
> 
> * Hugepages are dynamically allocated in user-mode.
> * Only 2MB hugepages are supported.
> * IOVA is always PA, obtained through kernel-mode driver.
> * No 32-bit support (presumably not demanded).
> * Ni multi-process support (it is forcefully disabled).
> * No-huge mode for testing without IOVA is available.
> 
> Testing revealed Windows Server 2019 does not allow allocating hugepage
> memory at a reserved address, despite advertised API.  So allocator has
> to temporary free the region to be allocated.  This creates in inherent
> race condition. This issue is being discussed with Microsoft privately.
> 
> New EAL public functions for memory mapping are introduced to mitigate
> OS differences in DPDK libraries and applications: rte_mem_map,
> rte_mem_unmap, rte_mem_lock, rte_mem_page_size.
> 
> To support common MM routines, internal wrappers for low-level memory
> reservation and file management are introduced. These changes affect
> Linux and FreeBSD EAL. Shared code is placed unded /unix/ subdirectory
> (suggested by Thomas).
> 
> To avoid code duplication between Linux and Windows EAL, common code
> for EALs supporting dynamic memory allocation is extracted
> (discussed with Anatoly Burakov in v4 thread). This is a separate
> patch to ease the review, but it can be merged with the previous one.
> 
> EAL tracepoints save size_t values as long, which is invalid on Windows.
> New size_t emitter for tracepoints is introduced (suggested by Jerin
> Jacob to Fady Bader, see [1]). Also, to avoid workaround in every file
> using the tracepoints, stubs are added to Windows EAL.
> 
> Entire <sys/queue.h> is imported from FreeBSD, replacing existing
> partial import. There is already a license exception for this file.
> The file is imported as-is, so it causes a bunch of checkpatch warnings.
> 
> [1]: http://mails.dpdk.org/archives/dev/2020-May/168076.html
[...]
> Dmitry Kozlyuk (12):
>   eal: replace rte_page_sizes with a set of constants
>   eal: introduce internal wrappers for file operations
>   eal: introduce memory management wrappers
>   eal/mem: extract common code for memseg list initialization
>   eal/mem: extract common code for dynamic memory allocation
>   trace: add size_t field emitter
>   eal/windows: add tracing support stubs
>   eal/windows: replace sys/queue.h with a complete one from FreeBSD
>   eal/windows: improve CPU and NUMA node detection
>   doc/windows: split build and run instructions
>   eal/windows: initialize hugepage info
>   eal/windows: implement basic memory management

Applied, thanks for the huge work!




More information about the dev mailing list