Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel-6.1: add patch for blkio with cgroupsv1 #225

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

KCSesh
Copy link
Contributor

@KCSesh KCSesh commented Oct 29, 2024

Issue number:

N/A

Description of changes:
kernel-6.1: add patch for blkio when using cgroupsv1

Testing done:

With commit:

cat /sys/fs/cgroup/blkio/ecs/25754cf932b94a15b80eedeb05f6d0ae/200927c37cb9ea0980b7be3b50ebebf7e06168d2799f3ad5d634c01f775ff3f2/blkio.throttle.io_service_bytes_recursive                                                                                                                                         Tue Oct 29 20:53:41 2024

259:0 Read 0
259:0 Write 939524096
259:0 Sync 939524096
259:0 Async 0
259:0 Discard 0
259:0 Total 939524096
259:2 Read 90112
259:2 Write 0
259:2 Sync 90112
259:2 Async 0
259:2 Discard 0
259:2 Total 90112
252:0 Read 90112
252:0 Write 0
252:0 Sync 90112
252:0 Async 0
252:0 Discard 0
252:0 Total 90112
Total 939704320

Without commit:

bash-5.1# cat /sys/fs/cgroup/blkio/ecs/ead1cd68007a4927b73d5df762abfdb0/ec134ec4291269aea86f4d7cd5f383cf4b72e9bd07756c0e794f4a3c31c58a95/blkio.throttle.io_service_bytes_recursive
259:1 Read 0
259:1 Write 0
259:1 Sync 0
259:1 Async 0
259:1 Discard 0
259:1 Total 0
252:0 Read 0
252:0 Write 0
252:0 Sync 0
252:0 Async 0
252:0 Discard 0
252:0 Total 0
Total 0

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@KCSesh KCSesh marked this pull request as ready for review October 29, 2024 21:54
Signed-off-by: Kyle Sessions <kssessio@amazon.com>
@KCSesh
Copy link
Contributor Author

KCSesh commented Oct 30, 2024

Updated PR to simplify the patches to focus on the fix with blkio when using cgroupsv1.

@arnaldo2792 arnaldo2792 self-requested a review October 30, 2024 00:39
Comment on lines +43 to +47
cpu = get_cpu();
bis = per_cpu_ptr(bio->bi_blkg->iostat_cpu, cpu);
flags = u64_stats_update_begin_irqsave(&bis->sync);
@@ -1984,8 +1987,7 @@ void blk_cgroup_bio_start(struct bio *bio)
bis->cur.ios[rwd]++;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bcressey were these lines added to make the cherry-pick/port-back happy? I saw they were in what was patch 1008.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bcressey were these lines added to make the cherry-pick/port-back happy? I saw they were in what was patch 1008.

The call to cgroup_rstat_updated was what changed, to match the prior code in 6.1, which didn't have the lockless change.

There was also a bit of context that needed to be removed to relocate the guard to the top of the function.

@KCSesh KCSesh changed the title kernel-6.1: add patches for blkio kernel-6.1: add patche for blkio with cgroupsv1 Oct 30, 2024
@KCSesh KCSesh changed the title kernel-6.1: add patche for blkio with cgroupsv1 kernel-6.1: add patch for blkio with cgroupsv1 Oct 30, 2024
@KCSesh KCSesh merged commit 0479dbd into bottlerocket-os:develop Oct 30, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants