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

Add support for rdma cgroup introduced in Linux Kernel 4.11 #2883

Merged
merged 1 commit into from
Aug 31, 2021

Conversation

flouthoc
Copy link
Contributor

@flouthoc flouthoc commented Apr 1, 2021

RDMA controller/cgroup support is added with Linux kernel 4.11.
Similar format is used by cgroup-v2

Reference
https://www.kernel.org/doc/Documentation/cgroup-v1/rdma.txt

@flouthoc flouthoc force-pushed the master branch 3 times, most recently from 2f865ee to c357a29 Compare April 1, 2021 20:31
}

// Parse raw string to RdmaEntry
func ParseRdmaKV(raw string, entry *cgroups.RdmaEntry) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this function is public?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kolyshkin Following function is intentionally public as being used by rdma controller in fs2. I didnt wanted to have redundant code in both implementations of fs and fs2 and these functions are exclusive to Rdma so i thought i'd rather keep them with rdma and not move to fscommon

Copy link
Member

Choose a reason for hiding this comment

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

fscommon can hold the helper for RDMA. fs2 imports fscommon better than fs package. just my two cents.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@fuweid Oh so idea was since ParseRdmaKV and ConvertRdmaEntry uses types from package cgroups having them in fscommon will introduce import cycles. Since both of these functions are only going to be used only by rdma therefore i thought its better to keep them with rdma implementation only. But let me know if you guys think otherwise we can figure out a way. 😄

Copy link
Member

Choose a reason for hiding this comment

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

I prefer to keep the duplicate code in separate packages (non-binding). :)

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should go to fscommon, which naturally contains the stuff that's common between fs and fs2.

Copy link
Contributor

Choose a reason for hiding this comment

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

Which is a problem, as described above (02eb723#r610598989).

To solve it, I think we should move OpenFile/ReadFile etc from fscommon to cgroups/utils.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Resolved in latest commit.

@kolyshkin
Copy link
Contributor

Looks good in general, left some comments.

We also need some integration tests for that.

@flouthoc flouthoc force-pushed the master branch 2 times, most recently from eaa7eee to 09a39b6 Compare April 1, 2021 23:29
@flouthoc
Copy link
Contributor Author

flouthoc commented Apr 1, 2021

@kolyshkin Thanks for the quick review, i have fixed almost everything. 3 comments are still unresolved but i have commented the reason on the review itself. Could you please take a look.

@thaJeztah
Copy link
Member

I see there's a typo in the commit message ("kernal" instead of "kernel"); perhaps good to fix that in case we want to find it back later if someone searches for kernel related commits

@flouthoc
Copy link
Contributor Author

flouthoc commented Aug 3, 2021

@kolyshkin Resolved all of them just a small doubt in first one i have tried clarifying in review itself.

Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

One fix (to the code that I suggested), one nit, and a note about documentation about functions.

You write it as

// FuncName: does this and that.

It should be

// FuncName does this and that.

@flouthoc
Copy link
Contributor Author

flouthoc commented Aug 3, 2021

@kolyshkin I have made requested changes could you PTAL.

@flouthoc flouthoc requested a review from kolyshkin August 3, 2021 18:30
@flouthoc
Copy link
Contributor Author

@kolyshkin Could you please let me know if anything is pending here from my side.

kolyshkin
kolyshkin previously approved these changes Aug 17, 2021
Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

@kolyshkin kolyshkin mentioned this pull request Aug 17, 2021
@flouthoc
Copy link
Contributor Author

@AkihiroSuda thanks :) resolved in latest commit.

@flouthoc flouthoc requested a review from kolyshkin August 23, 2021 07:47
@AkihiroSuda AkihiroSuda modified the milestones: post-1.0, 1.1.0 Aug 24, 2021
Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants