From patchwork Thu Jan 21 23:06:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 12037929 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,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 32E3EC433E6 for ; Thu, 21 Jan 2021 23:06:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D0EFE23A3A for ; Thu, 21 Jan 2021 23:06:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D0EFE23A3A 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 524436B0007; Thu, 21 Jan 2021 18:06:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4FD086B0008; Thu, 21 Jan 2021 18:06:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3777F6B000A; Thu, 21 Jan 2021 18:06:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0187.hostedemail.com [216.40.44.187]) by kanga.kvack.org (Postfix) with ESMTP id 19B0D6B0007 for ; Thu, 21 Jan 2021 18:06:40 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D71E95833 for ; Thu, 21 Jan 2021 23:06:39 +0000 (UTC) X-FDA: 77731318518.17.force32_040ba2c27567 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id BBF33180D0180 for ; Thu, 21 Jan 2021 23:06:39 +0000 (UTC) X-HE-Tag: force32_040ba2c27567 X-Filterd-Recvd-Size: 4182 Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by imf44.hostedemail.com (Postfix) with ESMTP for ; Thu, 21 Jan 2021 23:06:39 +0000 (UTC) Received: by mail-pj1-f45.google.com with SMTP id g15so2653081pjd.2 for ; Thu, 21 Jan 2021 15:06:39 -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=IYLQLgfEaFjCvTsN4FkoUtw26E88jjRQPD7HteqNuNs=; b=kARRAAcbOP7tKGGRgTCOE/cJLV13xKkJ0c1oFnpmAWeKv4vTgF50jpdPoiCWc7zED3 zFxIGFutxuUjX9mt3NGojgqhHPOpHdHTl+8A5G/i2ZjzdWLjzkF2RXIlhXgxe0kPT0vm osAWYJr9Nwjk62Gb14cKOHUZ6fSXXOT6PcEEIVcPBMy5f3sLgzrb3stfaCJEoyY1fZEA b1uoBb3o806Y1lxQHNio/zJAR2s8Md+JmVE0GKhEcHYe4M3InL8xCJSkxSQwOx3slhq7 tCITEPddUPDCwk5CsL7cpHXIJy7/avU4ue2hGXkL7+rr1m8DMPUC4o/ClZCmKyHfiw4W 7DAg== 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=IYLQLgfEaFjCvTsN4FkoUtw26E88jjRQPD7HteqNuNs=; b=jyXc/ajmGNZNbWO/Ahl83MuGbhpDqhDvH4u/iNN8NwZsAbjUs+PxZsbOmpDpSwo3/b Kx/rJQ5CrU5g2qXbH5I4FDA9T7upJuWOTUoZia27bAPX6lstpJJbjDPCCFo/CHdREH10 ZE15dv8Eg70VU6qqwv3dd8wYO2E+zIY5UKFbNVaoZ+q6RbfOmpoDMJo5l3ZW8hv2EOwT buK7Sw19IxPHaUq2KEaQaHNHpIt2BI6eGYqJONlnJzCAUvg8fQ+nKdc+JXWEIE9hNiPU N+ksrcRp3feKz6KJ6D9N/BiliQhzi+tvBuUjw0khHr6zPBbkJIRYCep+TQZSEyU6gZdO KjAA== X-Gm-Message-State: AOAM530W1WfbTDiIbRh8wPgVWYPbKUnz2wa/E2xeq6EGUfbuP++L40VX mSFY3PALHaj5juIyeNx8QjAS2AS2jHt8JvnT X-Google-Smtp-Source: ABdhPJyPQ/XS2KHGDobMo3FlC/5WrlmbHKGpggWZGVDAIeXc9VXIJvWPYdtc7vUBL0TqXt5+JT6KNg== X-Received: by 2002:a17:902:d2ca:b029:de:7845:c0b2 with SMTP id n10-20020a170902d2cab02900de7845c0b2mr2000876plc.11.1611270398396; Thu, 21 Jan 2021 15:06:38 -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 y16sm6722921pfb.83.2021.01.21.15.06.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jan 2021 15:06:37 -0800 (PST) From: Yang Shi 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: [v4 PATCH 01/11] mm: vmscan: use nid from shrink_control for tracepoint Date: Thu, 21 Jan 2021 15:06:11 -0800 Message-Id: <20210121230621.654304-2-shy828301@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210121230621.654304-1-shy828301@gmail.com> References: <20210121230621.654304-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. 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 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; }