From patchwork Mon Dec 14 22:37:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 11973287 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 584FBC2BB40 for ; Mon, 14 Dec 2020 22:37:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DDA9320731 for ; Mon, 14 Dec 2020 22:37:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DDA9320731 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 7047D6B005D; Mon, 14 Dec 2020 17:37:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6B4DA6B0068; Mon, 14 Dec 2020 17:37:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5A9606B006C; Mon, 14 Dec 2020 17:37:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0184.hostedemail.com [216.40.44.184]) by kanga.kvack.org (Postfix) with ESMTP id 403F36B005D for ; Mon, 14 Dec 2020 17:37:44 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id E7FBA363C for ; Mon, 14 Dec 2020 22:37:43 +0000 (UTC) X-FDA: 77593351206.23.tramp88_5e116582741e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id C67D337604 for ; Mon, 14 Dec 2020 22:37:43 +0000 (UTC) X-HE-Tag: tramp88_5e116582741e X-Filterd-Recvd-Size: 4119 Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Mon, 14 Dec 2020 22:37:43 +0000 (UTC) Received: by mail-pj1-f67.google.com with SMTP id lj6so5857273pjb.0 for ; Mon, 14 Dec 2020 14:37:43 -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=JK0RA9az0H36swxW1b9xoMtxd77STDT0bYjsifkqcRo=; b=F/5xiYvM5I0EZ1qGc6HKxC5DbVx8mFwcf3JfwHFHN3kcB1Qk1grQjgn8+kQBdPQSM1 alxCOT2x5/FoazJu6JQkdG4GitO3MZsQEYSYtsjaQ1/F2TyZ2E92jXroDuFdytjhvKmO dUMJHFDGxiZ2cM0lQ8CMcNHXBU+sBDQMm1b8ZrivVoAmViSUsIHutgMvOtj9kgkl7msA r6T7n+glgZi4S5CqtQQj/F+wqQ5y/4lc6pyB3xHEAzlcLA6PXgtMgM8YYxEhmnF6oWq1 NSaUa2RVk8XMOmsEyNxFja/5Ndj8gKg6XpSZHHj7mV5zYjfZg4HN/c8FLUq3S1DFx9Fl I8Fg== 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=JK0RA9az0H36swxW1b9xoMtxd77STDT0bYjsifkqcRo=; b=RoCtW7pEC1Z5gVPX87EfJ/tKFnb+BS//iGUzIFz8apfaYe6jnzlymnYmIakHbkHqRK dbzA4ryd/gks0/DLFtXslU0O9d/rQbF2bVcf+vky9D9S9I0D/zNMSKwvXqvhxwmeSRjm PlyVTSnJY1otxTWhWsEmbighEeSXFP44ckKSlpZU6fVyFPNf9sEY5Fgoyd5m8UPcEvRm DRnJb8EEJGN5YffxtCtOrb2UprIL0Xx4CyvbXuG3eHyJgGuARB9GvhQUKxb9mcptw4yf 2vgvEkXTwxCWObx/4aqdfqMDH8lgZ8QZ3JP51qy5SzjMy8bJV8Z2a1WueA01xww3/Iz3 gFOA== X-Gm-Message-State: AOAM533+0bVfpiEafZfelZDia34N6xC02fsC2e8bXXbJ3iieoj7ab0Fk 7HVwrOKhzSP4rj3ZF5EMM5Y= X-Google-Smtp-Source: ABdhPJyD+/0faNVKRhmAJZsCjeKks1k242JFR+RcoNYxKcHgo8xWCG5eLgy8LarRv/qmPAu9krxmMw== X-Received: by 2002:a17:90a:5581:: with SMTP id c1mr6843745pji.86.1607985462413; Mon, 14 Dec 2020 14:37:42 -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 d4sm20610758pfo.127.2020.12.14.14.37.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Dec 2020 14:37:41 -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: [v2 PATCH 1/9] mm: vmscan: use nid from shrink_control for tracepoint Date: Mon, 14 Dec 2020 14:37:14 -0800 Message-Id: <20201214223722.232537-2-shy828301@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201214223722.232537-1-shy828301@gmail.com> References: <20201214223722.232537-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 7b4e31eac2cf..48c06c48b97e 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -537,7 +537,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; }