Message ID | 20210105225817.1036378-2-shy828301@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=VHsx=GI=kvack.org=owner-linux-mm@kernel.org> 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=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 0EA50C433E6 for <linux-mm@archiver.kernel.org>; Tue, 5 Jan 2021 22:58:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 80FD1230FE for <linux-mm@archiver.kernel.org>; Tue, 5 Jan 2021 22:58:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80FD1230FE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 208B48D00BA; Tue, 5 Jan 2021 17:58:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 11BFE8D006E; Tue, 5 Jan 2021 17:58:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EB27C8D00BA; Tue, 5 Jan 2021 17:58:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0185.hostedemail.com [216.40.44.185]) by kanga.kvack.org (Postfix) with ESMTP id CEDD78D006E for <linux-mm@kvack.org>; Tue, 5 Jan 2021 17:58:47 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 930E13629 for <linux-mm@kvack.org>; Tue, 5 Jan 2021 22:58:47 +0000 (UTC) X-FDA: 77673237894.27.death81_400619d274dc Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin27.hostedemail.com (Postfix) with ESMTP id 731B63D668 for <linux-mm@kvack.org>; Tue, 5 Jan 2021 22:58:47 +0000 (UTC) X-HE-Tag: death81_400619d274dc X-Filterd-Recvd-Size: 4171 Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by imf39.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Tue, 5 Jan 2021 22:58:46 +0000 (UTC) Received: by mail-pj1-f47.google.com with SMTP id j13so560501pjz.3 for <linux-mm@kvack.org>; Tue, 05 Jan 2021 14:58:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Mj1bmEJCVqZDq37aTsMsDn48932Q6fF96CwsNmqPO6Y=; b=l6guGeiSaE0IEqfjMtbVN8hAc5PaSHcmwc2Y6oOyoPTiVmnmk9Wx6MU+/PVi/no+ZU +apFzZVxFT610tTpUoGUX5vgHyQl3fREP+WpyNVSMyACT9L+ZVHYHj+CLnqppGGTpYR4 2wP8iUH0o6tL+ZEDMbLzPQZ5+Kpwd/i91VANPhLDiFfJ06vHmA0IX4GCc8sBFZvapm4L fhf49mYPMhO+MWVmOkOxbB8+qDAAtFvZwTDZkZMMGlGB6l+GyFlkGbUfPdpAxZ+ykl3i RAwSsDwleMbC+c2ggvzF0c15zYCuLcfCxuUyci/TunRZerjCYvx1QMtuliHKucC4CLUO ioGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Mj1bmEJCVqZDq37aTsMsDn48932Q6fF96CwsNmqPO6Y=; b=jzaJiOd6GisMuCOt8ZzGjHRepBVt1eN/jB0FYTDe0sQPqsI2s/Er2XhyjzQnTVqDGf uiZdKJZ5PxlKviYxLFiGuf84X/M+uKmF+p9TprWD7tsZB+w3U+dFMWmVFvfQwtVkfMrX oCRzTdjgRR/KgATn9buNpHEHbLReejQDvGLdrbiFINNqtjcVJSFca5O0EWysVL7V7QnN ha7E5r/pkrTnJ00sxYuSyne4HbqJphfTxwryBMqSp9eIO9noIQ52CCPj4d+HPe1Mn8bU 44Dj35rJ2Yy4qdGSqmmW9TN0Kb11s7KJKbV3jgtAlmdvANp4xErXUqQAnCv2Y5XC6Fby kPXw== X-Gm-Message-State: AOAM533LQZ7BDhjF2/UyWlRZLrKLtDlaGT9lbrJRRXRZ3kv4XM1rS9PA wYIUT5wLapDY0CSusprOO7I= X-Google-Smtp-Source: ABdhPJx3sjraPJbb4sb5z508wNnRUCdbSzdgaBWAdmfFb6aWqcHCf9wNz7r8PfSC5ak1vdWUIP+JhQ== X-Received: by 2002:a17:902:bcc6:b029:db:e257:9050 with SMTP id o6-20020a170902bcc6b02900dbe2579050mr1692327pls.22.1609887526027; Tue, 05 Jan 2021 14:58:46 -0800 (PST) Received: from localhost.localdomain (c-73-93-239-127.hsd1.ca.comcast.net. [73.93.239.127]) by smtp.gmail.com with ESMTPSA id fw12sm244233pjb.43.2021.01.05.14.58.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jan 2021 14:58:45 -0800 (PST) From: Yang Shi <shy828301@gmail.com> To: guro@fb.com, ktkhai@virtuozzo.com, shakeelb@google.com, david@fromorbit.com, hannes@cmpxchg.org, mhocko@suse.com, akpm@linux-foundation.org Cc: shy828301@gmail.com, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [v3 PATCH 01/11] mm: vmscan: use nid from shrink_control for tracepoint Date: Tue, 5 Jan 2021 14:58:07 -0800 Message-Id: <20210105225817.1036378-2-shy828301@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210105225817.1036378-1-shy828301@gmail.com> References: <20210105225817.1036378-1-shy828301@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: <linux-mm.kvack.org> |
Series |
Make shrinker's nr_deferred memcg aware
|
expand
|
diff --git a/mm/vmscan.c b/mm/vmscan.c index 257cba79a96d..cb24ef952efc 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -535,7 +535,7 @@ static unsigned long do_shrink_slab(struct shrink_control *shrinkctl, else new_nr = atomic_long_read(&shrinker->nr_deferred[nid]); - trace_mm_shrink_slab_end(shrinker, nid, freed, nr, new_nr, total_scan); + trace_mm_shrink_slab_end(shrinker, shrinkctl->nid, freed, nr, new_nr, total_scan); return freed; }
The tracepoint's nid should show what node the shrink happens on, the start tracepoint uses nid from shrinkctl, but the nid might be set to 0 before end tracepoint if the shrinker is not NUMA aware, so the traceing log may show the shrink happens on one node but end up on the other node. It seems confusing. And the following patch will remove using nid directly in do_shrink_slab(), this patch also helps cleanup the code. Signed-off-by: Yang Shi <shy828301@gmail.com> --- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)