From patchwork Thu Sep 14 13:16:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlastimil Babka X-Patchwork-Id: 13385202 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4924EE0214 for ; Thu, 14 Sep 2023 13:16:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6E4AE6B02AA; Thu, 14 Sep 2023 09:16:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6BA5F6B020F; Thu, 14 Sep 2023 09:16:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4758E6B02B3; Thu, 14 Sep 2023 09:16:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 226026B020F for ; Thu, 14 Sep 2023 09:16:44 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id DD1A11CA025 for ; Thu, 14 Sep 2023 13:16:43 +0000 (UTC) X-FDA: 81235252686.24.521E4BA Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf24.hostedemail.com (Postfix) with ESMTP id ADCE1180015 for ; Thu, 14 Sep 2023 13:16:41 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=rXYZHOfz; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=w7ODrEMW; spf=pass (imf24.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694697402; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=rAhS+FVn6ocw85psQvFvN0PR1VlmozuQ4I8i9ZtjuaY=; b=04q7VA8I0DIbrGh8PUEmoYKvsjkY9X/l6LW7DoBMZhKlNUZl+qkZrUL/aOgVzAg0/n9pwl z5J7dySs97mgS1RHkDR897rThP7+rGLM1sn7RW4rX8tx2bSvvnCXwssniwSEC3Aktnk09o pf8aCkuSGgFZf374GknqQy2mOtubcVY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694697402; a=rsa-sha256; cv=none; b=YEQb5GuiEvF7+FsxA+0ocze57kKJfFe4kWUQvnqs7LGI1/CedBmRIOcT0GtqKKomrFbgTB X75AzQfSoTpQz+75lwdGTexnvps/66EcShNuSAUdAYvmf88/QguPoXCO7bPGwhRa+V5u0j gztD2WZi9bjCpANi8Exymd1iIINyq6U= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=rXYZHOfz; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=w7ODrEMW; spf=pass (imf24.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 72EB31F459; Thu, 14 Sep 2023 13:16:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1694697399; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=rAhS+FVn6ocw85psQvFvN0PR1VlmozuQ4I8i9ZtjuaY=; b=rXYZHOfzaYBcmQOVenjZjswEmg6RN8Sk2V+BW7r+HfBOpYHGbbkEjxpu9Zgwo9D+tbJ4Vp kmB2yLegf2zWD9jKJ3Ng7DLOqQQ9DxQc92Zd8RqQLJohLIpq9KcXUJ7v+rov8SOyDnqYj6 B+M40p1WYtQj6yYH4kenKUe5Ci3sMno= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1694697399; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=rAhS+FVn6ocw85psQvFvN0PR1VlmozuQ4I8i9ZtjuaY=; b=w7ODrEMWKXDJyZH8yRRXjpu91JCbJkXlJ4zV31DCOedOfday7a05umNo2GtvdyBR8OgJ0B HgOQEkZWGtvD7wDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 53F3B13580; Thu, 14 Sep 2023 13:16:39 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 5fDXE7cHA2U6TQAAMHmgww (envelope-from ); Thu, 14 Sep 2023 13:16:39 +0000 From: Vlastimil Babka To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, linux-trace-kernel@vger.kernel.org, Hugh Dickins , Mel Gorman , Vlastimil Babka Subject: [PATCH 1/2] trace-vmscan-postprocess: sync with tracepoints updates Date: Thu, 14 Sep 2023 15:16:38 +0200 Message-ID: <20230914131637.12204-3-vbabka@suse.cz> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Rspamd-Queue-Id: ADCE1180015 X-Rspam-User: X-Stat-Signature: ups8n6swazwox36d4xhjaozwfd4e61bw X-Rspamd-Server: rspam03 X-HE-Tag: 1694697401-448209 X-HE-Meta: U2FsdGVkX19HvaWpshTqbgQisRz4/Nd4R1ZDtP94DVROmkh8k7Fxjnsrg4aqzGXXpTzOFBWdkL5AQYDVdzlCP+BJHflTl2is+IatQcVP3hWqs/yhfiJwhCAiRqEJTMlEBq2S4qy2bxL2SF7nyTxsc4BmCkquAwBnL+R9jeWGEXDl8LMZbjE7RNhUqxZ/FV8uXA7a/1DhP8Ebg2KXudICBvfitmrsnQBD0+SeIT3HvOvzbd961fkNe+SvweD/bQfi03JYIyfnkIL8esPIiCJ3m5GawKQJ3FjpM+TjeeQU88AC9lFfbsC1zypknfbG+a7td+2n/gKnPWrgZpR4Bzo4HWP70zUz/6E5eQ0jPs04NJz41x0MAwlsRrvg4ZunYfhn4x+L6bu3pKFrSUL8BPTTmgbNN8LrjmcTCQYThYOugvw8SyOf2lFfazug8XBPPqdMwZhP0m1jyJGK122Wd5VzF0jLKVEyKEoauViPNnRpV8EWKS17jBIrijfjyoADP3QeebF/Sg70owbj8ByLqfNjhB3IBWvMd3Q/MSyzcDJNyjqOJYshm4veW0/KH4ytVcnKyrIwZvh0wGPX8uEUG7tB9QQV2O2QysUu/PinwWI9KzUWTzAmc0IExUtuAj28TIVwfZyTHA6ZnNWjEqWXBKWVtsWVDBZb7MJT97tMUfGngMDP85MnGzm1r4UfoUi4ty9mJdhbQ9i9v0YG9k8ESB4H97Nzp1OzH78T3CEV/R6CD78NUg6utiHNjemW3u+aitHnPRCzLhR9TZTYYCN/vu8YKvXKCBUKew56PpmyKRkvKk/uf5nuh2xh4z4u1XBnd5W9aDgxXEC+twksiw1muPb8hoLIcuQJ4U++pgzmVxRPySx3W+hWu6cXGIU9aDyLywM0b4XZiYOdllwWsko8MbF77FKL/2wFk2kSxwBkYUaJf7WNlhKOn2oxgRESOTfSMQOB/hPbsqBGwA4FxUUgZbJ 9Eo41XdF 20qOgAgQevctgc5bIHyUtkfchuO8WemgdFyeqqYqHDhi8CclxmTAMG4pVtLOhbbHog72pbEDUliNfAzIHiup7Y682cVElvoh4bvpoNRsjuwZuquwtogMcKhMARiEwti4n8sSpZsVSg20LulE0SlpA2tmzA2WjD4SVmzVXD4886ozwFq2Jdwi29Ty3Aw== 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 script has fallen behind tracepoint changes for a while, fix it up. Most changes are mechanical (renames, removal of tracepoint parameters that are not used by the script). More notable change involves mm_vmscan_lru_isolate which is relying on the isolate_mode to determine if the inactive list is being scanned. However the parameter currently only indicates ISOLATE_UNMAPPED. We can use the lru parameter instead to determine which list is scanned, and stop checking isolate_mode. Signed-off-by: Vlastimil Babka --- .../postprocess/trace-vmscan-postprocess.pl | 40 ++++++++----------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl index e24c009789a0..725d41a8d4ef 100644 --- a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl +++ b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl @@ -107,14 +107,14 @@ GetOptions( ); # Defaults for dynamically discovered regex's -my $regex_direct_begin_default = 'order=([0-9]*) may_writepage=([0-9]*) gfp_flags=([A-Z_|]*)'; +my $regex_direct_begin_default = 'order=([0-9]*) gfp_flags=([A-Z_|]*)'; my $regex_direct_end_default = 'nr_reclaimed=([0-9]*)'; my $regex_kswapd_wake_default = 'nid=([0-9]*) order=([0-9]*)'; my $regex_kswapd_sleep_default = 'nid=([0-9]*)'; -my $regex_wakeup_kswapd_default = 'nid=([0-9]*) zid=([0-9]*) order=([0-9]*) gfp_flags=([A-Z_|]*)'; -my $regex_lru_isolate_default = 'isolate_mode=([0-9]*) classzone_idx=([0-9]*) order=([0-9]*) nr_requested=([0-9]*) nr_scanned=([0-9]*) nr_skipped=([0-9]*) nr_taken=([0-9]*) lru=([a-z_]*)'; +my $regex_wakeup_kswapd_default = 'nid=([0-9]*) order=([0-9]*) gfp_flags=([A-Z_|]*)'; +my $regex_lru_isolate_default = 'isolate_mode=([0-9]*) classzone=([0-9]*) order=([0-9]*) nr_requested=([0-9]*) nr_scanned=([0-9]*) nr_skipped=([0-9]*) nr_taken=([0-9]*) lru=([a-z_]*)'; my $regex_lru_shrink_inactive_default = 'nid=([0-9]*) nr_scanned=([0-9]*) nr_reclaimed=([0-9]*) nr_dirty=([0-9]*) nr_writeback=([0-9]*) nr_congested=([0-9]*) nr_immediate=([0-9]*) nr_activate_anon=([0-9]*) nr_activate_file=([0-9]*) nr_ref_keep=([0-9]*) nr_unmap_fail=([0-9]*) priority=([0-9]*) flags=([A-Z_|]*)'; -my $regex_lru_shrink_active_default = 'lru=([A-Z_]*) nr_scanned=([0-9]*) nr_rotated=([0-9]*) priority=([0-9]*)'; +my $regex_lru_shrink_active_default = 'lru=([A-Z_]*) nr_taken=([0-9]*) nr_active=([0-9]*) nr_deactivated=([0-9]*) nr_referenced=([0-9]*) priority=([0-9]*) flags=([A-Z_|]*)' ; my $regex_writepage_default = 'page=([0-9a-f]*) pfn=([0-9]*) flags=([A-Z_|]*)'; # Dyanically discovered regex @@ -184,8 +184,7 @@ sub generate_traceevent_regex { $regex_direct_begin = generate_traceevent_regex( "vmscan/mm_vmscan_direct_reclaim_begin", $regex_direct_begin_default, - "order", "may_writepage", - "gfp_flags"); + "order", "gfp_flags"); $regex_direct_end = generate_traceevent_regex( "vmscan/mm_vmscan_direct_reclaim_end", $regex_direct_end_default, @@ -201,11 +200,11 @@ $regex_kswapd_sleep = generate_traceevent_regex( $regex_wakeup_kswapd = generate_traceevent_regex( "vmscan/mm_vmscan_wakeup_kswapd", $regex_wakeup_kswapd_default, - "nid", "zid", "order", "gfp_flags"); + "nid", "order", "gfp_flags"); $regex_lru_isolate = generate_traceevent_regex( "vmscan/mm_vmscan_lru_isolate", $regex_lru_isolate_default, - "isolate_mode", "classzone_idx", "order", + "isolate_mode", classzone", "order", "nr_requested", "nr_scanned", "nr_skipped", "nr_taken", "lru"); $regex_lru_shrink_inactive = generate_traceevent_regex( @@ -218,11 +217,10 @@ $regex_lru_shrink_inactive = generate_traceevent_regex( $regex_lru_shrink_active = generate_traceevent_regex( "vmscan/mm_vmscan_lru_shrink_active", $regex_lru_shrink_active_default, - "nid", "zid", - "lru", - "nr_scanned", "nr_rotated", "priority"); + "nid", "nr_taken", "nr_active", "nr_deactivated", "nr_referenced", + "priority", "flags"); $regex_writepage = generate_traceevent_regex( - "vmscan/mm_vmscan_writepage", + "vmscan/mm_vmscan_write_folio", $regex_writepage_default, "page", "pfn", "flags"); @@ -371,7 +369,7 @@ sub process_events { print " $regex_wakeup_kswapd\n"; next; } - my $order = $3; + my $order = $2; $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD_PERORDER}[$order]++; } elsif ($tracepoint eq "mm_vmscan_lru_isolate") { $details = $6; @@ -381,18 +379,14 @@ sub process_events { print " $regex_lru_isolate/o\n"; next; } - my $isolate_mode = $1; my $nr_scanned = $5; - my $file = $8; - - # To closer match vmstat scanning statistics, only count isolate_both - # and isolate_inactive as scanning. isolate_active is rotation - # isolate_inactive == 1 - # isolate_active == 2 - # isolate_both == 3 - if ($isolate_mode != 2) { + my $lru = $8; + + # To closer match vmstat scanning statistics, only count + # inactive lru as scanning + if ($lru =~ /inactive_/) { $perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned; - if ($file =~ /_file/) { + if ($lru =~ /_file/) { $perprocesspid{$process_pid}->{HIGH_NR_FILE_SCANNED} += $nr_scanned; } else { $perprocesspid{$process_pid}->{HIGH_NR_ANON_SCANNED} += $nr_scanned; From patchwork Thu Sep 14 13:16:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlastimil Babka X-Patchwork-Id: 13385201 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABDE4CA553E for ; Thu, 14 Sep 2023 13:16:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2F9C06B01FE; Thu, 14 Sep 2023 09:16:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1FFE86B01FF; Thu, 14 Sep 2023 09:16:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0A1056B020F; Thu, 14 Sep 2023 09:16:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id ED2E26B01FE for ; Thu, 14 Sep 2023 09:16:43 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id B29DF1205A5 for ; Thu, 14 Sep 2023 13:16:43 +0000 (UTC) X-FDA: 81235252686.01.B3F4B4A Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf09.hostedemail.com (Postfix) with ESMTP id 85869140034 for ; Thu, 14 Sep 2023 13:16:41 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=uaiILth6; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=aN1ZHWhP; dmarc=none; spf=pass (imf09.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694697402; a=rsa-sha256; cv=none; b=MHaaHjKx4JeE34u0yTgyjQwxblLRN4zr4vO6j2EVXgNwhAoOvHGIqLbhc9F2Z9fnQdf00K 5D3pghfGcKqg1tNQ4GQODuQSnLnlJC2mDwCZPy8NrTeWXbm4yywBUst3wts3zTStRVr2mK i9ClcW/7XYPPjlEuBbCQCmvIrIl0tVY= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=uaiILth6; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=aN1ZHWhP; dmarc=none; spf=pass (imf09.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694697402; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=mKBTahQunslc+rwPFTpR4lF34AdmUPBQHy7sPwquY2I=; b=SYbh/nOR76unyC+btMeJK3v6Lfo1mUR/jaX+EGKKAvcIXgaNpBZeW0JQIFbp2NMy6zHOZz /JFVb176L/6zMQ8nA4sHIeOPlYcalTTPUdXpq/v5V2RJVa4iXHNE0Jql4NqpNonlJ4KGMU ftvC2JnV9xbHQWZlgxh9IgYR2FGF628= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 97A9021842; Thu, 14 Sep 2023 13:16:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1694697399; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mKBTahQunslc+rwPFTpR4lF34AdmUPBQHy7sPwquY2I=; b=uaiILth6R+RqHEJYuiyeI/wOZnySfe2Scae7Znwl14HCONN8ce+9YyX3QF45A8wzyrrD8q E2TDy5VdI6Lg/5B5fpq7VOZlL/GUwT5vYDCXMriZPKRlKmN1NcCuvhiQAsHA4KaCRYdMbf GZvOmv0zLh7ojYXy2jitNGn2xxzlRNM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1694697399; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mKBTahQunslc+rwPFTpR4lF34AdmUPBQHy7sPwquY2I=; b=aN1ZHWhPQDkc8CUonNARkRazVN6sN5vJ8cRFA6BO0/zMtH75/ClXY0kBphEWglj/rIegdl t22B/YjhQH6cSIAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 759F6139F2; Thu, 14 Sep 2023 13:16:39 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id qNUVHLcHA2U6TQAAMHmgww (envelope-from ); Thu, 14 Sep 2023 13:16:39 +0000 From: Vlastimil Babka To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, linux-trace-kernel@vger.kernel.org, Hugh Dickins , Mel Gorman , Vlastimil Babka Subject: [PATCH 2/2] mm, vmscan: remove ISOLATE_UNMAPPED Date: Thu, 14 Sep 2023 15:16:39 +0200 Message-ID: <20230914131637.12204-4-vbabka@suse.cz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230914131637.12204-3-vbabka@suse.cz> References: <20230914131637.12204-3-vbabka@suse.cz> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 85869140034 X-Stat-Signature: wj37r4588gqeiib51ooweprcbg7ugiy1 X-HE-Tag: 1694697401-900118 X-HE-Meta: U2FsdGVkX192nohIq1zF7zekEyxnPYllNZbv3r2/2LTrQxSnjYa1VJY+fDkK4joBDQmuuXG9kZsS9djTqpIXD7eZ7spPHstVnEMy+qZn5rSzp8KcJPYgc1G/7M2QfKFC+b1nzbHfj5dY/x5LGTbGzsF3ATRyN/HxfUxxfjLemQ7WmNlcS/nJbRvLZvd7WQztpVKZbD7CKxDMdgjY/8AzOXsZosqGIH0ULuBZO4yYeXObyVikhfG5oP/86HBYhv4cfspL0uoNpczNcuwkR0KgHxQBImOOhRxJdhCTfEB7MiQEB+XP+XhXOjIoTY+loF2lJ4qghbr08udm2HQBzFGYQ8+FmX1gvbZBOPf+3Tf5kcb0YBGG0S2kY8RtSntQ/HlngY0j07YMoFc2asp7C953hGwykTIXm8+60T56aUWu9hkollIXra6P3vtxlfa4ZIDAjQbrYpBmQvZqJ6uV0C5/LMlgJCErP4rYBZ1yiesP+a6IbttVjkYFp+FaD3wFxDKNZgcDO7RBGcmbskVAzbSef7yidmfF71Pn8yNSpzFyJu2Bb6NqBkmht8FBKDV+NmgrHBz5WL6w52cEyd4cA64SUo+gfS7ErjS8HsHSmd6/StYmmJbSLGV+7nn8a776imst2zQG0Idio4BeT7CuV28DkdKEdwjLzRjC0CvjQwNWh93UBa5PRkpgRisFntyojgIqjAsRFb9cAZmWEyvvSN3JBTx63flToZro37MzYC0naao1IohLJV/JToZGYk/cDf7WmpVQlzh7JJpCZjtTFOKYkKsQY7qSjqAadURAAZ6FIn2rtvjCtZFpu312mD8OYLXPgzTqTjOZtHfJpzSjvXs1D7wH6HvcEdWVOs8aMhoZmhJvc4raHdR+iBIB4MLwGCl1DjyLQD128eYF3RFHNhZLkMjeGJtRUDBO2gLhgY3UX++SOgZu2F8EUq5PCuj/q0NXO/XXB6zsoWr+pSoFKiO TsnA/TW6 C5bAVi10gQGVZJtP/BVlnRTIaLtrfWF5/yDHsb9/TsoPrEGqrw8sQzjK/RLObu/aeskU8bhTAp6RE1QggLzeOmoZsv74Xo7/C/Uiywp8l995REsSppIV7+vYK0WUG+wx0QjLOuVmxZDDyFISke7NIu7Ov1qMsXCS/VLoB6eujJxx0Vt2hdtVDBLxbWrDXfo0HMytUxWVBSKHzd5F+2hF6SmbAxbKBKfZqpYC0MCsuCo9ku2o= 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: This isolate_mode_t flag is effectively unused since 89f6c88a6ab4 ("mm: __isolate_lru_page_prepare() in isolate_migratepages_block()") as sc->may_unmap is now checked directly (and only node_reclaim has a mode that sets it to 0). The last remaining place is mm_vmscan_lru_isolate tracepoint for the isolate_mode parameter. That one was mainly used to indicate the active/inactive mode, which the trace-vmscan-postprocess.pl script consumed, but that got silently broken. After fixing the script by the previous patch, it does not need the isolate_mode anymore. So just remove the parameter and with that the whole ISOLATE_UNMAPPED flag. Signed-off-by: Vlastimil Babka --- .../trace/postprocess/trace-vmscan-postprocess.pl | 8 ++++---- include/linux/mmzone.h | 2 -- include/trace/events/vmscan.h | 8 ++------ mm/vmscan.c | 3 +-- 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl index 725d41a8d4ef..048dc0dbce64 100644 --- a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl +++ b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl @@ -112,7 +112,7 @@ my $regex_direct_end_default = 'nr_reclaimed=([0-9]*)'; my $regex_kswapd_wake_default = 'nid=([0-9]*) order=([0-9]*)'; my $regex_kswapd_sleep_default = 'nid=([0-9]*)'; my $regex_wakeup_kswapd_default = 'nid=([0-9]*) order=([0-9]*) gfp_flags=([A-Z_|]*)'; -my $regex_lru_isolate_default = 'isolate_mode=([0-9]*) classzone=([0-9]*) order=([0-9]*) nr_requested=([0-9]*) nr_scanned=([0-9]*) nr_skipped=([0-9]*) nr_taken=([0-9]*) lru=([a-z_]*)'; +my $regex_lru_isolate_default = 'classzone=([0-9]*) order=([0-9]*) nr_requested=([0-9]*) nr_scanned=([0-9]*) nr_skipped=([0-9]*) nr_taken=([0-9]*) lru=([a-z_]*)'; my $regex_lru_shrink_inactive_default = 'nid=([0-9]*) nr_scanned=([0-9]*) nr_reclaimed=([0-9]*) nr_dirty=([0-9]*) nr_writeback=([0-9]*) nr_congested=([0-9]*) nr_immediate=([0-9]*) nr_activate_anon=([0-9]*) nr_activate_file=([0-9]*) nr_ref_keep=([0-9]*) nr_unmap_fail=([0-9]*) priority=([0-9]*) flags=([A-Z_|]*)'; my $regex_lru_shrink_active_default = 'lru=([A-Z_]*) nr_taken=([0-9]*) nr_active=([0-9]*) nr_deactivated=([0-9]*) nr_referenced=([0-9]*) priority=([0-9]*) flags=([A-Z_|]*)' ; my $regex_writepage_default = 'page=([0-9a-f]*) pfn=([0-9]*) flags=([A-Z_|]*)'; @@ -204,7 +204,7 @@ $regex_wakeup_kswapd = generate_traceevent_regex( $regex_lru_isolate = generate_traceevent_regex( "vmscan/mm_vmscan_lru_isolate", $regex_lru_isolate_default, - "isolate_mode", classzone", "order", + "classzone", "order", "nr_requested", "nr_scanned", "nr_skipped", "nr_taken", "lru"); $regex_lru_shrink_inactive = generate_traceevent_regex( @@ -379,8 +379,8 @@ sub process_events { print " $regex_lru_isolate/o\n"; next; } - my $nr_scanned = $5; - my $lru = $8; + my $nr_scanned = $4; + my $lru = $7; # To closer match vmstat scanning statistics, only count # inactive lru as scanning diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 4106fbc5b4b3..486587fcd27f 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -639,8 +639,6 @@ struct lruvec { #endif }; -/* Isolate unmapped pages */ -#define ISOLATE_UNMAPPED ((__force isolate_mode_t)0x2) /* Isolate for asynchronous migration */ #define ISOLATE_ASYNC_MIGRATE ((__force isolate_mode_t)0x4) /* Isolate unevictable pages */ diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h index d2123dd960d5..1a488c30afa5 100644 --- a/include/trace/events/vmscan.h +++ b/include/trace/events/vmscan.h @@ -285,10 +285,9 @@ TRACE_EVENT(mm_vmscan_lru_isolate, unsigned long nr_scanned, unsigned long nr_skipped, unsigned long nr_taken, - isolate_mode_t isolate_mode, int lru), - TP_ARGS(highest_zoneidx, order, nr_requested, nr_scanned, nr_skipped, nr_taken, isolate_mode, lru), + TP_ARGS(highest_zoneidx, order, nr_requested, nr_scanned, nr_skipped, nr_taken, lru), TP_STRUCT__entry( __field(int, highest_zoneidx) @@ -297,7 +296,6 @@ TRACE_EVENT(mm_vmscan_lru_isolate, __field(unsigned long, nr_scanned) __field(unsigned long, nr_skipped) __field(unsigned long, nr_taken) - __field(unsigned int, isolate_mode) __field(int, lru) ), @@ -308,7 +306,6 @@ TRACE_EVENT(mm_vmscan_lru_isolate, __entry->nr_scanned = nr_scanned; __entry->nr_skipped = nr_skipped; __entry->nr_taken = nr_taken; - __entry->isolate_mode = (__force unsigned int)isolate_mode; __entry->lru = lru; ), @@ -316,8 +313,7 @@ TRACE_EVENT(mm_vmscan_lru_isolate, * classzone is previous name of the highest_zoneidx. * Reason not to change it is the ABI requirement of the tracepoint. */ - TP_printk("isolate_mode=%d classzone=%d order=%d nr_requested=%lu nr_scanned=%lu nr_skipped=%lu nr_taken=%lu lru=%s", - __entry->isolate_mode, + TP_printk("classzone=%d order=%d nr_requested=%lu nr_scanned=%lu nr_skipped=%lu nr_taken=%lu lru=%s", __entry->highest_zoneidx, __entry->order, __entry->nr_requested, diff --git a/mm/vmscan.c b/mm/vmscan.c index 6f13394b112e..f2e5e992fefb 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2389,8 +2389,7 @@ static unsigned long isolate_lru_folios(unsigned long nr_to_scan, } *nr_scanned = total_scan; trace_mm_vmscan_lru_isolate(sc->reclaim_idx, sc->order, nr_to_scan, - total_scan, skipped, nr_taken, - sc->may_unmap ? 0 : ISOLATE_UNMAPPED, lru); + total_scan, skipped, nr_taken, lru); update_lru_sizes(lruvec, lru, nr_zone_taken); return nr_taken; }