Commit 9c439176 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Vlastimil Babka
Browse files

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: default avatarChristoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20251113084022.1255121-9-hch@lst.de


Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
parent ac529d86
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -427,10 +427,10 @@ static unsigned int mempool_alloc_from_pool(struct mempool *pool, void **elems,
		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);