Message ID | 20250109023025.2242447-13-surenb@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 7B520E77199 for <linux-mm@archiver.kernel.org>; Thu, 9 Jan 2025 02:31:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 931B86B007B; Wed, 8 Jan 2025 21:30:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8B9EA6B0083; Wed, 8 Jan 2025 21:30:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7155A6B00A6; Wed, 8 Jan 2025 21:30:58 -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 4232C6B007B for <linux-mm@kvack.org>; Wed, 8 Jan 2025 21:30:58 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 04B721C81F6 for <linux-mm@kvack.org>; Thu, 9 Jan 2025 02:30:57 +0000 (UTC) X-FDA: 82986335796.20.A1121B8 Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.202]) by imf01.hostedemail.com (Postfix) with ESMTP id 3DA1740012 for <linux-mm@kvack.org>; Thu, 9 Jan 2025 02:30:56 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=FWwwYmse; spf=pass (imf01.hostedemail.com: domain of 33zR_ZwYKCIg463qzns00sxq.o0yxuz69-yyw7mow.03s@flex--surenb.bounces.google.com designates 209.85.214.202 as permitted sender) smtp.mailfrom=33zR_ZwYKCIg463qzns00sxq.o0yxuz69-yyw7mow.03s@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=1736389856; 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:in-reply-to:references:references:dkim-signature; bh=dhc7tvmwjQaP4b5E/hXUfzy8UCkIkS3jsDCXbxBg4ZU=; b=yIeT5ZC4WlfBgrXdeX2hJPUAXOfUwpyeYUtTDLeEeJunuATcNavU98xYWeqMaWpjo4xwx/ wgynQkitG89Z3E4s8pSMWjI61HrWTFXBC9UNQf0s3PychtaImgfCjc3x7oIKjfetn2X85E iXMk4Mzd/GbAK3ap51g02dqZQD7cRLQ= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=FWwwYmse; spf=pass (imf01.hostedemail.com: domain of 33zR_ZwYKCIg463qzns00sxq.o0yxuz69-yyw7mow.03s@flex--surenb.bounces.google.com designates 209.85.214.202 as permitted sender) smtp.mailfrom=33zR_ZwYKCIg463qzns00sxq.o0yxuz69-yyw7mow.03s@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736389856; a=rsa-sha256; cv=none; b=APT9zxJWYGN07Cj3i00a1cSboO9STOrmhT/mkm37jn4/a+J1zBh9I7TEpGm4HO3ZRBrKjr Xhb8bKk+2NNri8Y42csAZfMAsEgkZwDN6Z1jLDyyULy3WHgnM4TDkqZnqFLQwXb85LSaA4 n9/7CUhUMzifWcXmBmrZBDm2P7XzW4Q= Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-21681a2c0d5so7320095ad.2 for <linux-mm@kvack.org>; Wed, 08 Jan 2025 18:30:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1736389855; x=1736994655; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=dhc7tvmwjQaP4b5E/hXUfzy8UCkIkS3jsDCXbxBg4ZU=; b=FWwwYmse5hn8Pv8HLsMswebu6iBJ2AQRgF6x72MRSr7HHCwzTv+wTTueV+hincLNrv VafSbwqWhHhUE6BdvCKVLI34INICG4NOdcXeh5zyjXtHEYU1AMd54dJkkBQPXhpVgMRS lF30N03sdw1uvergtJrUmHm2sO/SqDIJ5/fIWnv5+8zTOPox3qZF5jRF04cwheU9QWWd T2cyxGhjo98NTaMiY0PwtJA/ZtGPOL0Q7fg3ptDUVIUiBrD1mN/7j84MpydAeZWMT63j /yQmn5Opf7WPUjEGLKcEGOwP8LWR9w5uj7dC1Y7axIYiOW4zKLibjRUIHou1+qxKEolD Brnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736389855; x=1736994655; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dhc7tvmwjQaP4b5E/hXUfzy8UCkIkS3jsDCXbxBg4ZU=; b=GUnahX1Vjk22JmDoBJrYd+FV8hf7luGCIKQWqr3sWcG0qMneksU8Xm08/a618yOk0R MUlwK1dQ06ZlAXs1poh493YL/nh1UgDHlCrYeVOeDwpfWEkZUv6BT9JYzPCgAWnHT/+G C9SGXiSQ4/DJkOSjDrVtKIjcclrUW9WPlaqt7hKzrya19nyudkCtqJS90HB67HYqfn9q 9LcKlGn3X8YCClfClaRjtNsej8Wpq5xdADd8/GFmjSpio9/LCoY2N++ORCc2foQ7pGPv pEaO9IVPkM7WolGrw8vZRodjcZCwBiwILfZPHja8sFtUyezacta4Cuw65wcn+g9axONq FhTg== X-Forwarded-Encrypted: i=1; AJvYcCUkXZz8W99uzQLu1+NUoSZKhM6pTrNJLQMNG0IKqdcBT3oDy4eBvNmy99I7ylLjvdIM5Btqa8NJwA==@kvack.org X-Gm-Message-State: AOJu0YwBN2hGLr9HCpBRRsbZT2WVOkZCIkE/JLrWD+1sbiSTPFOX2Za/ /jJfgSqVb8A++FvZNsEPRiQeF8UCW5YqaTM+ysrJ8QMHmz4zhGmmGYT3ZX64BroPwWP7r+XdW6k mbg== X-Google-Smtp-Source: AGHT+IGEJut09X73iREifwmtH1pTDK91otd2DkI7NLMgJYUa+WdvvMkSg9t/WQnzDQh+UWszvk42Ntw5lL8= X-Received: from plhu17.prod.google.com ([2002:a17:903:1251:b0:216:2dc4:50c1]) (user=surenb job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:ecce:b0:215:7446:2151 with SMTP id d9443c01a7336-21a83f36facmr63729185ad.4.1736389855012; Wed, 08 Jan 2025 18:30:55 -0800 (PST) Date: Wed, 8 Jan 2025 18:30:21 -0800 In-Reply-To: <20250109023025.2242447-1-surenb@google.com> Mime-Version: 1.0 References: <20250109023025.2242447-1-surenb@google.com> X-Mailer: git-send-email 2.47.1.613.gc27f4b7a9f-goog Message-ID: <20250109023025.2242447-13-surenb@google.com> Subject: [PATCH v8 12/16] mm/debug: print vm_refcnt state when dumping the vma From: Suren Baghdasaryan <surenb@google.com> 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, richard.weiyang@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 Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 3DA1740012 X-Rspamd-Server: rspam12 X-Stat-Signature: 6zjcpbcdsjifiwijaf477dwrmgzih3zk X-Rspam-User: X-HE-Tag: 1736389856-859597 X-HE-Meta: U2FsdGVkX19+Il941owk7w/hiIXT8SdERPCZ3ljtinox4Q0PiC03AQcEbRJJ+LZDPSLl0IEmmHoZBIhe7SkLhMRbXyMA5Gl0uVJMcW5PJw3VTqjJglioyITiq4ClMVrH+SF/DX1tv/1NpHHcmRjZZAXFFZTn20igLtIk4ZFvhzkdppUOJW5NF1wC74lQ0AQwLopretAUge+s/7+YzkDe2qARIBCDSEus5Fi0L3ixcQxiFVRVia5RPTApWM5kKcUzFy+za6HhEBeem21mhHv5hvq6ov4skLabmiwHJZsIvamqoXse6ddZBU+uApB8IajB9SJM2SLG0PKn5ONabnUCoMmySAiqC7hBA4kw8dTy4ZEiXLQOZxcw/fu0czkYSVWN5Pv86IX49XLr2iQW/NdaiOGOGx29aktFUHTPr2FxYk8v5EW7mYCM2hxHCdHLg3l4iC2Q93nZvgXuKJM6nw8NuFiaoM4DgUXm58xZKdry+LP6wqDTp2Fv7okwcXmAU6yyb2Vq3h7iH8nrl+4V8kUXUhVjbI8QJjIiDUMP1MyqMAnAuKQyvgqpDMnWktHtxJ1eFKYbnrM9jSGB+rCpLAvv43IsofX0/caZrK3SfvPDceMfrn5CrCA9/NQ4+bH1DNGX+luI2E23uwqdlV57yaduJvunH4RKy+xgsEiuc3XpcJy/B+XiH32NwoCKJSMNKQLnHdsBgenK//vta7Em3Z7SXlr2PdLY1oPu7GOuNVvE9ieOO9D58pcqDwpUVPT0YqNBQN/EeoOzSiDwfzEnh/0KtG86pKstMlvlZfx1T5Yw0K1kIgLJkHWyHVsj12tw0rNfJ5lz8E298zuNrpGjtkKXIwXg7sJIEJtsPUtHYN7zGtp7UgBsOef+IfDrOuvZIxamHwqzcGG9yLp13D0hjTlNetGJk4Eza8DMiWyzuBxBT2Loqs4JeBzG7cJShf32bC5RXG3oJvc9v340ZT5F+/s p8L0uN+O qOKG5NnMlEbDHqAIw9QYTor/6vsWrGR9mGmViQEj0aW13u8CUIvkTq+FHMe+HP3BFC8YgInYM5NMnJpHFuIF3687rXhgYBDHRsNMVJzLSjBN5sIyvRpOUAdwj4OsAAtd2/j/2losWjInOE4uMm/+oLKzG4DNHNX0DDcz15z1zZAblpZMlv4s65/+0mAghkSqiE3do8u+v3T4VQzMR8G1agaR2z18Mouy4nxhdsLIsBz9WiwVH6vtLQq/siWLdPqcua9g+lhjHRXCNiFQlMpB9yscNKZn5Sah+Y3KuukKOahicvicX0KU2nHdJCzPkiy/3QJmRgmB5P1sR2P1k5gllmOCTBctQtupxGBtHtR2RIeYdhBJ0gbTaFzOlJV1OmfvkTF9LsaA4tDfMIb4oUiugbkyeP+QhdgmQjg99DXxZ8Ket1+gudVUEFMmYoRfzhOTPFBZ8bdAJFl2ZS5lJgwfierhF7qS9j4sufLMas63gEdXnDZqofOfLQzjVoxmDT8PDcAzCexhwZgmIJjk+RmxmcAQ2aguFoi1X3cq0CxDQUYqfglr9esel4kyRnuTuw1b0fkRsI5g/ylBxPNcwj7UZXogYfBfzT+GEjEkZ69fwMIULpVPU8VDYCM0xZJsDl9e//FAqPVVc+pVZFNcnYtmcE8mf+ThJG+n3UHU+ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000005, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
move per-vma lock into vm_area_struct
|
expand
|
diff --git a/mm/debug.c b/mm/debug.c index 8d2acf432385..325d7bf22038 100644 --- a/mm/debug.c +++ b/mm/debug.c @@ -178,6 +178,17 @@ 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" + "flags: %#lx(%pGv) refcnt %x\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, 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" @@ -187,6 +198,7 @@ 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); +#endif } EXPORT_SYMBOL(dump_vma);
vm_refcnt encodes a number of useful states: - whether vma is attached or detached - the number of current vma readers - presence of a vma writer Let's include it in the vma dump. Signed-off-by: Suren Baghdasaryan <surenb@google.com> --- mm/debug.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)