From mboxrd@z Thu Jan 1 00:00:00 1970 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 44C83C021B2 for ; Tue, 25 Feb 2025 19:55:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 65B256B0089; Tue, 25 Feb 2025 14:55:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 616C56B008A; Tue, 25 Feb 2025 14:55:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4D2486B0093; Tue, 25 Feb 2025 14:55:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 2E36C6B0089 for ; Tue, 25 Feb 2025 14:55:29 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 55D29801CA for ; Tue, 25 Feb 2025 19:55:28 +0000 (UTC) X-FDA: 83159521536.04.D66837B Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by imf05.hostedemail.com (Postfix) with ESMTP id 9D678100006 for ; Tue, 25 Feb 2025 19:55:26 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf05.hostedemail.com: domain of "SRS0=XlUg=VQ=goodmis.org=rostedt@kernel.org" designates 172.105.4.254 as permitted sender) smtp.mailfrom="SRS0=XlUg=VQ=goodmis.org=rostedt@kernel.org" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1740513326; a=rsa-sha256; cv=none; b=4VM8GoWi4FEBfmXa5RMxS7UPekmjn9adOY/4wte4hlPpk7rqDNJDCDjxiwUsuswxgHSAkv yi1JCy69Trf9I6MEK/yxvqPVi13dZ0wRm5eNOIL5TsbSByQvvLIltPBAsiw76W06bCUEy0 hAiJrPxf64j5TzGDPc2YUodgeolGY6w= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf05.hostedemail.com: domain of "SRS0=XlUg=VQ=goodmis.org=rostedt@kernel.org" designates 172.105.4.254 as permitted sender) smtp.mailfrom="SRS0=XlUg=VQ=goodmis.org=rostedt@kernel.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1740513326; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+x1rdouNLnDr1vhypNYVtZolZ2ebo2f7dP7ZgqEQUGw=; b=jCiwa5pdIZ319gOaLIpYVKSlC2wBo7WVKPEDH83kEogROiqQ9BXuvv2LzjT7gMkBrQ6oz/ 5d09pIE/xkB/D2KNZ88jesM/fiVwx7q8bCjuZofg0+FbNXObsuOZxbr3eXHzFDcZQT0eva YSEiNEfiNkhPNrO3cKFabb02DOjFBBk= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id F226E61264; Tue, 25 Feb 2025 19:55:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6EBA0C4CEDD; Tue, 25 Feb 2025 19:55:24 +0000 (UTC) Date: Tue, 25 Feb 2025 14:56:02 -0500 From: Steven Rostedt To: LKML , Linux Trace Kernel , linux-mm@kvack.org Cc: Masami Hiramatsu , Mathieu Desnoyers , Andrew Morton , Michael Petlan , Veronika Molnarova , Suren Baghdasaryan , Linus Torvalds Subject: Re: [RESEND][PATCH] tracing: gfp: Remove duplication of recording GFP flags Message-ID: <20250225145602.59e61cdb@gandalf.local.home> In-Reply-To: <20250225135611.1942b65c@gandalf.local.home> References: <20250225135611.1942b65c@gandalf.local.home> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 9D678100006 X-Stat-Signature: uqfxypztcrr6xkkdp7bqqfewuwfi436m X-Rspam-User: X-HE-Tag: 1740513326-790774 X-HE-Meta: U2FsdGVkX195ILOVouDIYSg0Sd3EoJt5H3pwZfID10iZrd1tbgIDealagRh7+WDBpz37+sNHdDLsY4f2cTKOLms0lTjGydz/neQVXdrf48UoJNWK/gmtE+7GqlQrJzzXRZdF5IY3YPtzDUzpsFqzQsLwaOjAis8w3CtL3/17nlcNBuWJR64vlwDa0TZa8/J3K2+U3HAo2L0bh7ZUWugFQjlqLyfYFEJAoIkxwVR35sHUyGQYVnOknfQa63VbEz6jeKQKqemIxeQklYFW3XyXQLPQSeLj8r7N1danGgPE4EoSK/c6E08uiwDDlc6GO/izzAtVRSJuBIm9wpzsZQKXfoJBjpPjRzxwpvZ7uys2FNBHaT30DNpAOyHRVYgkrpkbM+B+4bFALAxQcKZUxb3Uemzyj+/G69xA7vCZ0pUK62/OX55yacfbYke46DiqQ+GQYVbiRpqOXUWSNLC/NEF1wErGucPdYYCAjthBnFrbXChXab7ETmRpMUo3FoGcCBa3ptBtcljj61CSlfSWJu0rJtVBdL+GnHXEIxFd4obpTddumHihocNnf3MsHpr38rN1bsNo6u7L4REr7kNGsuzDF2Qv3609GC2B1Epp1YjoPD0nrUHTXDOoTeFnMlTtrEzbnGJBxtioSllIoj9gGqYGqsIintcVC4EOnWvMELqeYnZD3UrGn8n4aR/ggL/MllhDw/c08AUXwFJqpXY7zlvH2iUphRgd5+JzNqJsnA0f6LQWK8z2H7mSAKVvFLUdojL81Y4o4c7Y1RGjNeNSktldLqCs8sYIpvXWx/YIN1m6VeNN80gWKR3dljmKPq2ihzzli72hVuis5zAO3sUi1+D3DMMozoDlaYkHJkwjGsQh2IeYn9SZFlBBTF/+JDEn2cStalt4O1NYRCXy/uOR+1eZvw4+EzhdXtZXr1ZxcyxLElGoLOWeBAFB9cd/YHMPfrkiBdi34/GUqZVEW1TahYu dRSp/vlS BmZvvMCFZQ7/2Jwd3lQfIZ/4CQYmIKcuIeEt0ES/P0Vys99vdlAQAzvDtWwl/7Bboh0viI8EJbtbHSDIGurmuAE6ZOLyVAU4Xc+RiQ8kB8R1Pq+oIt9Uv15Jc2IhWMb9iEaERg9MUOivlz/k+woU7+5WiYIIR+Q4s03N+IVf6J25IoKX0Wa+Q5cDq/QRt0077XTA7d29zlOWsJsWUCgojxEsuGxYXk+ge6n/0EWjuaL6j2/5sEpoWFUVFBB9BfKJP5AZBUZUF8FNrQ/ZsTzinMmAOX5F4Cias55E8A5whYrCiSFrX/t8qHc3QAmrI3yJivKkvxSyv+NSNoLg= 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: List-Subscribe: List-Unsubscribe: On Tue, 25 Feb 2025 13:56:11 -0500 Steven Rostedt wrote: > Last version: https://lore.kernel.org/20250116214439.046082618@goodmis.org > > This was originally sent with a patch that fixed the output of gfp flags > in trace events to show human readable flags and not hex numbers. > > This patch on the other hand is a clean up as the there's now two macros > that define the bits to print. This makes the one macro use the other > macro that is a subset of the first. > > Can someone in the memory management subsystem either give me an acked-by > and I can take this through my tree, or you can just take this through > the memory management tree. Either way works for me. Interesting, I even ran a before and after of this patch by doing the following: # trace-cmd start -e dma -e vmscan -e percpu -e kmem [ wait a few minutes ] # trace-cmd show |grep gfp > ~/gfp-before [ apply patch, compile, install, reboot ] # trace-cmd start -e dma -e vmscan -e percpu -e kmem [ wait a few minutes ] # trace-cmd show |grep gfp > ~/gfp-after # perl -e 'while (<>) { if (/gfp_flags=(\S+)/) { print "$1\n"; } }' < gfp-before | sort -u > /tmp/before.sort # perl -e 'while (<>) { if (/gfp_flags=(\S+)/) { print "$1\n"; } }' < gfp-after | sort -u > /tmp/after.sort # diff -u /tmp/before.sort /tmp/after.sort --- /tmp/before.sort 2025-02-25 14:41:49.799742048 -0500 +++ /tmp/after.sort 2025-02-25 14:41:41.247636893 -0500 @@ -4,38 +4,39 @@ GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_NOMEMALLOC -GFP_ATOMIC|__GFP_ZERO|0x2000000 +GFP_ATOMIC|__GFP_ZERO|__GFP_COMP|__GFP_NO_OBJ_EXT GFP_HIGHUSER|__GFP_ACCOUNT GFP_HIGHUSER_MOVABLE|__GFP_COMP -GFP_HIGHUSER_MOVABLE|__GFP_COMP|__GFP_WRITE -GFP_HIGHUSER_MOVABLE|__GFP_COMP|__GFP_ZERO +GFP_HIGHUSER_MOVABLE|__GFP_WRITE|__GFP_COMP +GFP_HIGHUSER_MOVABLE|__GFP_ZERO|__GFP_COMP __GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC -__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_RECLAIMABLE -__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_RECLAIMABLE GFP_KERNEL GFP_KERNEL_ACCOUNT -GFP_KERNEL_ACCOUNT|__GFP_COMP|__GFP_ZERO +GFP_KERNEL_ACCOUNT|__GFP_NOWARN|__GFP_NOMEMALLOC GFP_KERNEL_ACCOUNT|__GFP_ZERO -GFP_KERNEL|__GFP_COMP|__GFP_ZERO|0x2000000 +GFP_KERNEL_ACCOUNT|__GFP_ZERO|__GFP_COMP GFP_KERNEL|__GFP_NOWARN|__GFP_NOMEMALLOC -GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_NOMEMALLOC GFP_KERNEL|__GFP_ZERO +GFP_KERNEL|__GFP_ZERO|__GFP_COMP|__GFP_NO_OBJ_EXT +GFP_KERNEL|__GFP_ZERO|__GFP_NO_OBJ_EXT GFP_NOFS -GFP_NOFS|__GFP_COMP|__GFP_ZERO|0x2000000 -GFP_NOFS|__GFP_NOFAIL|__GFP_COMP|__GFP_HARDWALL|__GFP_MOVABLE -GFP_NOFS|__GFP_NOFAIL|__GFP_ZERO -GFP_NOFS|__GFP_NOFAIL|__GFP_ZERO|__GFP_ACCOUNT -GFP_NOFS|__GFP_NOFAIL|__GFP_ZERO|__GFP_HARDWALL|__GFP_MOVABLE|__GFP_ACCOUNT +GFP_NOFS|__GFP_MOVABLE|__GFP_NOFAIL|__GFP_COMP|__GFP_HARDWALL +GFP_NOFS|__GFP_MOVABLE|__GFP_ZERO|__GFP_NOFAIL|__GFP_HARDWALL|__GFP_ACCOUNT +GFP_NOFS|__GFP_NOFAIL GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP -GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_RECLAIMABLE GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_NOMEMALLOC +GFP_NOFS|__GFP_RECLAIMABLE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP GFP_NOFS|__GFP_ZERO -GFP_NOFS|__GFP_ZERO|0x2000000 +GFP_NOFS|__GFP_ZERO|__GFP_NOFAIL +GFP_NOFS|__GFP_ZERO|__GFP_NOFAIL|__GFP_ACCOUNT +GFP_NOFS|__GFP_ZERO|__GFP_NO_OBJ_EXT GFP_NOWAIT GFP_NOWAIT|__GFP_ACCOUNT -GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NORETRY|__GFP_COMP +GFP_NOWAIT|__GFP_COMP GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC -GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_RECLAIMABLE GFP_NOWAIT|__GFP_NORETRY|__GFP_NOMEMALLOC -GFP_NOWAIT|__GFP_ZERO|0x2000000 +GFP_NOWAIT|__GFP_RECLAIMABLE|__GFP_NORETRY|__GFP_COMP +GFP_NOWAIT|__GFP_ZERO|__GFP_ACCOUNT +GFP_NOWAIT|__GFP_ZERO|__GFP_NO_OBJ_EXT +__GFP_RECLAIMABLE|__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC Notice that the old way has: -GFP_NOFS|__GFP_COMP|__GFP_ZERO|0x2000000 And I looked at what that 0x2000000 is, and for my current config, it is: __GFP_NO_OBJ_EXT Which was completely missing from the old way, and this patch actually picks it up! That's because the TRACE_GFP_FLAGS has it, but the __def_gfpflag_names macro was missing it. Again, it's better to remove having to maintain two lists instead of just one. -- Steve