public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] RDMA/mlx5: Release CPU for other processes in mlx5_free_cmd_msg()
@ 2024-05-22  3:32 Anand Khoje
  2024-05-22  3:32 ` [PATCH 1/1] " Anand Khoje
  0 siblings, 1 reply; 7+ messages in thread
From: Anand Khoje @ 2024-05-22  3:32 UTC (permalink / raw)
  To: linux-rdma, linux-kernel
  Cc: anand.a.khoje, rama.nichanamatlu, manjunath.b.patil

FW pages are allocated and reclaimed through a worker pages_handler().  This
worker allocates mlx5 mailbox messages to populate meta-data associated with the
pages being allocated or reclaimed.  During reclaim of pages, after getting the
meta-data of the pages to reclaim and releasing the pages, the dma pool
associated with the mailbox message is freed using dma_pool_free(), where it
tried to find the dma_page of this dma_pool by walking the page_list.  This is a
slow approach and if the number of pages reclaimed is high, it takes a lot of
time in execution of one work.  As a result, other critical processes are
starved of CPU.

This patch checks if time spent in mlx5_free_cmd_msg() is more than 2 msec, it
yields the CPU for other processes to use.

In our tests, we were able to allocate around 3.4 million FW pages and tried to
deallocate all of them at once, this resulted in the worker thread to yield the
CPU many times.

May 21 04:39:28 kernel: mlx5_core 0000:17:00.0:
mlx5_free_cmd_msg:1352:(pid 327407): Spent more than 2 msecs, yielding CPU
May 21 04:39:28 kernel: mlx5_core 0000:17:00.0:
mlx5_free_cmd_msg:1352:(pid 327407): Spent more than 2 msecs, yielding CPU
May 21 04:39:29 kernel: mlx5_core 0000:17:00.0:
mlx5_free_cmd_msg:1352:(pid 327407): Spent more than 2 msecs, yielding CPU
May 21 04:39:29 kernel: mlx5_core 0000:17:00.0:
mlx5_free_cmd_msg:1352:(pid 327407): Spent more than 2 msecs, yielding CPU


Anand Khoje (1): RDMA/mlx5: Release CPU for other processes in
mlx5_free_cmd_msg()

 drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 7 +++++++ 1 file changed, 7
insertions(+)

-- 1.8.3.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-05-31 10:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-22  3:32 [PATCH 0/1] RDMA/mlx5: Release CPU for other processes in mlx5_free_cmd_msg() Anand Khoje
2024-05-22  3:32 ` [PATCH 1/1] " Anand Khoje
2024-05-26 15:23   ` Shay Drori
2024-05-29 12:01     ` Anand Khoje
2024-05-30 17:14   ` Leon Romanovsky
2024-05-31  4:51     ` Anand Khoje
2024-05-31 10:00       ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox