Skip to content
  • David Hildenbrand's avatar
    e6816458
    hostmem: Allow for specifying a ThreadContext for preallocation · e6816458
    David Hildenbrand authored
    
    
    Let's allow for specifying a thread context via the "prealloc-context"
    property. When set, preallcoation threads will be crated via the
    thread context -- inheriting the same CPU affinity as the thread
    context.
    
    Pinning preallcoation threads to CPUs can heavily increase performance
    in NUMA setups, because, preallocation from a CPU close to the target
    NUMA node(s) is faster then preallocation from a CPU further remote,
    simply because of memory bandwidth for initializing memory with zeroes.
    This is especially relevant for very large VMs backed by huge/gigantic
    pages, whereby preallocation is mandatory.
    
    Reviewed-by: default avatarMichal Privoznik <mprivozn@redhat.com>
    Message-Id: <20221014134720.168738-7-david@redhat.com>
    Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
    e6816458
    hostmem: Allow for specifying a ThreadContext for preallocation
    David Hildenbrand authored
    
    
    Let's allow for specifying a thread context via the "prealloc-context"
    property. When set, preallcoation threads will be crated via the
    thread context -- inheriting the same CPU affinity as the thread
    context.
    
    Pinning preallcoation threads to CPUs can heavily increase performance
    in NUMA setups, because, preallocation from a CPU close to the target
    NUMA node(s) is faster then preallocation from a CPU further remote,
    simply because of memory bandwidth for initializing memory with zeroes.
    This is especially relevant for very large VMs backed by huge/gigantic
    pages, whereby preallocation is mandatory.
    
    Reviewed-by: default avatarMichal Privoznik <mprivozn@redhat.com>
    Message-Id: <20221014134720.168738-7-david@redhat.com>
    Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
Loading