Re: Excessive memory usage when infiniband config is enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



在 2024/5/7 15:32, Konstantin Taranov 写道:
Hello Leon,

I feel that it's a bug because I don't understand why is this module/option
allocating 6GB of RAM without any explicit configuration or usage from us.
It's also worth mentioning that we are using the default linux-image from
Debian bookworm, and it took us a long time to understand the reason
behind this memory increase by bisecting the kernel's config file.
Moreover the documentation of the module doesn't mention anything
regarding additional memory usage, we're talking about an increase of 6Gb
which is huge since we're not using the option.
So is that an expected behavior, to have this much increase in the memory
consumption, when activating the RDMA option even if we're not using it ? If
that's the case, perhaps it would be good to mention this in the
documentation.

Thank you


Hi Brian,

I do not think it is a bug. The high memory usage seems to come from these lines:
	rsrc_size = irdma_calc_mem_rsrc_size(rf);
	rf->mem_rsrc = vzalloc(rsrc_size);

Exactly. The memory usage is related with the number of QP.
When on irdma, the Queue Pairs is 4092, Completion Queues is 8189, the memory usage is about 4194302.

The command "modprobe irdma limits_sel" will change QP numbers.
0 means minimum, up to 124 QPs.

Please use the command "modprobe irdma limits_sel=0" to make tests.
Please let us know the test results.

Zhu Yanjun


inside of irdma_initialize_hw_rsrc function. You can read the code of
irdma_calc_mem_rsrc_size to understand the 6GB memory usage.

You can ask developers of irdma to optimize memory usage.
Btw., module is loaded == module is used. There is no "loaded and unused".

Konstantin





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux