From patchwork Mon Mar 4 11:07:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qi Zheng X-Patchwork-Id: 13580426 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 D430EC5478C for ; Mon, 4 Mar 2024 11:08:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 678056B0081; Mon, 4 Mar 2024 06:08:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 629D46B0082; Mon, 4 Mar 2024 06:08:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4C9BD6B0083; Mon, 4 Mar 2024 06:08:19 -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 372846B0081 for ; Mon, 4 Mar 2024 06:08:19 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 0EF1B120A65 for ; Mon, 4 Mar 2024 11:08:19 +0000 (UTC) X-FDA: 81859082718.04.43FF7E3 Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by imf27.hostedemail.com (Postfix) with ESMTP id 5E8D940029 for ; Mon, 4 Mar 2024 11:08:17 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=H8W8ZA2t; dmarc=pass (policy=quarantine) header.from=bytedance.com; spf=pass (imf27.hostedemail.com: domain of zhengqi.arch@bytedance.com designates 209.85.216.46 as permitted sender) smtp.mailfrom=zhengqi.arch@bytedance.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709550497; 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=MVpQb6gnXjWzSd7/4z2SbTtHslRCQp5WpZHkGdzmg3w=; b=G5sZ2Ao5PZz07TqiqKgNxRtr3/SZDmKXWsv0aY2658MGwGME/VdkJMoO2mOj66hrfSBzQk FZbSY9rrKuX5hqGAZxP+jounu1bBaiiTITBkf1c3hHzAxQ/NvuaUqhLvPwjRgYvFQ3iPau UfIr72ZhLeQ+OV9QRgQi3SX9DLXhIPo= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=H8W8ZA2t; dmarc=pass (policy=quarantine) header.from=bytedance.com; spf=pass (imf27.hostedemail.com: domain of zhengqi.arch@bytedance.com designates 209.85.216.46 as permitted sender) smtp.mailfrom=zhengqi.arch@bytedance.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709550497; a=rsa-sha256; cv=none; b=XOSDMRDRLhhLRY3oB6TiLRawHocQH2Ab8LHKDxfux39PGB3Di++4x4vZ+KbtHTO0oE4BHQ P0KiDIhB0m01S1mogFP8exFUPr6ql6DFrVugSqHkik27kWNfg+L5wfpcPNHPMb63z01ERO j5QrVRiupJzmLnjOe7T/yytZ6NiBALU= Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-29b2a3d4dd6so180250a91.1 for ; Mon, 04 Mar 2024 03:08:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1709550496; x=1710155296; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MVpQb6gnXjWzSd7/4z2SbTtHslRCQp5WpZHkGdzmg3w=; b=H8W8ZA2tJSCt7ANaylJ7pyIVCu37vLrU+D/WDc4nVM63nKAZYCq+fW6htM6TqQKrwt MkftHqurf4iA5hT8Mikn7T3Ki22i0Q9fPLkmRB0CAeGyBILRmdeTcn8QKcpT2Lm8Br0I P4aaaNDLxrmb6dYRMTnPuiXXRdHmTxHsbfrJ66NLkohStrVGAz67VNJORcCctVRy9JYQ yE6HIq3ri96Z2pbmrtCyfBMpAG856LwJ37/PIp4H+ppYCEj4f/KlBTYf7a4wIfjQHAMI Xpxj/Q9ZjxUB2aBsjPLUT3WuC7hBy+fKjMnKZnucluvcz5ovty9YUsq/PV1rEwrA3lXr mdLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709550496; x=1710155296; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MVpQb6gnXjWzSd7/4z2SbTtHslRCQp5WpZHkGdzmg3w=; b=HaLCYizIJ63nd0jvRakj6XIvrhPhS0LaevvyPjWW6Gui+1RMiQs43ypSr5Wq02DMiR RoB7K8oHrmAh1NYeFgAP5Wy0X35JM4tUR/hC/NfTwwGgQag8pSo6orcSFnZSkt3hQgYV UEOm+XKprhIiUmkzuUQU0GBPvEloDSo3gyCM5U9mylBAjUbbVHPit9vhFA5aAwXKrgj5 AEO3ZJf0/lL/QsLnv54JbRgqIXcarJDwSsT3V4KkoFi68z2dR++MA5rPxX/MZgGBDBdI G6BZidyZK7lpVj+gPUzRa6p9ow6TF62/S67XwR7wgZ7uTvajoIBdGw+AkYeb64V4AbDx U4Lw== X-Gm-Message-State: AOJu0Yxdwk1w7CFPuzhnoEtxWvzLWOPTBVv7P//OmWzCn/8AdNl1LS4N hUIBcDZNlkxlac8fiqY4mzwuxW7SeO1E+riVPc6oCprEdSjbt2XgVYs8DYzhHYo= X-Google-Smtp-Source: AGHT+IFSfl5xFUSoidYT+0L1kpEdhILm//TZZr/lpxpdHBQlvBKsRDyghgFJOAi+dVG4ZEhfPEedDw== X-Received: by 2002:a17:90a:804c:b0:299:dddb:3a92 with SMTP id e12-20020a17090a804c00b00299dddb3a92mr6941943pjw.1.1709550496198; Mon, 04 Mar 2024 03:08:16 -0800 (PST) Received: from C02DW0BEMD6R.bytedance.net ([203.208.167.154]) by smtp.gmail.com with ESMTPSA id y5-20020a17090aca8500b0029b59bf77b4sm587410pjt.42.2024.03.04.03.08.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 03:08:15 -0800 (PST) From: Qi Zheng To: akpm@linux-foundation.org, vishal.moola@gmail.com, hughd@google.com, david@redhat.com, rppt@kernel.org, willy@infradead.org, muchun.song@linux.dev Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Qi Zheng Subject: [PATCH 2/3] mm: pgtable: add missing pt_index to struct ptdesc Date: Mon, 4 Mar 2024 19:07:19 +0800 Message-Id: <283624c2af45fb2090b41a6b1b5481bb0a45bad7.1709541697.git.zhengqi.arch@bytedance.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 5E8D940029 X-Stat-Signature: o8pyysecrbxb6a54dctc31w3bcbgpzt3 X-Rspam-User: X-HE-Tag: 1709550497-565390 X-HE-Meta: U2FsdGVkX1+XlGhN/AoNxZC5OQ0iJFPeujOyehQxn9qG2oIZLQ49vlWASPEx42QzkEV1E08PeakbztwzAJC4TMoZeTAueDahxBcOgjIA5gT41IN125BEJ+MxcpsAOidIt30Q78WU9osodY/KAygIj5iu/gnsIHEyyLrTJVpmDHKkU11Yjb9MovAPs3vbgEvNGuJyhohfHzI20ZTx/tkBT02JbUcB5gMRQA9cc7ryuexLYdccyTJ6p+VJ2mZ/w9FMnFH4Ug+6ZciudWNgai66NRqTe3vv/6zu/rgHQPp79DdjMZ0KjgMfDcEPD+/aauLevrdhG40B7eUYTsq+W6wPG/s20g+hS3UeIj3+mFqSqBtXQZQ+BJNevnL3eRbgPVsIVs3ODq9h/KBnNy7bqeRI3xaR2BbTOy10IsCdTQdZrUJ+CjvKMibsbtXD2O+8GFLIf3hVwShummbNVoO2IW34494egktVJ8y1KC4v+KXnh/NVMOGpRGMg/f0w3Nz0GcIhrLl75nJGPI22UP+ccGJcoMapPqSZ0UIJPZ2ljyQWyN2eeU43WoZ0ehO67DJ+Yw4oeW4W2F3C5ZPimvjeUscFFpyUnEXCBN+0/ZPdIPYhAioU6GYJjDBuHgI9siptBdKhr9pwjb8PEw/0WLywgma/hjTrApITMMDzqx38/N0VwmOQ7lPk39KfCX+FlT1OCRllEzexrb/CiOrtiIYUAcMkLLr8jnVNT1B+oRkNiAsaWieQt9uMrM7x6YtxuNbM+HaCN/9g2yi1cEMfe8n4swB6m6TrOsv6DiYJpN1gB6sRZRDWmZ2gaqp/C67jcD9zEW/Z2ooL/+iGPbtkSSGE1AQOeVNEmBpw2r8hsFIrxTEvyM3i6xwp7rvqrpn4jUwag/cFqdSwWCPnJelhexB7vyktkt6yTlbBy3s7RKwDdn8W1zkvBPTLZH8cv3vWk2ZK+ziSHymAVur6rAoRr63UUZv Qg9vRhy0 sMzpwvme+aQZ4YVszZf9yWATQFqNMDZrlEAru4sgjG2nDedyCEHEdgaBt5KmV6oa4Un0y5Xor+CVHgfbVgaHJFDokxCOEPZbbDwr4Fwg7iqnHa0MVdTjZmGmlhnUolEh/v5KfXexx6igPd0vevbv2jmwCUMD3n7wAq+rcFtG0g6i7H8qQGpRKXEB8DZMAHUucEEe08k9B6W/vhNGpq7UnRKsms64qWwVl9Aro78jnKBBtTyn6IIRrkbbssQ== 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: In s390, the page->index field is used for gmap (see gmap_shadow_pgt()), so add the corresponding pt_index to struct ptdesc and add a comment to clarify this. Signed-off-by: Qi Zheng --- include/linux/mm_types.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 5ea77969daae..5240bd7bca33 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -425,6 +425,7 @@ FOLIO_MATCH(compound_head, _head_2a); * @_pt_pad_1: Padding that aliases with page's compound head. * @pmd_huge_pte: Protected by ptdesc->ptl, used for THPs. * @__page_mapping: Aliases with page->mapping. Unused for page tables. + * @pt_index: Used for s390 gmap. * @pt_mm: Used for x86 pgds. * @pt_frag_refcount: For fragmented page table tracking. Powerpc only. * @_pt_pad_2: Padding to ensure proper alignment. @@ -450,6 +451,7 @@ struct ptdesc { unsigned long __page_mapping; union { + pgoff_t pt_index; struct mm_struct *pt_mm; atomic_t pt_frag_refcount; }; @@ -475,6 +477,7 @@ TABLE_MATCH(flags, __page_flags); TABLE_MATCH(compound_head, pt_list); TABLE_MATCH(compound_head, _pt_pad_1); TABLE_MATCH(mapping, __page_mapping); +TABLE_MATCH(index, pt_index); TABLE_MATCH(rcu_head, pt_rcu_head); TABLE_MATCH(page_type, __page_type); TABLE_MATCH(_refcount, __page_refcount);