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=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,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 47756C433DF for ; Mon, 24 Aug 2020 15:10:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0E929206F0 for ; Mon, 24 Aug 2020 15:10:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E929206F0 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 96CE36B000D; Mon, 24 Aug 2020 11:10:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 91CBF6B000E; Mon, 24 Aug 2020 11:10:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 85A866B0010; Mon, 24 Aug 2020 11:10:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0251.hostedemail.com [216.40.44.251]) by kanga.kvack.org (Postfix) with ESMTP id 6EA5E6B000D for ; Mon, 24 Aug 2020 11:10:46 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 1113F33CD for ; Mon, 24 Aug 2020 15:10:46 +0000 (UTC) X-FDA: 77185799292.30.sleep96_520a45f27054 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id C7CFB1801453D for ; Mon, 24 Aug 2020 15:10:18 +0000 (UTC) X-HE-Tag: sleep96_520a45f27054 X-Filterd-Recvd-Size: 3336 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Mon, 24 Aug 2020 15:10:18 +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 17128AB8B; Mon, 24 Aug 2020 15:10:47 +0000 (UTC) Date: Mon, 24 Aug 2020 17:10:13 +0200 From: Michal Hocko To: Qian Cai Cc: Alex Shi , 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: <20200824151013.GB3415@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200821134842.GF32537@dhcp22.suse.cz> X-Rspamd-Queue-Id: C7CFB1801453D X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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 Fri 21-08-20 15:48:44, Michal Hocko wrote: > On Fri 21-08-20 08:39:37, Qian Cai wrote: > > On Fri, Aug 21, 2020 at 10:01:27AM +0200, Michal Hocko wrote: > > > On Thu 20-08-20 10:58:51, Qian Cai wrote: > > > > On Tue, Aug 11, 2020 at 07:10:27PM +0800, Alex Shi wrote: > > > > > Since readahead page is charged on memcg too, in theory we don't have to > > > > > check this exception now. Before safely remove them all, add a warning > > > > > for the unexpected !memcg. > > > > > > > > > > Signed-off-by: Alex Shi > > > > > Acked-by: Michal Hocko > > > > > > > > This will trigger, > > > > > > Thanks for the report! > > > > > > > [ 1863.916499] LTP: starting move_pages12 > > > > [ 1863.946520] page:000000008ccc1062 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1fd3c0 > > > > [ 1863.946553] head:000000008ccc1062 order:5 compound_mapcount:0 compound_pincount:0 > > > > > > Hmm, this is really unexpected. How did we get order-5 page here? Is > > > this some special mappaing that sys_move_pages should just ignore? > > > > Well, I thought everybody should be able to figure out where to find the LTP > > tests source code at this stage to see what it does. Anyway, the test simply > > migrate hugepages while soft offlining, so order 5 is expected as that is 2M > > hugepage on powerpc (also reproduced on x86 below). It might be easier to > > 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. -- Michal Hocko SUSE Labs