From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CBD0C433DF for ; Tue, 25 Aug 2020 07:25:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DCCAF20782 for ; Tue, 25 Aug 2020 07:25:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DCCAF20782 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1E2A86B009E; Tue, 25 Aug 2020 03:25:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 192FE6B00A1; Tue, 25 Aug 2020 03:25:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 083268E0011; Tue, 25 Aug 2020 03:25:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0146.hostedemail.com [216.40.44.146]) by kanga.kvack.org (Postfix) with ESMTP id E6D0B6B009E for ; Tue, 25 Aug 2020 03:25:41 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id A7F583629 for ; Tue, 25 Aug 2020 07:25:41 +0000 (UTC) X-FDA: 77188256082.12.girls54_34002612705a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id A065418016299 for ; Tue, 25 Aug 2020 07:25:40 +0000 (UTC) X-HE-Tag: girls54_34002612705a X-Filterd-Recvd-Size: 2920 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Tue, 25 Aug 2020 07:25:40 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 92205AC24; Tue, 25 Aug 2020 07:26:09 +0000 (UTC) Date: Tue, 25 Aug 2020 09:25:38 +0200 From: Michal Hocko To: Alex Shi Cc: Qian Cai , akpm@linux-foundation.org, Johannes Weiner , Vladimir Davydov , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, nao.horiguchi@gmail.com, osalvador@suse.de, mike.kravetz@oracle.com Subject: Re: [Resend PATCH 1/6] mm/memcg: warning on !memcg after readahead page charged Message-ID: <20200825072538.GB22869@dhcp22.suse.cz> References: <1597144232-11370-1-git-send-email-alex.shi@linux.alibaba.com> <20200820145850.GA4622@lca.pw> <20200821080127.GD32537@dhcp22.suse.cz> <20200821123934.GA4314@lca.pw> <20200821134842.GF32537@dhcp22.suse.cz> <20200824151013.GB3415@dhcp22.suse.cz> <12425e06-38ce-7ff4-28ce-b0418353fc67@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <12425e06-38ce-7ff4-28ce-b0418353fc67@linux.alibaba.com> X-Rspamd-Queue-Id: A065418016299 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue 25-08-20 09:25:01, Alex Shi wrote: > reproduce using our linux-mm random bug collection on NUMA systems. > >> > >> OK, I must have missed that this was on ppc. The order makes more sense > >> now. I will have a look at this next week. > > > > OK, so I've had a look and I know what's going on there. The > > move_pages12 is migrating hugetlb pages. Those are not charged to any > > memcg. We have completely missed this case. There are two ways going > > around that. Drop the warning and update the comment so that we do not > > forget about that or special case hugetlb pages. > > > > I think the first option is better. > > > > > Hi Michal, > > Compare to ignore the warning which is designed to give, seems addressing > the hugetlb out of charge issue is a better solution, otherwise the memcg > memory usage is out of control on hugetlb, is that right? Hugetlb memory is out of memcg scope deliberately. This is not a reclaimable memory and something that can easily get out of control. The memory is preallocated and overcommit is strictly controlled as well. We have a dedicated hugetlb cgroup controller to offer a better control of the preallocated pool distribution. Anyway this just shows that there are more subtle cases where a page with no memcg can hit some common paths so the patch is clearly not ready. I should have realized that when giving my ack but same as you I got misled by the existing comment. -- Michal Hocko SUSE Labs