Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2706431pxa; Tue, 25 Aug 2020 00:28:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2tAYiECEaccJx7TcTtydrl8HDooJ8LLlkOEDH6HREliNeX1KHkjQwFcnUiX7OLqKKie1L X-Received: by 2002:a05:6402:74f:: with SMTP id p15mr7361699edy.377.1598340491734; Tue, 25 Aug 2020 00:28:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598340491; cv=none; d=google.com; s=arc-20160816; b=jbUNVEFP356PdLqkdkEf+QUARVn+zKg18Fmk9R3spgrZeBcXLUoHF7LUeCII7xULDH eGgARPA+qfuKupsHSbTkIzWGL0A/iluxRSyin1DyRl2oW6n/HU/K2KPqrvVDzc3Z5FCx m5090IzqF1ucbVk2Nl1MPHYKfd1EgE0CpaGnJbLDAcLRO/ZQ0DN1cuf9rJxczXedukwb OCiVYJtrXxE48nVRwdUNeikHPNCdsyfmco8kxHRoFetD+vid58ATluyD+LwIN1TGdPcs hpSxDZZd6l7j23fgTZ7l0kPHp+8tMKFJQC2M89ceMI8NVAiMna9lVVsEXmX1foZZvbK2 uvNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=8qi6JmDC51hMJRcg5hYbbseZKUxjZeiciCopcctAfmE=; b=uE3qLJuiTMVaYUhExjV0PTPJzuky3ZW4DwgT95kn1jGOw4CO5sSIF78hQoUXAfyeY/ 6pIi+MxWvwo3XHyrelabyae5DA5BAZsBU4WyJdBOvyOAhYE6GxFaYYsG/krW2Tg2hTBX bYqVIdU2FQrT7kOU4gSDyzptWavt+8YSONzy6AT1j8kKcOnwJ8wFWsuIjBZmKXlpFBNn f0UD2ScKiSsACnuvoHfm5h4QJ0lCHX2YQ/5OJ5hLGbMqeXbsgtwrRzMdNky4ykYVC5F8 zH/eXPb8XRtOSvIsZMxJDK7PiIVwSovS2EGAGSIgM+uvtEtjIfwnTUDX+UbZ0uZB6Ht7 5MQg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a3si8307654ejc.80.2020.08.25.00.27.48; Tue, 25 Aug 2020 00:28:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729446AbgHYHZl (ORCPT + 99 others); Tue, 25 Aug 2020 03:25:41 -0400 Received: from mx2.suse.de ([195.135.220.15]:55654 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729322AbgHYHZk (ORCPT ); Tue, 25 Aug 2020 03:25:40 -0400 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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