]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mempool: legitimize the io_schedule_timeout in mempool_alloc_from_pool
authorChristoph Hellwig <hch@lst.de>
Thu, 13 Nov 2025 08:39:49 +0000 (09:39 +0100)
committerVlastimil Babka <vbabka@suse.cz>
Sun, 23 Nov 2025 11:30:40 +0000 (12:30 +0100)
The timeout here is and old workaround with a Fixme comment.  But
thinking about it, it makes sense to keep it, so reword the comment.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20251113084022.1255121-9-hch@lst.de
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
mm/mempool.c

index b45bcf4151478f6a947094bbbb1d850804322412..9ec3a04a0130ecf6c8c9e8ea83ea7eefc93a2719 100644 (file)
@@ -427,10 +427,10 @@ fail:
                spin_unlock_irqrestore(&pool->lock, flags);
 
                /*
-                * Wait for someone else to return an element to @pool.
-                *
-                * FIXME: this should be io_schedule().  The timeout is there as
-                * a workaround for some DM problems in 2.6.18.
+                * Wait for someone else to return an element to @pool, but wake
+                * up occasionally as memory pressure might have reduced even
+                * and the normal allocation in alloc_fn could succeed even if
+                * no element was returned.
                 */
                io_schedule_timeout(5 * HZ);
                finish_wait(&pool->wait, &wait);