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
memory.events handling rework #145
memory.events handling rework #145
Conversation
Signed-off-by: Boris Popovschi <zyqsempai@mail.ru>
@@ -526,20 +526,19 @@ func (c *Manager) freeze(path string, state State) error { | |||
} | |||
} | |||
|
|||
func (c *Manager) MemoryEventFD() (uintptr, error) { | |||
func (c *Manager) MemoryEventFD() (int, uint32, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs godoc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(int, uint32
why different types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coz this is the base types for file descriptor and watch descriptor, at least syscall.InotifyRmWatch()
expects it in that way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the commit message or the PR description text, could you document:
- purpose of this PR
- how to test
@AkihiroSuda Added goDoc and updated PR description, related to "how to test it" i tried to add test but I wasn't able to properly simulate OOM behavior for process in the test. |
@AkihiroSuda Can we move forward this one, coz implementation of the OOM handler in containerD main repo depends on this one. |
@fuweid PTAL? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Small rework of the memory.events handler in order to implement OOM handler in main containerD repo.
During the memory.events handler implementations, were made few mistakes, this PR fixes them.
Signed-off-by: Boris Popovschi zyqsempai@mail.ru