]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
vduse: Use fixed 4KB bounce pages for non-4KB page size
authorSheng Zhao <sheng.zhao@bytedance.com>
Thu, 25 Sep 2025 11:35:16 +0000 (19:35 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 1 Oct 2025 11:24:55 +0000 (07:24 -0400)
commit3fc3068e7247c94dec08e93fea422a1bb649bfe5
tree5b237e2cf958f9bfd89317d12342c4d95768a924
parent1c14b0e4ba988381e362ad8a9651eff0b21bd47f
vduse: Use fixed 4KB bounce pages for non-4KB page size

The allocation granularity of bounce pages is PAGE_SIZE. This may cause
even small IO requests to occupy an entire bounce page exclusively. The
kind of memory waste will be more significant when PAGE_SIZE is larger
than 4KB (e.g. arm64 with 64KB pages).

So, optimize it by using fixed 4KB bounce maps and iova allocation
granularity. A single IO request occupies at least a 4KB bounce page
instead of the entire memory page of PAGE_SIZE.

Signed-off-by: Sheng Zhao <sheng.zhao@bytedance.com>
Message-Id: <20250925113516.60305-1-sheng.zhao@bytedance.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/vdpa_user/iova_domain.c
drivers/vdpa/vdpa_user/iova_domain.h