Skip to content

Commit 9c43917

Browse files
Christoph Hellwigtehcaster
authored andcommitted
mempool: legitimize the io_schedule_timeout in mempool_alloc_from_pool
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>
1 parent ac529d8 commit 9c43917

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

mm/mempool.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,10 +427,10 @@ static unsigned int mempool_alloc_from_pool(struct mempool *pool, void **elems,
427427
spin_unlock_irqrestore(&pool->lock, flags);
428428

429429
/*
430-
* Wait for someone else to return an element to @pool.
431-
*
432-
* FIXME: this should be io_schedule(). The timeout is there as
433-
* a workaround for some DM problems in 2.6.18.
430+
* Wait for someone else to return an element to @pool, but wake
431+
* up occasionally as memory pressure might have reduced even
432+
* and the normal allocation in alloc_fn could succeed even if
433+
* no element was returned.
434434
*/
435435
io_schedule_timeout(5 * HZ);
436436
finish_wait(&pool->wait, &wait);

0 commit comments

Comments
 (0)