The patch titled memcg-prevent-endless-loop-when-charging-huge-pages-to-near-limit-group-fix-fix has been added to the -mm tree. Its filename is memcg-prevent-endless-loop-when-charging-huge-pages-to-near-limit-group-fix-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: memcg-prevent-endless-loop-when-charging-huge-pages-to-near-limit-group-fix-fix From: Johannes Weiner <hannes@xxxxxxxxxxx> *oink* Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> Cc: Minchan Kim <minchan.kim@xxxxxxxxx> Cc: Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> Cc: Daisuke Nishimura <nishimura@xxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memcontrol.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff -puN mm/memcontrol.c~memcg-prevent-endless-loop-when-charging-huge-pages-to-near-limit-group-fix-fix mm/memcontrol.c --- a/mm/memcontrol.c~memcg-prevent-endless-loop-when-charging-huge-pages-to-near-limit-group-fix-fix +++ a/mm/memcontrol.c @@ -1111,6 +1111,14 @@ static bool mem_cgroup_check_under_limit return false; } +/** + * mem_cgroup_check_margin - check if the memory cgroup allows charging + * @mem: memory cgroup to check + * @bytes: the number of bytes the caller intends to charge + * + * Returns a boolean value on whether @mem can be charged @bytes or + * whether this would exceed the limit. + */ static bool mem_cgroup_check_margin(struct mem_cgroup *mem, unsigned long bytes) { if (!res_counter_check_margin(&mem->res, bytes)) _ Patches currently in -mm which might be from hannes@xxxxxxxxxxx are origin.patch memcg-prevent-endless-loop-when-charging-huge-pages.patch memcg-prevent-endless-loop-when-charging-huge-pages-to-near-limit-group.patch memcg-prevent-endless-loop-when-charging-huge-pages-to-near-limit-group-fix.patch memcg-prevent-endless-loop-when-charging-huge-pages-to-near-limit-group-fix-fix.patch memcg-never-oom-when-charging-huge-pages.patch memcg-fix-event-counting-breakage-by-recent-thp-update.patch epoll-fix-compiler-warning-and-optimize-the-non-blocking-path-fix.patch memcg-res_counter_read_u64-fix-potential-races-on-32-bit-machines.patch memcg-fix-ugly-initialization-of-return-value-is-in-caller.patch crash_dump-export-is_kdump_kernel-to-modules-consolidate-elfcorehdr_addr-setup_elfcorehdr-and-saved_max_pfn.patch crash_dump-export-is_kdump_kernel-to-modules-consolidate-elfcorehdr_addr-setup_elfcorehdr-and-saved_max_pfn-fix.patch crash_dump-export-is_kdump_kernel-to-modules-consolidate-elfcorehdr_addr-setup_elfcorehdr-and-saved_max_pfn-fix-fix.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html