]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
RDMA/mlx5: Add handling for memory scheme page fault events
authorMichael Guralnik <michaelgur@nvidia.com>
Mon, 9 Sep 2024 10:05:02 +0000 (13:05 +0300)
committerLeon Romanovsky <leon@kernel.org>
Wed, 11 Sep 2024 11:56:29 +0000 (14:56 +0300)
commite4fda2320f8e6bfc74f01770eb95a31cb327cc09
tree764f8737771146ab5aec2889d5d35d082b46454e
parent7f91510af938b4b308a3d716fd3dbc1b3614ca6d
RDMA/mlx5: Add handling for memory scheme page fault events

The memory scheme page fault event is a new approch in handling page fault
on mkeys using the on-demand-paging feature.
The major shift in handling the page fault in this scheme is that the HW
is taking responsibilty for parsing the faulted mkey instead of the
previous approach where the driver would read and parse the wqes and
query the mkeys to get to the direct mkey that we need to handle.

Therefore, the event we get from FW in this scheme will contain the
direct mkey and address we need to handle and require much less work
from driver.

Additionally, to optimize performance, the FW can generate the event on
a memory area that is larger than the faulted memory operation is
requiring, to 'prefetch' memory that is around it and will likely be
used soon.

Unlike previous types of page fault, the memory page scheme fault does
not always require a resume command after handling the page fault as the FW
can post multiple events on same mkey and will set the 'last' flag only on
the page fault that requires the resume command.

Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
Link: https://patch.msgid.link/20240909100504.29797-7-michaelgur@nvidia.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/mlx5/odp.c