Hi Marina, 

In that case you should be good. If you think the os is not mmap-ing memory on 
the right numa, maybe try clib_mem_set_numa_affinity/set_mempolicy. 

Also note that “show memory” shows memory allocated through clib_mem_* 
functions but, as you’ve noticed, pool_init_fixed directly calls mmap. 

Regards,
Florin

> On Jun 2, 2021, at 12:54 PM, marina.vasilev...@insidepacket.com wrote:
> 
> Hi Florin,
> I am using VLIB_WORKER_INIT_FUNCTION
> But pool_init_fixed function calls mmap
> How can I force mmap to allocate the memory on the curtent Numa node?
> And when I call show memry, show threads I get this:
> 
> 
> vpp# show threads 
> 
> ID     Name                Type        LWP     Sched Policy (Priority)  lcore 
>  Core   Socket State     
> 
> 0      vpp_main                        6862    other (0)                1     
>  0      1
> 
> 1      vpp_wk_0            workers     6876    other (0)                2     
>  1      0
> 
> 2      vpp_wk_1            workers     6877    other (0)                3     
>  1      1
> 
> vpp# 
> 
> vpp# 
> 
> vpp# show memory main-heap 
> 
> Thread 0 vpp_main
> 
>   virtual memory start 0x7ff3f66fc000, size 50331712k, 12582928 pages, page 
> size 4k
> 
>     numa 1: 69601 pages, 278404k
> 
>     not mapped: 12513327 pages, 50053308k
> 
>   total: 48.00G, used: 127.28M, free: 47.88G, trimmable: 47.88G
> 
>
> Thread 1 vpp_wk_0
> 
>   virtual memory start 0x7ff3f66fc000, size 50331712k, 12582928 pages, page 
> size 4k
> 
>     numa 1: 69601 pages, 278404k
> 
>     not mapped: 12513327 pages, 50053308k
> 
>   total: 48.00G, used: 127.28M, free: 47.88G, trimmable: 47.88G
> 
>
> Thread 2 vpp_wk_1
> 
>   virtual memory start 0x7ff3f66fc000, size 50331712k, 12582928 pages, page 
> size 4k
> 
>     numa 1: 69601 pages, 278404k
> 
>     not mapped: 12513327 pages, 50053308k
> 
>   total: 48.00G, used: 127.28M, free: 47.88G, trimmable: 47.88G
> 
> vpp# 
> 
>
> 
> Regards,
> Marina
> 
>
>
>
>
>
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19523): https://lists.fd.io/g/vpp-dev/message/19523
Mute This Topic: https://lists.fd.io/mt/83265237/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to