On 2024/1/3 02:56, David Sterba wrote:
On Fri, Dec 22, 2023 at 05:59:34PM +0800, kernel test robot wrote:Hello, kernel test robot noticed a -18.0% regression of stress-ng.link.ops_per_sec on: commit: 8d993618350c86da11cb408ba529c13e83d09527 ("btrfs: migrate get_eb_page_index() and get_eb_offset_in_page() to folios") https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git masterUnfortunatelly the conversion to folios adds a lot of assembly code and we can't rely on constants like PAGE_SIZE anymore. The calculations in extent buffer members are therefore slower, 18% is a lot but within my expected range for metadta-only operations. This could be improved by caching some values, like folio_size, so it's a dereference and not a calculation of "PAGE_SIZE << folio_order" with conditionals around.
Yep, caching the folio size is also on my todo list.I'm pretty happy to add that, but it may still be slower than handling a fixed PAGE_SIZE, I'm not sure how much it would improve.
Thanks, Qu
Attachment:
OpenPGP_0xC23D91F3A125FEA8.asc
Description: OpenPGP public key
Attachment:
OpenPGP_signature.asc
Description: OpenPGP digital signature