{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/82453137","pull_request_review_id":3360694,"id":82453137,"diff_hunk":"@@ -145,6 +150,39 @@ func (m *managerImpl) IsUnderInodePressure() bool {\n \treturn hasNodeCondition(m.nodeConditions, api.NodeInodePressure)\n }\n \n+func startMemoryThresholdNotifier(thresholds []Threshold, observations signalObservations, hard bool, handler thresholdNotifierHandlerFunc) error {\n+\tfor _, threshold := range thresholds {\n+\t\tif threshold.Signal != SignalMemoryAvailable ||\n+\t\t\t(hard && threshold.GracePeriod != time.Duration(0)) ||\n+\t\t\t(!hard && threshold.GracePeriod == time.Duration(0)) {\n+\t\t\tcontinue\n+\t\t}\n+\t\tobserved, found := observations[SignalMemoryAvailable]\n+\t\tif !found {\n+\t\t\tcontinue\n+\t\t}\n+\t\tcgroups, err := cm.GetCgroupSubsystems()\n+\t\tif err != nil {\n+\t\t\treturn err\n+\t\t}\n+\t\tcgpath, found := cgroups.MountPoints[\"memory\"]","path":"pkg/kubelet/eviction/eviction_manager.go","position":54,"original_position":54,"commit_id":"cce6a8696e75b3ebea8b0f137f51eed5b625d537","original_commit_id":"cce6a8696e75b3ebea8b0f137f51eed5b625d537","user":{"login":"vishh","id":7063592,"avatar_url":"https://avatars.githubusercontent.com/u/7063592?v=3","gravatar_id":"","url":"https://api.github.com/users/vishh","html_url":"https://github.com/vishh","followers_url":"https://api.github.com/users/vishh/followers","following_url":"https://api.github.com/users/vishh/following{/other_user}","gists_url":"https://api.github.com/users/vishh/gists{/gist_id}","starred_url":"https://api.github.com/users/vishh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishh/subscriptions","organizations_url":"https://api.github.com/users/vishh/orgs","repos_url":"https://api.github.com/users/vishh/repos","events_url":"https://api.github.com/users/vishh/events{/privacy}","received_events_url":"https://api.github.com/users/vishh/received_events","type":"User","site_admin":false},"body":"note that in the future, we plan to support evictions both on root and on `--cgroups-root`. May be its worth adding a TODO here or even better file an issue for it. ","created_at":"2016-10-07T19:16:36Z","updated_at":"2016-10-07T19:16:45Z","html_url":"https://github.com/kubernetes/kubernetes/pull/32577#discussion_r82453137","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32577","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/82453137"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/32577#discussion_r82453137"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32577"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32577","id":85066302,"html_url":"https://github.com/kubernetes/kubernetes/pull/32577","diff_url":"https://github.com/kubernetes/kubernetes/pull/32577.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/32577.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/32577","number":32577,"state":"open","locked":false,"title":"kubelet: eviction: add memcg threshold notifier to improve eviction responsiveness","user":{"login":"sjenning","id":493891,"avatar_url":"https://avatars.githubusercontent.com/u/493891?v=3","gravatar_id":"","url":"https://api.github.com/users/sjenning","html_url":"https://github.com/sjenning","followers_url":"https://api.github.com/users/sjenning/followers","following_url":"https://api.github.com/users/sjenning/following{/other_user}","gists_url":"https://api.github.com/users/sjenning/gists{/gist_id}","starred_url":"https://api.github.com/users/sjenning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjenning/subscriptions","organizations_url":"https://api.github.com/users/sjenning/orgs","repos_url":"https://api.github.com/users/sjenning/repos","events_url":"https://api.github.com/users/sjenning/events{/privacy}","received_events_url":"https://api.github.com/users/sjenning/received_events","type":"User","site_admin":false},"body":"This PR adds the ability for the eviction code to get immediate notification from the kernel when the available memory in the root cgroup falls below a user defined threshold, controlled by setting the `memory.available` siginal with the ```--eviction-hard``` flag.\r\n\r\nThis PR by itself, doesn't change anything as the frequency at which new stats can be obtained is currently controlled by the cadvisor housekeeping interval.  That being the case, the call to ```synchronize()``` by the notification loop will very likely get stale stats and not act any more quickly than it does now.\r\n\r\nHowever, whenever cadvisor does get on-demand stat gathering ability, this will improve eviction responsiveness by getting async notification of the root cgroup memory state rather than relying on polling cadvisor.\r\n\r\n@vishh @derekwaynecarr @kubernetes/rh-cluster-infra\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.kubernetes.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/32577)\n<!-- Reviewable:end -->\n","created_at":"2016-09-13T15:04:44Z","updated_at":"2016-10-07T19:16:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d077c0283478a908790f1cbde755b848f4a97e40","assignee":{"login":"derekwaynecarr","id":6233452,"avatar_url":"https://avatars.githubusercontent.com/u/6233452?v=3","gravatar_id":"","url":"https://api.github.com/users/derekwaynecarr","html_url":"https://github.com/derekwaynecarr","followers_url":"https://api.github.com/users/derekwaynecarr/followers","following_url":"https://api.github.com/users/derekwaynecarr/following{/other_user}","gists_url":"https://api.github.com/users/derekwaynecarr/gists{/gist_id}","starred_url":"https://api.github.com/users/derekwaynecarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekwaynecarr/subscriptions","organizations_url":"https://api.github.com/users/derekwaynecarr/orgs","repos_url":"https://api.github.com/users/derekwaynecarr/repos","events_url":"https://api.github.com/users/derekwaynecarr/events{/privacy}","received_events_url":"https://api.github.com/users/derekwaynecarr/received_events","type":"User","site_admin":false},"assignees":[{"login":"derekwaynecarr","id":6233452,"avatar_url":"https://avatars.githubusercontent.com/u/6233452?v=3","gravatar_id":"","url":"https://api.github.com/users/derekwaynecarr","html_url":"https://github.com/derekwaynecarr","followers_url":"https://api.github.com/users/derekwaynecarr/followers","following_url":"https://api.github.com/users/derekwaynecarr/following{/other_user}","gists_url":"https://api.github.com/users/derekwaynecarr/gists{/gist_id}","starred_url":"https://api.github.com/users/derekwaynecarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekwaynecarr/subscriptions","organizations_url":"https://api.github.com/users/derekwaynecarr/orgs","repos_url":"https://api.github.com/users/derekwaynecarr/repos","events_url":"https://api.github.com/users/derekwaynecarr/events{/privacy}","received_events_url":"https://api.github.com/users/derekwaynecarr/received_events","type":"User","site_admin":false},{"login":"vishh","id":7063592,"avatar_url":"https://avatars.githubusercontent.com/u/7063592?v=3","gravatar_id":"","url":"https://api.github.com/users/vishh","html_url":"https://github.com/vishh","followers_url":"https://api.github.com/users/vishh/followers","following_url":"https://api.github.com/users/vishh/following{/other_user}","gists_url":"https://api.github.com/users/vishh/gists{/gist_id}","starred_url":"https://api.github.com/users/vishh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishh/subscriptions","organizations_url":"https://api.github.com/users/vishh/orgs","repos_url":"https://api.github.com/users/vishh/repos","events_url":"https://api.github.com/users/vishh/events{/privacy}","received_events_url":"https://api.github.com/users/vishh/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/23","html_url":"https://github.com/kubernetes/kubernetes/milestones/v1.5","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/23/labels","id":1945978,"number":23,"title":"v1.5","description":"","creator":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"open_issues":222,"closed_issues":136,"state":"open","created_at":"2016-08-16T21:47:28Z","updated_at":"2016-10-07T19:05:36Z","due_on":"2016-12-09T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32577/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32577/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/32577/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/cce6a8696e75b3ebea8b0f137f51eed5b625d537","head":{"label":"sjenning:memcg-notification-wip","ref":"memcg-notification-wip","sha":"cce6a8696e75b3ebea8b0f137f51eed5b625d537","user":{"login":"sjenning","id":493891,"avatar_url":"https://avatars.githubusercontent.com/u/493891?v=3","gravatar_id":"","url":"https://api.github.com/users/sjenning","html_url":"https://github.com/sjenning","followers_url":"https://api.github.com/users/sjenning/followers","following_url":"https://api.github.com/users/sjenning/following{/other_user}","gists_url":"https://api.github.com/users/sjenning/gists{/gist_id}","starred_url":"https://api.github.com/users/sjenning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjenning/subscriptions","organizations_url":"https://api.github.com/users/sjenning/orgs","repos_url":"https://api.github.com/users/sjenning/repos","events_url":"https://api.github.com/users/sjenning/events{/privacy}","received_events_url":"https://api.github.com/users/sjenning/received_events","type":"User","site_admin":false},"repo":{"id":49895334,"name":"kubernetes","full_name":"sjenning/kubernetes","owner":{"login":"sjenning","id":493891,"avatar_url":"https://avatars.githubusercontent.com/u/493891?v=3","gravatar_id":"","url":"https://api.github.com/users/sjenning","html_url":"https://github.com/sjenning","followers_url":"https://api.github.com/users/sjenning/followers","following_url":"https://api.github.com/users/sjenning/following{/other_user}","gists_url":"https://api.github.com/users/sjenning/gists{/gist_id}","starred_url":"https://api.github.com/users/sjenning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjenning/subscriptions","organizations_url":"https://api.github.com/users/sjenning/orgs","repos_url":"https://api.github.com/users/sjenning/repos","events_url":"https://api.github.com/users/sjenning/events{/privacy}","received_events_url":"https://api.github.com/users/sjenning/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sjenning/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/sjenning/kubernetes","forks_url":"https://api.github.com/repos/sjenning/kubernetes/forks","keys_url":"https://api.github.com/repos/sjenning/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sjenning/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sjenning/kubernetes/teams","hooks_url":"https://api.github.com/repos/sjenning/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/sjenning/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/sjenning/kubernetes/events","assignees_url":"https://api.github.com/repos/sjenning/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/sjenning/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/sjenning/kubernetes/tags","blobs_url":"https://api.github.com/repos/sjenning/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sjenning/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sjenning/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/sjenning/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sjenning/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/sjenning/kubernetes/languages","stargazers_url":"https://api.github.com/repos/sjenning/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/sjenning/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/sjenning/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/sjenning/kubernetes/subscription","commits_url":"https://api.github.com/repos/sjenning/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/sjenning/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/sjenning/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/sjenning/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/sjenning/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/sjenning/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sjenning/kubernetes/merges","archive_url":"https://api.github.com/repos/sjenning/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sjenning/kubernetes/downloads","issues_url":"https://api.github.com/repos/sjenning/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/sjenning/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/sjenning/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/sjenning/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sjenning/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/sjenning/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/sjenning/kubernetes/deployments","created_at":"2016-01-18T18:11:23Z","updated_at":"2016-01-18T18:11:34Z","pushed_at":"2016-10-07T14:39:15Z","git_url":"git://github.com/sjenning/kubernetes.git","ssh_url":"git@github.com:sjenning/kubernetes.git","clone_url":"https://github.com/sjenning/kubernetes.git","svn_url":"https://github.com/sjenning/kubernetes","homepage":"http://kubernetes.io","size":329329,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"59f929b6366f5a2073a799d0ec9e21ff0e139124","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2016-10-07T18:12:22Z","pushed_at":"2016-10-07T19:13:06Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":580627,"stargazers_count":17375,"watchers_count":17375,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5634,"mirror_url":null,"open_issues_count":4867,"forks":5634,"open_issues":4867,"watchers":17375,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32577"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/32577"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/32577"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/32577/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32577/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32577/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/cce6a8696e75b3ebea8b0f137f51eed5b625d537"}}}}
{"actor":{"display_login":"vishh"}}