Re: [rfc patch-rt] radix-tree: Partially disable memcg accounting in radix_tree_node_alloc()

From: Mike Galbraith
Date: Fri Jan 06 2017 - 05:54:10 EST


On Fri, 2017-01-06 at 09:55 +0100, Michal Hocko wrote:
> On Fri 06-01-17 09:13:23, Mike Galbraith wrote:
> > radix-tree: Partially disable memcg accounting in radix_tree_node_alloc()
> >
> > Having no preload, which turns accounting off for non-rt kernels, trying to
> > allocate coming from shmem_fault() when memcg is full sends us scurrying off
> > to pagefault_out_of_memory(), with dramatic (usually terminal) consequences.
> > LTP's madvise06 testcase triggers this quite well, and per gitk, the below
> > was the beginning of RT memcg woes.
> >
> > 58e698af4c63 radix-tree: account radix_tree_node to memory cgroup
> >
> > Turn memcg accounting off for RT in the problematic path.
>
> I am really wondering why this is RT specific and the non RT kernels
> doesn't have any problem.

For all I know, there may be a scenario for non-RT to explode, but the
madvise06 testcase that thoroughly nails RT ain't it.

-Mike