Patch "blk-iocost: avoid 64-bit division in ioc_timer_fn" has been added to the 6.2-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    blk-iocost: avoid 64-bit division in ioc_timer_fn

to the 6.2-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     blk-iocost-avoid-64-bit-division-in-ioc_timer_fn.patch
and it can be found in the queue-6.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 5f2779dfa7b8cc7dfd4a1b6586d86e0d193266f3 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@xxxxxxxx>
Date: Wed, 18 Jan 2023 09:07:01 +0100
Subject: blk-iocost: avoid 64-bit division in ioc_timer_fn

From: Arnd Bergmann <arnd@xxxxxxxx>

commit 5f2779dfa7b8cc7dfd4a1b6586d86e0d193266f3 upstream.

The behavior of 'enum' types has changed in gcc-13, so now the
UNBUSY_THR_PCT constant is interpreted as a 64-bit number because
it is defined as part of the same enum definition as some other
constants that do not fit within a 32-bit integer. This in turn
leads to some inefficient code on 32-bit architectures as well
as a link error:

arm-linux-gnueabi/bin/arm-linux-gnueabi-ld: block/blk-iocost.o: in function `ioc_timer_fn':
blk-iocost.c:(.text+0x68e8): undefined reference to `__aeabi_uldivmod'
arm-linux-gnueabi-ld: blk-iocost.c:(.text+0x6908): undefined reference to `__aeabi_uldivmod'

Split the enum definition to keep the 64-bit timing constants in
a separate enum type from those constants that can clearly fit
within a smaller type.

Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Acked-by: Tejun Heo <tj@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20230118080706.3303186-1-arnd@xxxxxxxxxx
Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 block/blk-iocost.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -258,6 +258,11 @@ enum {
 	VRATE_MIN		= VTIME_PER_USEC * VRATE_MIN_PPM / MILLION,
 	VRATE_CLAMP_ADJ_PCT	= 4,
 
+	/* switch iff the conditions are met for longer than this */
+	AUTOP_CYCLE_NSEC	= 10LLU * NSEC_PER_SEC,
+};
+
+enum {
 	/* if IOs end up waiting for requests, issue less */
 	RQ_WAIT_BUSY_PCT	= 5,
 
@@ -296,9 +301,6 @@ enum {
 	/* don't let cmds which take a very long time pin lagging for too long */
 	MAX_LAGGING_PERIODS	= 10,
 
-	/* switch iff the conditions are met for longer than this */
-	AUTOP_CYCLE_NSEC	= 10LLU * NSEC_PER_SEC,
-
 	/*
 	 * Count IO size in 4k pages.  The 12bit shift helps keeping
 	 * size-proportional components of cost calculation in closer


Patches currently in stable-queue which might be from arnd@xxxxxxxx are

queue-6.2/asm-generic-io.h-suppress-endianness-warnings-for-re.patch-28260
queue-6.2/arm64-dts-qcom-msm8996-fix-the-pci-i-o-port-range.patch
queue-6.2/ipmi-aspeed_bt_ipmi_bmc-select-regmap_mmio-instead-o.patch
queue-6.2/arm64-dts-qcom-sm8450-fix-the-pci-i-o-port-range.patch
queue-6.2/arm64-dts-qcom-sm8250-fix-the-pci-i-o-port-range.patch
queue-6.2/arm64-dts-qcom-msm8998-fix-the-pci-i-o-port-range.patch
queue-6.2/arm64-dts-qcom-sc7280-fix-the-pci-i-o-port-range.patch
queue-6.2/arm64-dts-qcom-sdm845-fix-the-pci-i-o-port-range.patch
queue-6.2/arm-dts-qcom-ipq8064-fix-the-pci-i-o-port-range.patch
queue-6.2/arm-dts-qcom-ipq4019-fix-the-pci-i-o-port-range.patch
queue-6.2/hte-tegra-fix-struct-of_device_id-build-error.patch
queue-6.2/asm-generic-io.h-suppress-endianness-warnings-for-re.patch
queue-6.2/blk-iocost-avoid-64-bit-division-in-ioc_timer_fn.patch
queue-6.2/arm64-dts-qcom-ipq8074-fix-the-pci-i-o-port-range.patch
queue-6.2/arm64-dts-qcom-ipq6018-fix-the-pci-i-o-port-range.patch
queue-6.2/arm64-dts-qcom-sc8280xp-fix-the-pci-i-o-port-range.patch
queue-6.2/arm64-dts-qcom-sm8150-fix-the-pci-i-o-port-range.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux