Upstream: no
Tested: Tested on Devcloud
Kdump environment disables memory cgroup so related helpers will all
return NULL. Abort early in such case.
Signed-off-by: Kairui Song <kasong@tencent.com>
Upstream: no
Make the memcg extention structs get allocated dynamically. This have
another benifit, lruvec is per-cpu data but our EMM aggregators and
workers are single threaded, by moving these data out of per-cpu data it
avoids the possibility of causing false-share.
css_free is lazy and not protected by cgroup_mutex, css_released is
proteprotected by cgroup_mutex which we use to protect emm_memcg_ops as
well. Doing a few of kfree in css_released should be OK.
Signed-off-by: Kairui Song <kasong@tencent.com>