From 366e19efe826780a386f4dbad640f2bc0c8987d2 Mon Sep 17 00:00:00 2001 From: Alexey Marchuk Date: Wed, 13 Apr 2022 12:32:07 +0300 Subject: [PATCH] vbdev_compress: Remove mentioning of 2MiB huge pages We explicitly refer to 2MiB huge pages when a buffer spans huge page boundary. That is not correct since it may happen even with 1GiB huge pages. Signed-off-by: Alexey Marchuk Reported-by: Jim Harris Change-Id: Ief72b677ccf3d8c1d9835bb8b74621f2b349175a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12250 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Ben Walker Reviewed-by: Shuhei Matsumoto --- module/bdev/compress/vbdev_compress.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/bdev/compress/vbdev_compress.c b/module/bdev/compress/vbdev_compress.c index 56879d23c..3adce54ce 100644 --- a/module/bdev/compress/vbdev_compress.c +++ b/module/bdev/compress/vbdev_compress.c @@ -66,7 +66,7 @@ static int g_mbuf_offset; #define NUM_MAX_INFLIGHT_OPS 128 #define DEFAULT_WINDOW_SIZE 15 /* We need extra mbufs per operation to accommodate host buffers that - * span a 2MB boundary. + * span a physical page boundary. */ #define MAX_MBUFS_PER_OP (REDUCE_MAX_IOVECS * 2) #define CHUNK_SIZE (1024 * 16) @@ -496,7 +496,7 @@ _setup_compress_mbuf(struct rte_mbuf **mbufs, int *mbuf_total, uint64_t *total_l rte_pktmbuf_chain(mbufs[0], mbufs[mbuf_index]); } - /* If we crossed 2 2MB boundary we need another mbuf for the remainder */ + /* If we crossed 2 physical pages boundary we need another mbuf for the remainder */ if (remainder > 0) { /* allocate an mbuf at the end of the array */ rc = rte_pktmbuf_alloc_bulk(g_mbuf_mp, @@ -590,7 +590,7 @@ _compress_operation(struct spdk_reduce_backing_dev *backing_dev, struct iovec *s } if (!comp_bdev->backing_dev.sgl_in && src_mbufs[0]->next != NULL) { if (src_iovcnt == 1) { - SPDK_ERRLOG("Src buffer crosses 2MB boundary but driver %s doesn't support SGL input\n", + SPDK_ERRLOG("Src buffer crosses physical page boundary but driver %s doesn't support SGL input\n", comp_bdev->drv_name); } else { SPDK_ERRLOG("Driver %s doesn't support SGL input\n", comp_bdev->drv_name); @@ -610,7 +610,7 @@ _compress_operation(struct spdk_reduce_backing_dev *backing_dev, struct iovec *s } if (!comp_bdev->backing_dev.sgl_out && dst_mbufs[0]->next != NULL) { if (dst_iovcnt == 1) { - SPDK_ERRLOG("Dst buffer crosses 2MB boundary but driver %s doesn't support SGL output\n", + SPDK_ERRLOG("Dst buffer crosses physical page boundary but driver %s doesn't support SGL output\n", comp_bdev->drv_name); } else { SPDK_ERRLOG("Driver %s doesn't support SGL output\n", comp_bdev->drv_name);