From patchwork Wed Jan 27 23:33:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 12051209 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 27FBFC433DB for ; Wed, 27 Jan 2021 23:33:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B413161601 for ; Wed, 27 Jan 2021 23:33:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B413161601 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 53BD86B006E; Wed, 27 Jan 2021 18:33:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4C7D06B0070; Wed, 27 Jan 2021 18:33:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 319516B0071; Wed, 27 Jan 2021 18:33:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0028.hostedemail.com [216.40.44.28]) by kanga.kvack.org (Postfix) with ESMTP id 1DBE96B006E for ; Wed, 27 Jan 2021 18:33:55 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id DEE2F362E for ; Wed, 27 Jan 2021 23:33:54 +0000 (UTC) X-FDA: 77753159988.03.swing46_230f5b52759b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id C19C328A4E8 for ; Wed, 27 Jan 2021 23:33:54 +0000 (UTC) X-HE-Tag: swing46_230f5b52759b X-Filterd-Recvd-Size: 4123 Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Wed, 27 Jan 2021 23:33:54 +0000 (UTC) Received: by mail-pg1-f175.google.com with SMTP id b21so2810297pgk.7 for ; Wed, 27 Jan 2021 15:33:54 -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=fVhQu50/1FFP1iQUMRi/V3eB1Md5hlpC59mDgdwc9B945ZzyL9Z4ZZZkf2RbkBzriH 1mLmt6p+kp5wXoHXyAlA4agAYM2SuSZkBu0q6LOtkmwh/GEKP7+r1l+E3TFwvSjtfLQf MyUSx9MdvFruk85ZiEFPx9QlW2ZPAsN9sl1N4NZjFsn+hiwQtXEN6Jp5v9knQHzuYuwA GiJ3hpyCPKIDmCyyBsVdx6PgCFwFUiViqmBlKNCQ9ManwCS3v9/43PpzNEebADTHta67 xdsDyPHcryNmlwXrYLQF73QMBh2X5umHlGhDE4Qg9mlH6tNnfi4oVK7eoWSm+Y5jWX1G VN0w== 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=qa7KKKMjuP36oUGiXuapGDtU3AcRlsdwDQ4Bj9o29ZV5kB0IOTBZQo77xluOP5p39G CDhpvXrWO820dDEcHFuxH/yiwULNfZLMDCAgHM8T0ZJ+loQFbZysfJIqC+zCKcN5Avh5 3GCKwQduaZ7AcZxLYuQasWWxNzc9pj2zHi/rtkgMeSqOfF+2lO8EUCPAUyPAqSprVKIO rX+pObwURflRB1tY+8A4w1S664Z3F60iu7ato+B5nBQFZI7UXqy9Aev/iNBsnAz3VZD1 SEKHfC+kEDBquNwbPahxSeJp87m+eXpNQIkrE4MSjh0vKmxow6Bpm899nfaBT3b+cKcv CAjw== X-Gm-Message-State: AOAM531E8bf1ghf1d9HAq9vrO9ENIewHegHIyabsGnzNtpc+/UzyNoSc zi2HrAYIug7Hvk30/UoOCB8= X-Google-Smtp-Source: ABdhPJz5IsrFDmE2tZbDrvhPA00PE+Jp+IUlNVHV9LIeCdCOqtE8kXCvzP0WOvGajeFJqqCnB7g3cw== X-Received: by 2002:a63:1f54:: with SMTP id q20mr13701298pgm.135.1611790433585; Wed, 27 Jan 2021 15:33:53 -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 124sm3498648pfd.59.2021.01.27.15.33.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jan 2021 15:33:52 -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: [v5 PATCH 01/11] mm: vmscan: use nid from shrink_control for tracepoint Date: Wed, 27 Jan 2021 15:33:35 -0800 Message-Id: <20210127233345.339910-2-shy828301@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210127233345.339910-1-shy828301@gmail.com> References: <20210127233345.339910-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 Acked-by: Vlastimil Babka --- 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; }