From patchwork Thu Dec 26 20:03:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suren Baghdasaryan X-Patchwork-Id: 13921425 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 3729FE77188 for ; Thu, 26 Dec 2024 20:03:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 956E96B0089; Thu, 26 Dec 2024 15:03:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8DE566B008A; Thu, 26 Dec 2024 15:03:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 77F006B008C; Thu, 26 Dec 2024 15:03:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 5326B6B0089 for ; Thu, 26 Dec 2024 15:03:42 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 917191C81DF for ; Thu, 26 Dec 2024 20:03:41 +0000 (UTC) X-FDA: 82938182502.20.2B0E9F5 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) by imf03.hostedemail.com (Postfix) with ESMTP id B3ABE20019 for ; Thu, 26 Dec 2024 20:03:20 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=tg3ajCKx; spf=pass (imf03.hostedemail.com: domain of 3mrZtZwYKCAEtvsfochpphmf.dpnmjovy-nnlwbdl.psh@flex--surenb.bounces.google.com designates 209.85.216.74 as permitted sender) smtp.mailfrom=3mrZtZwYKCAEtvsfochpphmf.dpnmjovy-nnlwbdl.psh@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1735243387; 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:in-reply-to: references:dkim-signature; bh=aTwdimbqrLzgvxzEohMdCoyRMu5oKcGm29eOp6seJ28=; b=qSpRqjnoQArQQ/PwCBXtH06vkFcJbgV3/DBbHLmbEBdO/n5nxEBfIrOSo6HRDjqcM5A/SX GFAaqO4FrnARPu7q3whFRqGg2qrbK2oBXf6KnVn4HVlo3XqpPQsN4NwdZqUndLfSnI+OFn D66qNMwXS8RJnfmch6ogiKHz/hmOkdA= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=tg3ajCKx; spf=pass (imf03.hostedemail.com: domain of 3mrZtZwYKCAEtvsfochpphmf.dpnmjovy-nnlwbdl.psh@flex--surenb.bounces.google.com designates 209.85.216.74 as permitted sender) smtp.mailfrom=3mrZtZwYKCAEtvsfochpphmf.dpnmjovy-nnlwbdl.psh@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1735243387; a=rsa-sha256; cv=none; b=6qnRnXaOLDeuH6hfp4QfW8aVv5KVZG/o/VBgOec4D8K48xIskTW98R5GzNlFCswoAl1Opp luwS2lTFEn7hE4t0IxdIMgql4sfruHzQLvwURdudQFcLz91OWzq2h+/QquKbQEyaAfe8n9 0F3IT6Exiw83Z8l/jD+ZckGwbhFWmgU= Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-2ef9e38b0cfso8172437a91.0 for ; Thu, 26 Dec 2024 12:03:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1735243418; x=1735848218; darn=kvack.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=aTwdimbqrLzgvxzEohMdCoyRMu5oKcGm29eOp6seJ28=; b=tg3ajCKxQtPuFWXSga2I4z6hutQMxzV7zdylW4c/vMNVT/TwA0vSaO0KNcgw8Jplo4 topMuHSV47gXKbGm98xL+Dfg9fehLa31xEuvEFRpl4k0GLFn6PEoRE4fTdif5wk8cViC CdDJwJVoRqzd6lghRZRvxUAw78VrP8o1xRVtRvWOpfkMS7ZN+RmmFbJOg0aSebfWwD0C FJk9nPcOrDu6+GrFTdMmy7ZXpzOpmXNxzdVmLtCVK1J5kL/QZftbuLko7NSAMKcYCP1R fAzeg7KrH9Mb6rVwekPum+ExtZVZI6UtdB+OYgeVcGdcM3pcqCtHiXTtgkTfLcMuszSt AmpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735243418; x=1735848218; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=aTwdimbqrLzgvxzEohMdCoyRMu5oKcGm29eOp6seJ28=; b=Pc3NWPFr2k5I9GzYIhN3gNRtZ89RxuVRzX+j20s5BbiseMqcZe+HVKJ/G7lW9IBW5h 83Auayzj3Rn6nGvpfdDHeHari/i2I7OeEC6MEXQ8u9K8LWzQMdDCNbUbsiDRi5yqlvrn KsO3XEgB71rfEUU4//7xKv7oeoMnBcnQglLvUyH4mcW+Wt5bBzdAoNlOUdnJCdSA99Rh wsG4wCfRoCmZ2AR/oHj6H4hO/sZrKX8+o9v9qAlNt1Lmj4AxUA4f0X4M6oyxP/MW7AqL LeuS1R+yQB6uNUVvFtj5AbqOaiifmKY6zo0umlHJ3jvB+UErI+C4x3XXqmY8sBdK7Wg8 DBbQ== X-Forwarded-Encrypted: i=1; AJvYcCWcBOM+8rUOewo37GLSF9aIRnxuiXsFtv7raokxQ+qWl2tcMq5jt/w5xWof3ZaEV6gclI0UBqC1uA==@kvack.org X-Gm-Message-State: AOJu0YxmwFVUZZgH8nfGilskpkeqiRbIF3e7qwpCbT3OcgabszB0mgXP HaCEH552D30kn/eazQn+LaxUMcg2+OpdChYX9rJxX2VTs4/IgiWU/LAxTb1h8/d9gWCmp4FTTJO sHQ== X-Google-Smtp-Source: AGHT+IFKuFHb/tV8+kvISxe/RGHcG/GVadVlTBIkNnm3OYqCY+RuHpRtRCzuwCqfDOqzCGcJoiDvWD0TkhA= X-Received: from pji12.prod.google.com ([2002:a17:90b:3fcc:b0:2ef:95f4:4619]) (user=surenb job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:2805:b0:2ee:d024:e4f7 with SMTP id 98e67ed59e1d1-2f452d37b34mr42943311a91.0.1735243418406; Thu, 26 Dec 2024 12:03:38 -0800 (PST) Date: Thu, 26 Dec 2024 12:03:35 -0800 Mime-Version: 1.0 X-Mailer: git-send-email 2.47.1.613.gc27f4b7a9f-goog Message-ID: <20241226200335.1250078-1-surenb@google.com> Subject: [PATCH 1/1] fixup for mm/debug: print vm_refcnt state when dumping the vma From: Suren Baghdasaryan To: akpm@linux-foundation.org Cc: peterz@infradead.org, willy@infradead.org, liam.howlett@oracle.com, lorenzo.stoakes@oracle.com, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, mjguzik@gmail.com, oliver.sang@intel.com, mgorman@techsingularity.net, david@redhat.com, peterx@redhat.com, oleg@redhat.com, dave@stgolabs.net, paulmck@kernel.org, brauner@kernel.org, dhowells@redhat.com, hdanton@sina.com, hughd@google.com, lokeshgidra@google.com, minchan@google.com, jannh@google.com, shakeel.butt@linux.dev, souravpanda@google.com, pasha.tatashin@soleen.com, klarasmodin@gmail.com, corbet@lwn.net, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@android.com, surenb@google.com, kernel test robot X-Rspamd-Queue-Id: B3ABE20019 X-Rspamd-Server: rspam12 X-Stat-Signature: iuh3cytija87rtqgp1tby4t4uor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i+fzQ2Mihn6EbJ2umHsBR8+uS07yRvKCJO8hm9JTG9jssOG1IpOYeo6xwy2dlnvMmIH3BxJh5KHrChZ76lqyM6bKQLfefVt0B1zyp0+cybdhtrb7CZobJqqAj7Cg37A2ylm2KF1Bj8z+vkYl/Q58xIRW+oQSMHGWAZy3KuL3ep/081RgvGXOCAtVmwApPLIyE2WxJfbqJr8jRsVLMFfgj546cOFNIg+gLAHC2JjksIV/qxbTTLadyoiabk1UgHvpNIjzM6tA94aTsne2+LNGVDjqz993k3mJxOuU+7e+DHKvr6y3yCvqj+aBeHe5MJ7qasuBkUNxzMRa2FXhc33BvJb7bvFTsot16NR8EW7RJZAaR0D81oHx0tbw6EoUBlZJButCZPGdVd1mMZ57NOcXU/YwcTOR+9FZp379OYwwZ+ulejGtzh8xoc0eSpvvz7LJ2mGzk+3q7f66wWxTAuY6yK+qNEbArne6l/ei3KPPW/G5eLKeOcCmBneLvrqNkoOLBXBKmI9Vi5yMfRn31uFX79AT7LLDGhtwGc8ZkHr9pZysqUu6QwXYkIGeNCGkJCAMC+OM5nM81FyWZA2EmHnV4XBU 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: vma->vm_refcnt does not exist when CONFIG_PER_VMA_LOCK=n, therefore when CONFIG_PER_VMA_LOCK=n and CONFIG_DEBUG_VM=y we need to avoid its usage in dump_vma(). Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202412270328.HiJX1mRt-lkp@intel.com/ Signed-off-by: Suren Baghdasaryan --- Fixes https://lore.kernel.org/all/20241226170710.1159679-14-surenb@google.com/ posted over mm-unstable. mm/debug.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mm/debug.c b/mm/debug.c index 68b3ba3cf603..9c4cbc3733b0 100644 --- a/mm/debug.c +++ b/mm/debug.c @@ -178,6 +178,7 @@ EXPORT_SYMBOL(dump_page); void dump_vma(const struct vm_area_struct *vma) { +#ifdef CONFIG_PER_VMA_LOCK pr_emerg("vma %px start %px end %px mm %px\n" "prot %lx anon_vma %px vm_ops %px\n" "pgoff %lx file %px private_data %px\n" @@ -187,6 +188,17 @@ void dump_vma(const struct vm_area_struct *vma) vma->anon_vma, vma->vm_ops, vma->vm_pgoff, vma->vm_file, vma->vm_private_data, vma->vm_flags, &vma->vm_flags, refcount_read(&vma->vm_refcnt)); +#else + pr_emerg("vma %px start %px end %px mm %px\n" + "prot %lx anon_vma %px vm_ops %px\n" + "pgoff %lx file %px private_data %px\n" + "flags: %#lx(%pGv)\n", + vma, (void *)vma->vm_start, (void *)vma->vm_end, vma->vm_mm, + (unsigned long)pgprot_val(vma->vm_page_prot), + vma->anon_vma, vma->vm_ops, vma->vm_pgoff, + vma->vm_file, vma->vm_private_data, + vma->vm_flags, &vma->vm_flags); +#endif } EXPORT_SYMBOL(dump_vma);