[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250516101054.676046-3-p.raghav@samsung.com>
Date: Fri, 16 May 2025 12:10:53 +0200
From: Pankaj Raghav <p.raghav@...sung.com>
To: "Darrick J . Wong" <djwong@...nel.org>,
hch@....de,
willy@...radead.org
Cc: linux-kernel@...r.kernel.org,
linux-mm@...ck.org,
David Hildenbrand <david@...hat.com>,
linux-fsdevel@...r.kernel.org,
mcgrof@...nel.org,
gost.dev@...sung.com,
Andrew Morton <akpm@...ux-foundation.org>,
kernel@...kajraghav.com,
Pankaj Raghav <p.raghav@...sung.com>
Subject: [RFC 2/3] block: use LARGE_ZERO_PAGE in __blkdev_issue_zero_pages()
Use LARGE_ZERO_PAGE in __blkdev_issue_zero_pages() instead of ZERO_PAGE.
On systems that support LARGE_ZERO_PAGE, we will end up sending larger
bvecs instead of multiple small ones.
Noticed a 4% increase in performance on a commercial NVMe SSD which does
not support OP_WRITE_ZEROES. The performance gains might be bigger if
the device supports larger MDTS.
Signed-off-by: Pankaj Raghav <p.raghav@...sung.com>
---
block/blk-lib.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/blk-lib.c b/block/blk-lib.c
index 4c9f20a689f7..80dfc737d1f6 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -211,8 +211,8 @@ static void __blkdev_issue_zero_pages(struct block_device *bdev,
unsigned int len, added;
len = min_t(sector_t,
- PAGE_SIZE, nr_sects << SECTOR_SHIFT);
- added = bio_add_page(bio, ZERO_PAGE(0), len, 0);
+ ZERO_LARGE_PAGE_SIZE, nr_sects << SECTOR_SHIFT);
+ added = bio_add_page(bio, ZERO_LARGE_PAGE(0), len, 0);
if (added < len)
break;
nr_sects -= added >> SECTOR_SHIFT;
--
2.47.2
Powered by blists - more mailing lists