From patchwork Wed Sep 16 18:58:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 11780497 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 347D159D for ; Wed, 16 Sep 2020 18:58:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D90F220809 for ; Wed, 16 Sep 2020 18:58:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mZqc0jlj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D90F220809 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 8AF2F6B0083; Wed, 16 Sep 2020 14:58:43 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 86116900007; Wed, 16 Sep 2020 14:58:43 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 754436B0087; Wed, 16 Sep 2020 14:58:43 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0059.hostedemail.com [216.40.44.59]) by kanga.kvack.org (Postfix) with ESMTP id 5C5E06B0083 for ; Wed, 16 Sep 2020 14:58:43 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 29A998249980 for ; Wed, 16 Sep 2020 18:58:43 +0000 (UTC) X-FDA: 77269836126.22.space09_1707c372711c Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id F16FF18038E60 for ; Wed, 16 Sep 2020 18:58:42 +0000 (UTC) X-Spam-Summary: 1,0,0,102b8056658c307e,d41d8cd98f00b204,shy828301@gmail.com,,RULES_HIT:41:69:355:379:541:800:960:966:968:973:988:989:1202:1260:1311:1314:1345:1359:1437:1515:1535:1544:1711:1730:1747:1777:1792:2196:2198:2199:2200:2393:2559:2562:2693:3138:3139:3140:3141:3142:3354:3865:3867:3870:3871:3872:4118:4321:4385:4605:5007:6119:6120:6261:6653:7514:9413:10004:11026:11232:11658:11914:12043:12296:12297:12438:12517:12519:12555:12895:13161:13229:13894:14181:14687:14721:21060:21080:21444:21627:21666:21990:30054,0,RBL:209.85.215.196:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04ygunoexpfmmp7kbi885bjyjnfwwyptk4cft67syryemxuk3rxz334fhzeeuxi.ptpuxh3puynkg3xuhyo1j44y6sh1aid4w5ff38yk1gifybybz81ckruxkh13eg5.s-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: space09_1707c372711c X-Filterd-Recvd-Size: 7179 Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Wed, 16 Sep 2020 18:58:42 +0000 (UTC) Received: by mail-pg1-f196.google.com with SMTP id 34so4393727pgo.13 for ; Wed, 16 Sep 2020 11:58:42 -0700 (PDT) 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=F81s0rIPBWblQiyluR6hglrcI7ROo5yasjtOBI37hNg=; b=mZqc0jljd/8sr5+kvQjTKKe3AFdrpzOFDDMIBUO+PUn+a6XpZRpo79Atnqv1VOnlnS EkUT0J9s8xsHnTW3+G349vqk+a5LomUWdlU29ynNacJgfFp6WLBvGak8gCcJLVL44f94 XcYH5swx5dtwtKREZsFbpTZUkRYNNM+cKEL9FbC27JrWIY/01KTO9Tgy70Zqnl+q+mbZ 4CF1VS4cec4ZOjpKhznpfPY6yJ845rV/YU1u5BdJcJPcpjHMOAU593VTijNltDFIum9e Ydb+hOGPfWL5jHACAuW+Ibb+DOnWiktygjBUIRS3NctPP5oeOSP+6KL+6qBreT329V+B 8G+g== 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=F81s0rIPBWblQiyluR6hglrcI7ROo5yasjtOBI37hNg=; b=Ongpn35TIeeY74C1D2YtBCEkUUVUwNvQuEV+Dx/jNQX0pIPJkWDUS4knvHaWsD5vbW 3PH348BN4KiNtwXxy4RnUeDkenGLJ2mno660lN4KZoysNNJXeD9ZVNtm9qMaGsAGRP4u gKkAbdsjA7Y7t0PAImX4iNuQWRNrF6YOnrOxE/uVvCLz2GnMUrHf3gy4FSLeWsxtAmmQ m/YRUuUtUsskMsSTG5+YFT9giMA5bevzb0Q5TOmEKLykAWmO378Jm32BubtQ9ImMH/aS 6Y3tsQxT7xq4efuRLZwPNexX17ovqn81yHrFVhIN0yccjl4+E1l9lch9Zf+jaduvH6RR +aog== X-Gm-Message-State: AOAM531+0JXyMMY5JQub3ep/gvsVrGzx4u+qWRdzCiRSr/c7hCqoqnRk iUWkb4TpQ+iNWqIkL9ncbDXa2iPnx3g= X-Google-Smtp-Source: ABdhPJxx/RelfTwk8Irck3IijqBQjwOkCy74p2cEpMoZ+BalP/NvlYKBAp/L5wpoHgKuaqczNiNKXA== X-Received: by 2002:a63:5ec5:: with SMTP id s188mr19707324pgb.218.1600282720914; Wed, 16 Sep 2020 11:58:40 -0700 (PDT) Received: from localhost.localdomain (c-107-3-138-210.hsd1.ca.comcast.net. [107.3.138.210]) by smtp.gmail.com with ESMTPSA id fz23sm3453747pjb.36.2020.09.16.11.58.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Sep 2020 11:58:39 -0700 (PDT) From: Yang Shi To: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Cc: shy828301@gmail.com, linux-kernel@vger.kernel.org Subject: [RFC PATCH 1/2] mm: vmscan: remove shrinker's nr_deferred from tracepoint Date: Wed, 16 Sep 2020 11:58:22 -0700 Message-Id: <20200916185823.5347-2-shy828301@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200916185823.5347-1-shy828301@gmail.com> References: <20200916185823.5347-1-shy828301@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: F16FF18038E60 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 shrinker's nr_deferred will be removed in the following patch, this is a preparation patch to make it bisectable. Signed-off-by: Yang Shi --- include/trace/events/vmscan.h | 26 +++++++------------------- mm/vmscan.c | 4 ++-- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h index 2070df64958e..27f268bbeba4 100644 --- a/include/trace/events/vmscan.h +++ b/include/trace/events/vmscan.h @@ -184,18 +184,15 @@ DEFINE_EVENT(mm_vmscan_direct_reclaim_end_template, mm_vmscan_memcg_softlimit_re TRACE_EVENT(mm_shrink_slab_start, TP_PROTO(struct shrinker *shr, struct shrink_control *sc, - long nr_objects_to_shrink, unsigned long cache_items, - unsigned long long delta, unsigned long total_scan, - int priority), + unsigned long cache_items, unsigned long long delta, + unsigned long total_scan, int priority), - TP_ARGS(shr, sc, nr_objects_to_shrink, cache_items, delta, total_scan, - priority), + TP_ARGS(shr, sc, cache_items, delta, total_scan, priority), TP_STRUCT__entry( __field(struct shrinker *, shr) __field(void *, shrink) __field(int, nid) - __field(long, nr_objects_to_shrink) __field(gfp_t, gfp_flags) __field(unsigned long, cache_items) __field(unsigned long long, delta) @@ -207,7 +204,6 @@ TRACE_EVENT(mm_shrink_slab_start, __entry->shr = shr; __entry->shrink = shr->scan_objects; __entry->nid = sc->nid; - __entry->nr_objects_to_shrink = nr_objects_to_shrink; __entry->gfp_flags = sc->gfp_mask; __entry->cache_items = cache_items; __entry->delta = delta; @@ -215,11 +211,10 @@ TRACE_EVENT(mm_shrink_slab_start, __entry->priority = priority; ), - TP_printk("%pS %p: nid: %d objects to shrink %ld gfp_flags %s cache items %ld delta %lld total_scan %ld priority %d", + TP_printk("%pS %p: nid: %d gfp_flags %s cache items %ld delta %lld total_scan %ld priority %d", __entry->shrink, __entry->shr, __entry->nid, - __entry->nr_objects_to_shrink, show_gfp_flags(__entry->gfp_flags), __entry->cache_items, __entry->delta, @@ -229,17 +224,14 @@ TRACE_EVENT(mm_shrink_slab_start, TRACE_EVENT(mm_shrink_slab_end, TP_PROTO(struct shrinker *shr, int nid, int shrinker_retval, - long unused_scan_cnt, long new_scan_cnt, long total_scan), + long total_scan), - TP_ARGS(shr, nid, shrinker_retval, unused_scan_cnt, new_scan_cnt, - total_scan), + TP_ARGS(shr, nid, shrinker_retval, total_scan), TP_STRUCT__entry( __field(struct shrinker *, shr) __field(int, nid) __field(void *, shrink) - __field(long, unused_scan) - __field(long, new_scan) __field(int, retval) __field(long, total_scan) ), @@ -248,18 +240,14 @@ TRACE_EVENT(mm_shrink_slab_end, __entry->shr = shr; __entry->nid = nid; __entry->shrink = shr->scan_objects; - __entry->unused_scan = unused_scan_cnt; - __entry->new_scan = new_scan_cnt; __entry->retval = shrinker_retval; __entry->total_scan = total_scan; ), - TP_printk("%pS %p: nid: %d unused scan count %ld new scan count %ld total_scan %ld last shrinker return val %d", + TP_printk("%pS %p: nid: %d total_scan %ld last shrinker return val %d", __entry->shrink, __entry->shr, __entry->nid, - __entry->unused_scan, - __entry->new_scan, __entry->total_scan, __entry->retval) ); diff --git a/mm/vmscan.c b/mm/vmscan.c index 9727dd8e2581..48ebea97f12f 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -485,7 +485,7 @@ static unsigned long do_shrink_slab(struct shrink_control *shrinkctl, if (total_scan > freeable * 2) total_scan = freeable * 2; - trace_mm_shrink_slab_start(shrinker, shrinkctl, nr, + trace_mm_shrink_slab_start(shrinker, shrinkctl, freeable, delta, total_scan, priority); /* @@ -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, nid, freed, total_scan); return freed; }