Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1227230pxa; Thu, 13 Aug 2020 04:02:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/Cv5STQxzRNrz2FhjAmK7jNncBQSEFPJeFPWTRJjqQL5Ensov789xkNx+MmSfBDl9GWGb X-Received: by 2002:aa7:d607:: with SMTP id c7mr4078569edr.184.1597316562162; Thu, 13 Aug 2020 04:02:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597316562; cv=none; d=google.com; s=arc-20160816; b=nn/Zq3yfhftrCIatD7okvI5IdeWRtDIednwlXd4X8/tP0AdckdAKNV9ochvVOJMWJ3 QUK0kyvzK34YrYuHXZTCtiPDk5IKXg8MkmYmYn1623vLbz97OTkbgNiDZwdygIv3EI91 q3hXM5+RfCGhzA6c603nP8DmGNqnCVHo3J5l5dx72XRAsa5FPKnS0z0qTAw5HE7xa1Bb FCW/avWlIaIQOJQflHQzix42Lj9STSZNXgstHNZ5inNU9tbLU5JNeLDdd9kv+fLyfQ/7 YM5BGkP7f2NEE+KWN5o34sZR7Cuc3ZvNoJUCNChclHijoAqSmUtF8fU0FPNy0r0fGEZm hQUQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=X4yXJ9Nqh+/iFIm/rk4x8H27XVTCZVaTwdjeL4cRNqE=; b=VaDUtBtwNk2dEKM//tZAYXbisynesCvs6fdtMAZNc8B8TpZ04omoUKOG601qmjS9CH f5LMMmRg3GBaxqeZrDBD71DuEVcQi5dkuLO1/Ry6Fo5vSMtCF8Af0N/eA5U1kAKL6dXx 8cA4/BKdS/CP780vXKHK5qyIqmsm3hxw2c+zQOvZ3KfqtrpkTPtOzbl0nCsaHPBtU/i8 ADb+EKmpUGYQxRXRFcyn7CnYFiHczOT0NmYfnQDUbaKMyALXsO3h9zkvWwb3I+RdsB3y lo+5eMhJd1OKYnVrhE3iQiix+PWsKQRr5u61XtUxhayeVXfCU5rZzKjxeE3VpRLJM3y7 ++9A== 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 dp1si4652314ejc.200.2020.08.13.04.02.18; Thu, 13 Aug 2020 04:02:42 -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 S1726635AbgHMLBS (ORCPT + 99 others); Thu, 13 Aug 2020 07:01:18 -0400 Received: from mx2.suse.de ([195.135.220.15]:51836 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726072AbgHMLBQ (ORCPT ); Thu, 13 Aug 2020 07:01:16 -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 9A84FB6A3; Thu, 13 Aug 2020 11:01:25 +0000 (UTC) Date: Thu, 13 Aug 2020 13:01:02 +0200 From: Michal Hocko To: Alex Shi Cc: akpm@linux-foundation.org, Johannes Weiner , Vladimir Davydov , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [Resend PATCH 2/6] mm/memcg: remove useless check on page->mem_cgroup Message-ID: <20200813110102.GF9477@dhcp22.suse.cz> References: <1597144232-11370-1-git-send-email-alex.shi@linux.alibaba.com> <1597144232-11370-2-git-send-email-alex.shi@linux.alibaba.com> <20200811113008.GK4793@dhcp22.suse.cz> <776b0e6f-4129-9fb9-0f66-47757cf320d5@linux.alibaba.com> <20200811135626.GL4793@dhcp22.suse.cz> <0b5e1ac3-c9c7-35e9-2661-b58430314d0a@linux.alibaba.com> <20200813062049.GA9477@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 13-08-20 17:45:19, Alex Shi wrote: > > > 在 2020/8/13 下午2:20, Michal Hocko 写道: > > On Wed 12-08-20 11:25:53, Alex Shi wrote: > >> >From 999b0fe5fc65865c3b59ff28500d45572a4a9570 Mon Sep 17 00:00:00 2001 > >> From: Alex Shi > >> Date: Wed, 5 Aug 2020 21:02:30 +0800 > >> Subject: [PATCH 2/6] mm/memcg: bail out early from swap accounting when memcg > >> is disabled > >> > >> If we disabled memcg by cgroup_disable=memory, page->memcg will be NULL > >> and so the charge is skipped and that will trigger a warning like below. > >> Let's return from the funcs earlier. > >> > >> ---[ end trace f1f34bfc3b32ed2f ]--- > >> anon flags:0x5005b48008000d(locked|uptodate|dirty|swapbacked) > >> raw: 005005b48008000d dead000000000100 dead000000000122 ffff8897c7c76ad1 > >> raw: 0000000000000022 0000000000000000 0000000200000000 0000000000000000 > >> page dumped because: VM_WARN_ON_ONCE_PAGE(!memcg) > > > > Yes this is better. It would be even more informative if you added the > > backtrace. > > The stack is a bit long. This doesn't matter. It is informative and potentially useful for future reference. Thanks! -- Michal Hocko SUSE Labs