From patchwork Wed Feb 3 17:20:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 12064881 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 90BA9C433E0 for ; Wed, 3 Feb 2021 17:21:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0281E64F92 for ; Wed, 3 Feb 2021 17:21:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0281E64F92 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 7CE1F6B0006; Wed, 3 Feb 2021 12:21:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 759776B006E; Wed, 3 Feb 2021 12:21:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 61EC56B0070; Wed, 3 Feb 2021 12:21:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0175.hostedemail.com [216.40.44.175]) by kanga.kvack.org (Postfix) with ESMTP id 4BEC76B0006 for ; Wed, 3 Feb 2021 12:21:02 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id F36101EE6 for ; Wed, 3 Feb 2021 17:21:01 +0000 (UTC) X-FDA: 77777621964.20.base88_2113353275d5 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id C3BE5180C07AB for ; Wed, 3 Feb 2021 17:21:01 +0000 (UTC) X-HE-Tag: base88_2113353275d5 X-Filterd-Recvd-Size: 4235 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Wed, 3 Feb 2021 17:21:01 +0000 (UTC) Received: by mail-pl1-f175.google.com with SMTP id a16so225666plh.8 for ; Wed, 03 Feb 2021 09:21:01 -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=e8sqXu20RyBiU7ffjtxKZyn1hplKw3RF/btW7z5M9C0=; b=uiAqYe9zRIwao70xWEqsolcMy5qOp5XT1CkCzEkGSrfTkNeETfjPePiwhrqoiX/Hn2 UOavcXyTgrdZfH48yY//YhXa5yEuXE7fd/4uUxVCzoNS0hSbSnum4Dc9CZYu2ujgEGWM xTqof9l1yC280ftthAa9tYTgOGkpQMYHbonO4fPIOIGQqzJ3mPgWlghGQTnP3SfVfDv1 BXEz9UDM8syq0QsG5aDoiYTyq8fdeA0/N46yfQhGd2QfTnRYuXNLCSFsxJkjMFeXEiHg qkdln4MmVoJveVwH3Ah+EtrY6o7JQqjzSr7tM/mKUG+Y4WMFPUiXmFCJiiPXPmasVw3u oeEg== 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=e8sqXu20RyBiU7ffjtxKZyn1hplKw3RF/btW7z5M9C0=; b=t+e/iFczHsQftwHYcSRgwkNS0uBmZx/0oS0KkADkitUYjN+f4Kc7P5Eg2YsMb1w18Y FW0o6hTpNDrvzmezUG7FP0Gbi5ioxbijoRVXrzMcH6NFBfs9hknwPhcQH42qgcuUbupk sfskA1CbNUmT+h8JvLSga3sKL2M/iy06WAVPxFO5EbGKV4sy2k9ssMXBfF7jRhtHgQYS QSxyF4zwcYSmyYMhD7sPpLY7UB6RODL1fZzuY/eq/21fvveW5M1Olq0tlIfh8OHxZfwV ubBtYUcdYMYoveWcwi6641Pz2zDik3EuGfVcwihRB9usrvnNk+fJiIaE6MMIm1ye8zEE sZMw== X-Gm-Message-State: AOAM533LhD8GccOewabVYrwKKSmLW9qZu4OVBSZ9SlzlQAPy4r0WSQS3 T9OPeN5ESfYpQn9xJPaDSC4= X-Google-Smtp-Source: ABdhPJzNg/Qk4hSC89YhvrVOZOzMTxGazWcO34MDK2tdtuW03bSsS4K8i6kUaDz/ixoBfWCHZvDIoA== X-Received: by 2002:a17:902:ab83:b029:e1:6021:dd19 with SMTP id f3-20020a170902ab83b02900e16021dd19mr4092689plr.40.1612372860288; Wed, 03 Feb 2021 09:21:00 -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 x21sm2368636pfn.100.2021.02.03.09.20.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Feb 2021 09:20:58 -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: [v6 PATCH 01/11] mm: vmscan: use nid from shrink_control for tracepoint Date: Wed, 3 Feb 2021 09:20:32 -0800 Message-Id: <20210203172042.800474-2-shy828301@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210203172042.800474-1-shy828301@gmail.com> References: <20210203172042.800474-1-shy828301@gmail.com> MIME-Version: 1.0 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 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. Acked-by: Vlastimil Babka Signed-off-by: Yang Shi Acked-by: Kirill Tkhai --- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index b1b574ad199d..b512dd5e3a1c 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; }