Cc: James Bottomley <James.Bottomley@...>, Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>, FUJITA Tomonori <fujita.tomonori@...>, Jens Axboe <jens.axboe@...>, Pekka Enberg <penberg@...>, Peter Zijlstra <a.p.zijlstra@...>, Rafael J. Wysocki <rjw@...>, <linux-kernel@...>
Looks like that one of the issues here is that swap_writepage()
does not perform enough reclaim? If it would free more pages then
__scsi_get_command would still have pages to allocate and not drain
the reserves.
Mempool_alloc()s use of the gfp_mask here suggests that it can potentially
drain all reserves and exhaust all available "slots" (partial slabs). Thus
it may regularly force any other user of the slab to hit the slow path
and potentially trigger reclaim. Could be a bit unfair.
--