Re: [PATCH 1/1] block: optimise in irq bio put caching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux