Commit 9a9fa2f0 authored by Chengchang Tang's avatar Chengchang Tang Committed by Zheng Zengkai
Browse files

RDMA/hns: Fix level-0 addressing for huge page

driver inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5Y79T



-------------------------------------------------------------------

Currently, when creating a MR, there is a certain probability of
causing a hardware exception when addressing at level 0 with a huge
page. This is because the PA address is now aligned to 4K instead of
the actual page size set by the driver.

When the MTR of multiple regions is addressed at level 0 with a huge
page, multiple regions will share the same huge page. This huge page
will be divided into multiple 4K pages, and these pages will be
allocated to different regions. At this point, all the regions of this
MTR only require 4k alignment instead of the actual pagesize. This can
help reduce memory consumption.

But when there is only one region, the MTR with level-0 addressing can
directly use this huge page. At this point the hardware needs this page
to be aligned to the actual page size, not 4K.

This patch set page size to 4k only when the MTR with level 0 addressing
has mutliple regions.

Fixes: 0e0ab04b ("RDMA/hns: Refactor the MTR creation flow")
Signed-off-by: default avatarChengchang Tang <tangchengchang@huawei.com>
Reviewed-by: default avatarYangyang Li <liyangyang20@huawei.com>
Reviewed-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent cf2f2029
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment