From patchwork Wed Mar 10 17:45:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 12128863 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=-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,URIBL_BLOCKED, 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 9AA04C433DB for ; Wed, 10 Mar 2021 17:47:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 41F2864F1D for ; Wed, 10 Mar 2021 17:47:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 41F2864F1D 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 D0CA08D01D5; Wed, 10 Mar 2021 12:47:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CE43F8D01ED; Wed, 10 Mar 2021 12:47:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BB70B8D01D5; Wed, 10 Mar 2021 12:47:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0253.hostedemail.com [216.40.44.253]) by kanga.kvack.org (Postfix) with ESMTP id A236F8D01D5 for ; Wed, 10 Mar 2021 12:47:18 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 5884F82499A8 for ; Wed, 10 Mar 2021 17:47:18 +0000 (UTC) X-FDA: 77904696156.16.8C70211 Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by imf03.hostedemail.com (Postfix) with ESMTP id 9AF1BC001C47 for ; Wed, 10 Mar 2021 17:46:15 +0000 (UTC) Received: by mail-pj1-f44.google.com with SMTP id kr3-20020a17090b4903b02900c096fc01deso7898541pjb.4 for ; Wed, 10 Mar 2021 09:46:17 -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=Xfk/5hVVyAFMJCQGuT9bj2CxEXYg++EdZvSN0UtrQ3I=; b=PuEAhbWT7AWcBZuIbjQlpcFqTlG4qBBXxKDlR3RNaDYY+O8Cuc1PJsqDEbN4ODv1qW WgkRvJEqkqUwjyt9mVwA4bjt6ilyzahwH3Rd8zrbkgvnRKJXyV/GZMJTR1/jfvMSEXAx XL+DZezGFRC3uyMWhkvVe0f5vledaguk3UoqU81EXYpTWVl4lzTH7Ab1Hc8tYXCuSQIT 7A0gVhxnpuNNfe1nn2lz0YRZvSAsn2Qy5yoQZUCUflax5lXpCNZ7Np6piNXmsstFi7ZJ 6+o9dHfCGvDbuoUFt3vb/VTRZy3AQiJSHFx6D4Hh0z+JmnKtHChQdb+Q7ocSD7SYtjKp 8PtA== 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=Xfk/5hVVyAFMJCQGuT9bj2CxEXYg++EdZvSN0UtrQ3I=; b=Tg2Tkc6hYakXfN4AgNZ1yeObYammIlRNUAJVaTG8WL9z31ym7TSyL0Qt/3P3QxiiDy Pgs5MRV4F2ly2G7fkyCvyceyoqHt2QfQ6nSr5vvxugs8Vh1GoYDmkZAWs6HaneKrF/R7 bZwxighgfvXLvYpf6bkuUKjDLIObRhDgU0WSqlfyl6Sb9obXTNEoEbhZf1+1KnH6dzSv ruZ4op9RhbHez3OFflMQdySp4PjnSOTm7haUpRf8Cv2C0yWGk3C7KuBOdNtRq8kLXM26 nVkQ+ha3qPtOSnuQklcse/racV/NxwKA1spBj8ziZG841aGvAnyW48Fu+m+iWCN9bKyi M9Bw== X-Gm-Message-State: AOAM533XT1CPY69fZJBWvISz3YSlh7UUej+qRsKGmbxVo88fGTN8Dkjd 4HJU5myK8ryAycgc2KbYyy8= X-Google-Smtp-Source: ABdhPJwo0iozQkYECa6RLbEYLMRLVPxCBqIC2dkepEvixp18RaJjtZQmoxcIUawP1U67Dep2wKAuoA== X-Received: by 2002:a17:902:e78e:b029:e4:84c1:51ce with SMTP id cp14-20020a170902e78eb02900e484c151cemr3827631plb.25.1615398376908; Wed, 10 Mar 2021 09:46:16 -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 d6sm145804pfq.109.2021.03.10.09.46.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 09:46:16 -0800 (PST) From: Yang Shi To: guro@fb.com, ktkhai@virtuozzo.com, vbabka@suse.cz, 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: [v9 PATCH 01/13] mm: vmscan: use nid from shrink_control for tracepoint Date: Wed, 10 Mar 2021 09:45:51 -0800 Message-Id: <20210310174603.5093-2-shy828301@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210310174603.5093-1-shy828301@gmail.com> References: <20210310174603.5093-1-shy828301@gmail.com> MIME-Version: 1.0 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 9AF1BC001C47 X-Stat-Signature: 1n1zedxtc7i7z6w51jb6sm6je139qttd Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf03; identity=mailfrom; envelope-from=""; helo=mail-pj1-f44.google.com; client-ip=209.85.216.44 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615398375-985105 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: 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 tracing 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. Acked-by: Vlastimil Babka Acked-by: Kirill Tkhai Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Signed-off-by: Yang Shi --- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 562e87cbd7a1..31d116ea59a9 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -536,7 +536,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; }