Skip to content

Added OOM notification for Memory controller#115

Merged
crosbymichael merged 4 commits intocontainerd:masterfrom
Zyqsempai:104-add-oom-notifications
Nov 15, 2019
Merged

Added OOM notification for Memory controller#115
crosbymichael merged 4 commits intocontainerd:masterfrom
Zyqsempai:104-add-oom-notifications

Conversation

@Zyqsempai
Copy link
Contributor

Partially Fixes #104

@crosbymichael @AkihiroSuda
So this Pr is on of the ideas I have on how we can implement OOM notifications in cGroupv2.
So, I see here at least two directions, we can implement Inotify fd check right here and in case if we receive inotify event, create new separate file for oom's only, and return that file fd.
On other hand we can delegate it to next layers(containerd etc.)
What do you think of this approach?
Signed-off-by: bpopovschi [email protected]

@AkihiroSuda
Copy link
Member

in case if we receive inotify event, create new separate file for oom's only, and return that file fd.

Does kernel have this feature? Seems not https://facebookmicrosites.github.io/cgroup2/docs/memory-controller.html

@Zyqsempai
Copy link
Contributor Author

@AkihiroSuda Do we actually care about other events here? Coz we can easily filter it only by oom

@AkihiroSuda
Copy link
Member

Yes, but I agree it is not now

@codecov-io
Copy link

codecov-io commented Nov 12, 2019

Codecov Report

Merging #115 into master will decrease coverage by 0.59%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #115     +/-   ##
=========================================
- Coverage   36.34%   35.75%   -0.6%     
=========================================
  Files          32       32             
  Lines        2102     2137     +35     
=========================================
  Hits          764      764             
- Misses       1210     1245     +35     
  Partials      128      128
Impacted Files Coverage Δ
v2/manager.go 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d26e1b3...d03d516. Read the comment docs.

@Zyqsempai
Copy link
Contributor Author

@AkihiroSuda You mean something like this? PTAL

@Zyqsempai
Copy link
Contributor Author

@crosbymichael PTAL

@crosbymichael
Copy link
Member

rebase please :)

@Zyqsempai Zyqsempai force-pushed the 104-add-oom-notifications branch from 254a491 to d03d516 Compare November 14, 2019 16:16
@Zyqsempai
Copy link
Contributor Author

@crosbymichael Done.

@crosbymichael
Copy link
Member

LGTM

@crosbymichael crosbymichael merged commit c4474e8 into containerd:master Nov 15, 2019
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.

cgroup2: check list for v2 controller implementations

4 participants