From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua0-f199.google.com (mail-ua0-f199.google.com [209.85.217.199]) by kanga.kvack.org (Postfix) with ESMTP id 8003B6B0269 for ; Wed, 18 Jul 2018 13:58:20 -0400 (EDT) Received: by mail-ua0-f199.google.com with SMTP id m26-v6so1816818uaq.18 for ; Wed, 18 Jul 2018 10:58:20 -0700 (PDT) Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id m2-v6sor1706782vki.15.2018.07.18.10.58.19 for (Google Transport Security); Wed, 18 Jul 2018 10:58:19 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20180717212307.d6803a3b0bbfeb32479c1e26@linux-foundation.org> <20180718104230.GC1431@dhcp22.suse.cz> From: Bruce Merry Date: Wed, 18 Jul 2018 19:58:18 +0200 Message-ID: Subject: Re: Showing /sys/fs/cgroup/memory/memory.stat very slow on some machines Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Shakeel Butt Cc: Michal Hocko , Andrew Morton , LKML , Linux MM , Johannes Weiner , Vladimir Davydov On 18 July 2018 at 19:48, Shakeel Butt wrote: > On Wed, Jul 18, 2018 at 10:40 AM Bruce Merry wrote: >> > Yes, very easy to produce zombies, though I don't think kernel >> > provides any way to tell how many zombies exist on the system. >> > >> > To create a zombie, first create a memcg node, enter that memcg, >> > create a tmpfs file of few KiBs, exit the memcg and rmdir the memcg. >> > That memcg will be a zombie until you delete that tmpfs file. >> >> Thanks, that makes sense. I'll see if I can reproduce the issue. Do >> you expect the same thing to happen with normal (non-tmpfs) files that >> are sitting in the page cache, and/or dentries? >> > > Normal files and their dentries can get reclaimed while tmpfs will > stick and even if the data of tmpfs goes to swap, the kmem related to > tmpfs files will remain in memory. Sure, page cache and dentries are reclaimable given memory pressure. These machines all have more memory than they need though (64GB+) and generally don't come under any memory pressure. I'm just wondering if the behaviour we're seeing can be explained as a result of a lot of dentries sticking around (because there is no memory pressure) and in turn causing a lot of zombie cgroups to stay present until something forces reclamation of dentries. Cheers Bruce -- Bruce Merry Senior Science Processing Developer SKA South Africa