On 1/29/24 17:24, Christoph Hellwig wrote:
On Mon, Jan 29, 2024 at 02:36:57PM +0000, Pavel Begunkov wrote:
Let me know if there are any concerns with the patch
This seems to lose the case where non-polled bios are freed
form process context, which can be true with threadead interrupts
or various block remappers that defer I/O completions to workqueues,
and also a lot of file systems (but currentl the alloc cache isn't
used by file systems).
For the task context I can generalise the poll branch
if (in_task()) { // previously if (REQ_POLLED)
// ->free_list;
} else if (in_hardirq()) {
// ->free_list_irq;
} else {
bio_free();
}
Also jumping backward for non-loop code flow is a nasty pattern.
How come considering it's jumping to a return? I can switch
the bio_free() and goto blocks so it's a jump forward, if
that's a preference
--
Pavel Begunkov