Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Christoph Hellwig and committed by
Vlastimil Babka
9c439176 ac529d86

+4 -4
+4 -4
mm/mempool.c
··· 427 427 spin_unlock_irqrestore(&pool->lock, flags); 428 428 429 429 /* 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. 434 434 */ 435 435 io_schedule_timeout(5 * HZ); 436 436 finish_wait(&pool->wait, &wait);