Skip to content

memcg remove pre_destroy

KAMEZAWA Hiroyuki cgroups linux-mm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 32 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7res_counter: add a function res_counter_move_parent().include/linux/res_counter.h kernel/res_counter.c+16 -010 replies
2/7memcg: move charge to parent only when necessary.mm/memcontrol.c+32 -72 replies
3/7memcg: move charges to root at rmdir()Documentation/cgroups/memory.txt mm/memcontrol.c+16 -282 replies
4/7memcg: remove 'uncharge' argument from mem_cgroup_move_account()mm/memcontrol.c+12 -172 replies
5/7memcg: divide force_empty into 2 functions, avoid memory reclaim at rmdirmm/memcontrol.c+29 -303 replies
6/7memcg: remove pre_destroy()mm/memcontrol.c+22 -303 replies
7/7memcg: remove drain_all_stock_sync.mm/memcontrol.c+2 -201 reply

Reviews trailers per patch

1 of 7 patches has a Reviewed-by or Acked-by.

PatchGlauber Costa
1/7
2/7
3/7
4/7
5/7
6/7
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 0/7] memcg remove pre_destroy

In recent discussion, Tejun Heo, cgroup maintainer, has a plan to remove ->pre_destroy(). And now, in cgroup tree, pre_destroy() failure cause WARNING.

By pre_destroy(), rmdir of cgroup can return -EBUSY or some error. It makes cgroup complicated and unstable. I said O.K. to remove it and this patch is modification for memcg.

One of problem in current implementation is that memcg moves all charges to parent in pre_destroy(). At doing so, if use_hierarchy=0, pre_destroy() may hit parent's limit and may return -EBUSY. To fix this problem, this patch changes behavior of rmdir() as

- if use_hierarchy=0, all remaining charges will go to root cgroup.
- if use_hierarchy=1, all remaining charges will go to the parent.

By this, rmdir failure will not be caused by parent's limitation. And I think this meets meaning of use_hierarchy.

This series does
- add above change of behavior
- use workqueue to move all pages to parent
- remove unnecessary codes.

I'm sorry if my reply is delayed, I'm not sure I can have enough time in this weekend. Any comments are welcomed.

Thanks,
-Kame

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>