Tejun probably reads everything to linux-block, but let's CC him explicitly.
block/blk-iocost.c
2222 TRACE_IOCG_PATH(iocg_idle, iocg, now,
2223 atomic64_read(&iocg->active_period),
2224 atomic64_read(&ioc->cur_period), vtime);
2225 __propagate_weights(iocg, 0, 0, false, now);
^
Why is "active" zero? __propagate_weights() does a clamp() to 1 as minimum and
we've added new build time asserts so this breaks the build.
2226 list_del_init(&iocg->active_list);
The other way to solve this would be to something stupid like:
diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index 384aa15e8260..551edd2f661f 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -1094,7 +1094,7 @@ static void __propagate_weights(struct ioc_gq *iocg, u32 active, u32 inuse,
* @active. An active internal node's inuse is solely determined by the
* inuse to active ratio of its children regardless of @inuse.
*/
- if (list_empty(&iocg->active_list) && iocg->child_active_sum) {
+ if ((list_empty(&iocg->active_list) && iocg->child_active_sum) || active == 0) {
inuse = DIV64_U64_ROUND_UP(active * iocg->child_inuse_sum,
iocg->child_active_sum);
} else {
But that seems really stupid.
regards,
dan carpenter
On Wed, Dec 04, 2024 at 04:11:33PM +0000, David Laight wrote:
> From: Dan Carpenter <dan.carpenter(a)linaro.org>
> > Sent: 04 December 2024 14:39
> >
> > Let's add David to the Cc list because he's the expert on clamp().
>
> The traceback info misses the important point.
> I can't see the 'inlined from line 2225' message.
>
> We have (line 1084):
> static void __propagate_weights(struct ioc_gq *iocg, u32 active, u32 inuse,
> bool save, struct ioc_now *now)
> followed by:
> inuse = clamp_t(u32, inuse, 1, active);
>
> But line 2225 has:
> __propagate_weights(iocg, 0, 0, false, now);
>
> With aggressive inlining the compiler sees 'active == 0'
> and the lo > hi test correctly triggers.
>
> The previous version only verified 'lo <= hi' if it was a constant
> integer expression - which it isn't here.
>
> No idea what the code is trying to do, nor what value it expects
> clamp(val, 1, 0) to generate - likely to be 0 or 1 depending on
> the order of the comparisons.
>
> David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)
Total jobs: 181
Total errors: 61 (33.70%)
LAVA errors: 3 (1.66%)
Test errors: 25 (13.81%)
Job errors: 18 (9.94%)
Infra errors: 14 (7.73%)
Canceled jobs: 1 (0.55%)
Device type: dragonboard-845c
Total jobs: 56
Total errors: 14 (25.00%)
Error type: Infrastructure
Error count: 3 (5.36%)
Error: No match for error type 'Infrastructure', message 'Unable to run: ['docker', 'exec', 'lava-8015408-3.1-b96d7a11-fe08-4710-b424-745f2253161b', 'fastboot', '-s', '25564f71', 'format:ext4', 'metadata']'
Count: 1 (1.79%)
IDs:
db845c-08:
8015408
Error: No match for error type 'Infrastructure', message 'Unable to run: ['docker', 'exec', 'lava-8015404-3.1-8a927157-10c2-4b5f-8bb8-30f868f6dcfb', 'fastboot', '-s', '476f370a', 'format:ext4', 'metadata']'
Count: 1 (1.79%)
IDs:
db845c-10:
8015404
Error: No match for error type 'Infrastructure', message 'boot-fastboot timed out after 882 seconds'
Count: 1 (1.79%)
IDs:
db845c-07:
8012430
Error type: Canceled
Error count: 1 (1.79%)
Error: The job was canceled
Count: 1 (1.79%)
IDs:
db845c-07:
8015396
Error type: Test
Error count: 10 (17.86%)
Error: No match for error type 'Test', message 'lava-test-interactive timed out after 1500 seconds'
Count: 2 (3.57%)
IDs:
db845c-09:
8012705 8012709
Error: No match for error type 'Test', message 'tradefed - adb device lost[c7cf1849]'
Count: 1 (1.79%)
IDs:
db845c-07:
8012645
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 593 seconds'
Count: 1 (1.79%)
IDs:
db845c-09:
8012417
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 598 seconds'
Count: 2 (3.57%)
IDs:
db845c-09:
8012372 8012407
Error: No match for error type 'Test', message 'tradefed - adb device lost[b6b742b9]'
Count: 1 (1.79%)
IDs:
db845c-01:
8012390
Error: Device NOT found!
Count: 1 (1.79%)
IDs:
db845c-09:
8012370
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 596 seconds'
Count: 1 (1.79%)
IDs:
db845c-09:
8012367
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 53998 seconds'
Count: 1 (1.79%)
IDs:
db845c-08:
7994679
Device type: sm8550-hdk
Total jobs: 22
Total errors: 22 (100.00%)
Error type: Job
Error count: 17 (77.27%)
Error: No match for error type 'Job', message 'login-action timed out after 875 seconds'
Count: 11 (50.00%)
IDs:
sm8550-hdk-01:
8012783 8012784 8012785 8014489 8014490
8014759 8014760 8014761 8015279 8015281
8015388
Error: wait for prompt timed out
Count: 3 (13.64%)
IDs:
sm8550-hdk-01:
8012786 8015277 8015280
Error: No match for error type 'Job', message 'login-action timed out after 876 seconds'
Count: 1 (4.55%)
IDs:
sm8550-hdk-01:
8015278
Error: No match for error type 'Job', message 'login-action timed out after 866 seconds'
Count: 1 (4.55%)
IDs:
sm8550-hdk-01:
8014476
Error: No match for error type 'Job', message 'login-action timed out after 860 seconds'
Count: 1 (4.55%)
IDs:
sm8550-hdk-01:
8012782
Error type: Infrastructure
Error count: 4 (18.18%)
Error: No match for error type 'Infrastructure', message 'fastboot-boot-commands timed out after 901 seconds'
Count: 2 (9.09%)
IDs:
sm8550-hdk-01:
8012830 8014764
Error: No match for error type 'Infrastructure', message 'boot-fastboot timed out after 882 seconds'
Count: 1 (4.55%)
IDs:
sm8550-hdk-01:
8012833
Error: No match for error type 'Infrastructure', message 'boot-fastboot timed out after 883 seconds'
Count: 1 (4.55%)
IDs:
sm8550-hdk-01:
8012832
Error type: Test
Error count: 1 (4.55%)
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 893 seconds'
Count: 1 (4.55%)
IDs:
sm8550-hdk-01:
8012831
Device type: qrb5165-rb5
Total jobs: 102
Total errors: 24 (23.53%)
Error type: Test
Error count: 13 (12.75%)
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 598 seconds'
Count: 5 (4.90%)
IDs:
rb5-03:
8012546 8012760 8015103
rb5-06:
8014728
rb5-07:
8015283
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 597 seconds'
Count: 1 (0.98%)
IDs:
rb5-03:
8015110
Error: Device NOT found!
Count: 2 (1.96%)
IDs:
rb5-03:
8012693 8012824
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 596 seconds'
Count: 1 (0.98%)
IDs:
rb5-07:
8012799
Error: No match for error type 'Test', message 'tradefed - adb device lost[d8a1879f]'
Count: 1 (0.98%)
IDs:
rb5-07:
8012791
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 297 seconds'
Count: 1 (0.98%)
IDs:
rb5-07:
8012762
Error: No match for error type 'Test', message 'tradefed - adb device lost[93dcfd96]'
Count: 1 (0.98%)
IDs:
rb5-01:
8012571
Error: No match for error type 'Test', message 'tradefed - adb device lost[f11b68eb]'
Count: 1 (0.98%)
IDs:
rb5-05:
8012568
Error type: Infrastructure
Error count: 7 (6.86%)
Error: Reboot failed
Count: 1 (0.98%)
IDs:
rb5-07:
8014477
Error: Connection closed
Count: 4 (3.92%)
IDs:
rb5-05:
8012589 8012591 8012696 8012773
Error: fastboot-flash-action timed out
Count: 2 (1.96%)
IDs:
rb5-07:
8012749 8012755
Error type: Bug
Error count: 3 (2.94%)
Error: No match for error type 'Bug', message 'Failed to share device '/dev/bus/usb/001/110' to docker container lava-8012819-3.1-c2aca304-d8bb-4831-97cc-92ad7035532e'
Count: 1 (0.98%)
IDs:
rb5-03:
8012819
Error: No match for error type 'Bug', message 'Failed to share device '/dev/bus/usb/001/109' to docker container lava-8012703-3.1-bb901daf-0526-47b7-b916-d0614013ed98'
Count: 1 (0.98%)
IDs:
rb5-01:
8012703
Error: No match for error type 'Bug', message 'Failed to share device '/dev/bus/usb/002/085' to docker container lava-8012702-3.1-5eef91bf-c83a-41e2-ba59-94df4bdb3e7e'
Count: 1 (0.98%)
IDs:
rb5-05:
8012702
Error type: Job
Error count: 1 (0.98%)
Error: No match for error type 'Job', message 'job-cleanup timed out after 300 seconds'
Count: 1 (0.98%)
IDs:
rb5-07:
8012659
Device type: rk3399-rock-pi-4b
Total jobs: 1
Total errors: 1 (100.00%)
Error type: Test
Error count: 1 (100.00%)
Error: lava-test-shell timed out
Count: 1 (100.00%)
IDs:
rockpi-08:
8015076