Re: mm: mkfs.ext4 invoked oom-killer on i386 - pagecache_get_page

From: Andrew Morton
Date: Fri May 01 2020 - 16:58:10 EST


On Fri, 1 May 2020 18:08:28 +0530 Naresh Kamboju <naresh.kamboju@xxxxxxxxxx> wrote:

> mkfs -t ext4 invoked oom-killer on i386 kernel running on x86_64 device
> and started happening on linux -next master branch kernel tag next-20200430
> and next-20200501. We did not bisect this problem.

It would be wonderful if you could do so, please. I can't immediately see
any MM change in this area which might cause this.

> metadata
> git branch: master
> git repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git commit: e4a08b64261ab411b15580c369a3b8fbed28bbc1
> git describe: next-20200430
> make_kernelversion: 5.7.0-rc3
> kernel-config:
> https://builds.tuxbuild.com/1YrE_XUQ6odA52tSBM919w/kernel.config
>
> Steps to reproduce: (always reproducible)

Reproducibility helps!

> oom-killer: gfp_mask=0x101cc0(GFP_USER|__GFP_WRITE), order=0,

> [ 34.793430] pagecache_get_page+0xae/0x260

> [ 34.897923] active_anon:5366 inactive_anon:2172 isolated_anon:0
> [ 34.897923] active_file:4151 inactive_file:212494 isolated_file:0
> [ 34.897923] unevictable:0 dirty:16505 writeback:6520 unstable:0

> [ 34.987678] Normal free:3948kB min:7732kB low:8640kB high:9548kB
> reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB
> active_file:1096kB inactive_file:786400kB unevictable:0kB
> writepending:65432kB present:884728kB managed:845576kB mlocked:0kB
> kernel_stack:1112kB pagetables:0kB bounce:0kB free_pcp:2908kB
> local_pcp:500kB free_cma:0kB

ZONE_NORMAL has a huge amount of clean pagecache stuck on the
inactive list, not being reclaimed.