From patchwork Tue Nov 21 15:45:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Gordeev X-Patchwork-Id: 13463321 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 54D1AC61D90 for ; Tue, 21 Nov 2023 15:46:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F0A3C6B048D; Tue, 21 Nov 2023 10:46:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EB7296B0494; Tue, 21 Nov 2023 10:46:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D7E2D6B0495; Tue, 21 Nov 2023 10:46:38 -0500 (EST) 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 C7EDA6B0494 for ; Tue, 21 Nov 2023 10:46:38 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id A3E7D1209A4 for ; Tue, 21 Nov 2023 15:46:38 +0000 (UTC) X-FDA: 81482388876.08.04B6455 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf11.hostedemail.com (Postfix) with ESMTP id 3BA814000C for ; Tue, 21 Nov 2023 15:46:36 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=AumFU0Kf; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf11.hostedemail.com: domain of agordeev@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=agordeev@linux.ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1700581596; 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=Kc0D4WzPKq3iWD2G8Wh6oSBHInN47itmeV13Xhjx3os=; b=8jhmjhZdH6Is7Vpj3RPMjyqabYwXH7alUER8K+930qxKHLnyDinR4vjUxmNRPADGbIvErz r+Ik8c5Xy6Afl37twIcReAdEVM972JJ/NmFz13/QicQD6/tMq0W49x40wDagUY4FAmxDv8 HIebcLII+6xcTRFsCNrB2uxr8lzPrcQ= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=AumFU0Kf; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf11.hostedemail.com: domain of agordeev@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=agordeev@linux.ibm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700581596; a=rsa-sha256; cv=none; b=hic6nD+kfbB0j82I8f8AKyYETP9Nj7QuxpBqyqYZhBoW/eC3cUG9xuI/arYlepLU0Mne4d 9tmeVyjU7SeyATxXSz44ZfxoR182rK1QMWZEOLIdAgiSuPZqWcfQuh0VcXIY6rErwQQt75 YQlZ+s+B2vnzghhNRITFv4rqV7DJ4vE= Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3ALFW5fU000814; Tue, 21 Nov 2023 15:46:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=Kc0D4WzPKq3iWD2G8Wh6oSBHInN47itmeV13Xhjx3os=; b=AumFU0KfGSn8ZhpF7eq2J/+mxKBooIeUwTQDv2m3J32YGyijl6indK6y9OkC/dpWAnhO 4xVbh/85nHg6yBd/orGBODvJXlyRyy+69/7NJiUGlJ0B0IZUt6CHGTLV2pLwHAil0arp rFWerUY2L130IKMCbv8jfuUHiOaVicm1gVhJahlyNEmehZhDMUfS5Nq/HqkHcgkIInGF +0CD8k3szuxI8ir0YATHxbMa/xQxU+4CvMEaCtB/t78icFicTq8886GZ16ouVhy/HLf4 KUSCj+9KLNaBTrexsklNcY1kJjIgtGmzpAYKwixb0wh78g1nGsIjW8r95jIcM3gSEby3 VQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3ugy98gqux-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Nov 2023 15:46:33 +0000 Received: from m0360083.ppops.net (m0360083.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3ALFifwl012309; Tue, 21 Nov 2023 15:45:36 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3ugy98gq0b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Nov 2023 15:45:35 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3ALDngrL021057; Tue, 21 Nov 2023 15:45:26 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3uf7yyhrq3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Nov 2023 15:45:26 +0000 Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3ALFjNSE26739236 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 Nov 2023 15:45:23 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E604020043; Tue, 21 Nov 2023 15:45:22 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B391A20040; Tue, 21 Nov 2023 15:45:22 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTPS; Tue, 21 Nov 2023 15:45:22 +0000 (GMT) Date: Tue, 21 Nov 2023 16:45:21 +0100 From: Alexander Gordeev To: Heiko Carstens , Andrew Morton Cc: Vishal Moola , linux-mm@kvack.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Gerald Schaefer Subject: [PATCH v2] pgtable: do not expose _refcount field via ptdesc Message-ID: References: <20231121120310.696335-1-agordeev@linux.ibm.com> <20231121144717.6318-A-hca@linux.ibm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231121144717.6318-A-hca@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 5-3E7TzkY4XFvme5GjwB1HczMe7vwYwm X-Proofpoint-GUID: PBEsB0zrvUBrRPq6pxPf0lYE_n0UT9zW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-21_09,2023-11-21_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 phishscore=0 lowpriorityscore=0 suspectscore=0 mlxscore=0 adultscore=0 malwarescore=0 spamscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311210124 X-Rspamd-Queue-Id: 3BA814000C X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: wcqsi5wi4hkdgd146isk8seqqwnom73n X-HE-Tag: 1700581596-476278 X-HE-Meta: U2FsdGVkX19rYzwkKSNHjFEv4vVD8PScSONlZwRNdYObR7X5ruIiP5TEjBioDguI/pHiqYzrW2EOQG2XeAsBrfL9H4j+YYd+ah6fsWz+uCXE473x9lrU3boXl7lFRkMddu75WKYm4LVGLrQtS7SH48W30V955PB14VZ96wcafG5Wy1/Pit1ERtcGSmq2uFg+HX+CU9yZH+3brlzUqaiRqIynpJlqBhrj9BnHWxlN9mbmyPxBcD7aCnOikYAMpHPb8VHU8p1QsjBxBlDXHY0sxF2zIwNwyCPPj3q8/0GnyQet4ECZPkN+ptOcA3o/FYBNdoGFrwWr80YdJfgA5uYUKwRtOaSd5gSGQIS6/tSVla7AEhe1/mTDtrvV1mmA1f0ziP8Cigy2n8aHaOKtMd7i3/hQdtdKYUQUSZrdrVndNEx1gKKjV0syZRNcCpwfcOPAPbm+ONtoivdM3AJDftEP06maAQYGEPHFiskbwdV2ikuTJumOegfs9e7Xnxer+EGTbigYahucYNFHUEDPLWKUB2mYUSKBzc3v6WKmbBSP6kikvlZQAfmm25vCZ6ugNQBFVQQ5QvOX5GXKuheOYDjEXcF9t21xfTx47AMyMGZRCBZdZ9lxkLdzr+ivz97Imk4nITnW1ZEbyfKipWKNgkR4CKtDecsxGd/175KGK0hpQdYHRm4yKZxlnGjsCqOqf27JPHWYGNY4TbwdUYJKncvSfPRG4c9sIdVRkvECodqfi3rkzUO6N8ta0Z4GY93mPTDst3c+8fnJ7JUzOI11ke3BS61Eom7kjVMMbEcxVK33hQ+6cBoVQHpciMzKgHwnGep2AQ18xzk6IbQIm5lzb2XdAQ9TCZv1UqsYGdBdiSVBPgxcFHeFGTsSobjpdlCqXJlzafC6l2rK65ecLHUQ7x2bpaxnlf3AGlNrdC8c92aw/PzTgcdmAaSQgLKoGvzjYPVeLZrWoMCImV1Exuh0E0j lVz3rv62 fwoU6fL+exphpXaFT3Z447kVReZNIoxlEwj9L3aGasmytKNBR2BLb/PFBUxIbLsRB5eLv+og4DqmBFXG+7k9OzNheHr5MrccmpUvE1mF0zpcYSsRjYvUTDT37Z+Ha7lbqyBfK8fziOz/9KJ+594QjcelyIhwm3wTQqhA8PGJRWnP9xPJuZP5lrkDxrfy5UGLyXCITJQITReZTNNPXYOAE4A4oR/lpOSrv/NuWbCz0zdtk95iNgBLq0ACNgj2xWdZ2L+CX4aQxFBHpI92HmStFP5oizg== 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: Since commit d08d4e7cd6bf ("s390/mm: use full 4KB page for 2KB PTE") _refcount field is not used for fragmented page tracking on s390 and there is no other code left that accesses this field explicitly. Suggested-by: Heiko Carstens Signed-off-by: Alexander Gordeev --- include/linux/mm_types.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 957ce38768b2..ce0cfc6e4d94 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -401,11 +401,11 @@ FOLIO_MATCH(compound_head, _head_2a); * @pmd_huge_pte: Protected by ptdesc->ptl, used for THPs. * @__page_mapping: Aliases with page->mapping. Unused for page tables. * @pt_mm: Used for x86 pgds. - * @pt_frag_refcount: For fragmented page table tracking. Powerpc and s390 only. + * @pt_frag_refcount: For fragmented page table tracking. Powerpc only. * @_pt_pad_2: Padding to ensure proper alignment. * @ptl: Lock for the page table. * @__page_type: Same as page->page_type. Unused for page tables. - * @_refcount: Same as page refcount. Used for s390 page tables. + * @_pt_pad_3: Padding that aliases with page's refcount. * @pt_memcg_data: Memcg data. Tracked for page tables here. * * This struct overlays struct page for now. Do not modify without a good @@ -438,7 +438,7 @@ struct ptdesc { #endif }; unsigned int __page_type; - atomic_t _refcount; + unsigned int _pt_pad_3; #ifdef CONFIG_MEMCG unsigned long pt_memcg_data; #endif @@ -452,7 +452,6 @@ TABLE_MATCH(compound_head, _pt_pad_1); TABLE_MATCH(mapping, __page_mapping); TABLE_MATCH(rcu_head, pt_rcu_head); TABLE_MATCH(page_type, __page_type); -TABLE_MATCH(_refcount, _refcount); #ifdef CONFIG_MEMCG TABLE_MATCH(memcg_data, pt_memcg_data); #endif