From patchwork Tue Feb 9 17:46: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: 12078675 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 C4AC4C433E0 for ; Tue, 9 Feb 2021 17:47:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 44D0064EB8 for ; Tue, 9 Feb 2021 17:47:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 44D0064EB8 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 C7A756B0005; Tue, 9 Feb 2021 12:47:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C042A6B006C; Tue, 9 Feb 2021 12:47:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AA4C36B006E; Tue, 9 Feb 2021 12:47:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0018.hostedemail.com [216.40.44.18]) by kanga.kvack.org (Postfix) with ESMTP id 9487F6B0005 for ; Tue, 9 Feb 2021 12:47:06 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 588AD18600E4A for ; Tue, 9 Feb 2021 17:47:06 +0000 (UTC) X-FDA: 77799460452.05.loaf29_2a164e827609 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id 37DBA18604CFA for ; Tue, 9 Feb 2021 17:47:06 +0000 (UTC) X-HE-Tag: loaf29_2a164e827609 X-Filterd-Recvd-Size: 4236 Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Tue, 9 Feb 2021 17:47:05 +0000 (UTC) Received: by mail-pf1-f174.google.com with SMTP id j12so12342307pfj.12 for ; Tue, 09 Feb 2021 09:47:05 -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=aag6FmxopGJJBcIK0DInGICi96zOp3/PA6Y0cDLmFTU=; b=dLY9oFzxKgCzVXOsBpGLct8FvBj5Y9PyAp5mpJbD4YGXcrynLeTNufVZKj3H+LOfto z1r7RqIfCfzzl6MqyuqdeQlmLJaLyMPqU4rtp7rtUSXeETOoLp/ty8292Gmth69PxCUy nxERgg9VrahdeOJdbD5dXXlfxkfdg6RGbvkmkpPmfED26//MvpWPhbuqSUsg8uIn7O0M bRT8S5xJNkI5lLx6ArZ0E+Cif/roOzZShm0WVMP3RfmjbfPdJgoTT8G8M9c5aAhrDIGY kVGh4LdR3b9ojq8HLKHXd2YlKfrZkVwXvi3lJcD1NZfbsyPChLkyRkcTdZaTViZzeBx9 KZvw== 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=aag6FmxopGJJBcIK0DInGICi96zOp3/PA6Y0cDLmFTU=; b=uitJCcYuv/qgwENTdpOWeBrrfPMn34vdKASj9AsakGYWYLokbpJ868AWvT5hTk3KNf UHFvyRobT2MOpUsErduHwTiyYtMa+wvgvfPmwg42/AGXV8iHlaAvbnVW6hlq1B1z4Li2 Z0OplOOhiVd5xajiZZGv5DsehkcjDcVgzbmNJd6Qadys5CboQ0Q1hpTJKMpnV//j6YXV 6kVeTjOBfcJAvpu3V7QuCdM2AOV4SUGvGdmP/8vBbn1oibq5hcmKs8z70EKqgCY3qzfn bGMf0JvCk4Wufs7I3juYp4VhuRBPmVcc1gFuvwo9OEOuqodLXQDkaj6wVUT+hJYrGVra Ocrg== X-Gm-Message-State: AOAM533WsJwo5lFKclgFwZ5NCOKWuivxTd2spjucMeClICjdPohUuNGO RoolY+j42UwZuRo9T/wNRLM= X-Google-Smtp-Source: ABdhPJwv6VYuTil89X6G9OgCmNWSOdJhaHkhGxouDpYGR9ltvOy9KIVDT3TN3w/r7cCiZDmCsTqUjA== X-Received: by 2002:a63:1965:: with SMTP id 37mr23377015pgz.349.1612892824322; Tue, 09 Feb 2021 09:47:04 -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 j1sm22260929pfr.78.2021.02.09.09.47.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 09:47:03 -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: [v7 PATCH 01/12] mm: vmscan: use nid from shrink_control for tracepoint Date: Tue, 9 Feb 2021 09:46:35 -0800 Message-Id: <20210209174646.1310591-2-shy828301@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210209174646.1310591-1-shy828301@gmail.com> References: <20210209174646.1310591-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 Acked-by: Kirill Tkhai Signed-off-by: Yang Shi Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin --- 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; }