Thread (15 messages) 15 messages, 5 authors, 2025-06-02

Re: [RFC 3/3] block: use mm_huge_zero_folio in __blkdev_issue_zero_pages()

From: Christoph Hellwig <hch@lst.de>
Date: 2025-06-02 05:05:22
Also in: linux-fsdevel, linux-mm, lkml

On Tue, May 27, 2025 at 07:04:52AM +0200, Pankaj Raghav wrote:
Noticed a 4% increase in performance on a commercial NVMe SSD which does
not support OP_WRITE_ZEROES. The device's MDTS was 128K. The performance
gains might be bigger if the device supports bigger MDTS.
Impressive gain on the one hand - on the other hand what is the macro
workload that does a lot of zeroing on an SSD, because avoiding that
should yield even better result while reducing wear..
+			unsigned int len, added = 0;
 
+			len = min_t(sector_t, folio_size(zero_folio),
+				    nr_sects << SECTOR_SHIFT);
+			if (bio_add_folio(bio, zero_folio, len, 0))
+				added = len;
 			if (added < len)
 				break;
 			nr_sects -= added >> SECTOR_SHIFT;
Unless I'm missing something the added variable can go away now, and
the code using it can simply use len.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help