Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp479774rdf; Tue, 21 Nov 2023 07:49:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IGCdS36DLJzAgmZ9vsBicgYSGQ8E+iFdkGJTElfkog5rcTJUrjQoHs+r4YgzIx1Vks+yz94 X-Received: by 2002:a17:902:db02:b0:1cf:5cb5:95bf with SMTP id m2-20020a170902db0200b001cf5cb595bfmr7151459plx.45.1700581743784; Tue, 21 Nov 2023 07:49:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700581743; cv=none; d=google.com; s=arc-20160816; b=PAJV69E3cIeWQgmfllpN+BJauPezZ8BIzpcXozLKeNoEoTuskuZFsczFRcKKnlOtB/ vewUJfcesFvlTv1nnXn9VzCzmTa/dklq7APJQrYQSjFyYEc6MI+K62ch3s9csVfOPdd3 3HsmgMwSJsm/IxdE2n7iLQGExD9ULDb7awLv0jBya08VdVJiYmqAJe+fSEF8oGhsY5Lt O0Q87kLQ4FRcts2gbs5zAE5jhGdbLeoWB3KIC5XqM2kFKj/g9lrWU6HpUzy3kZiwRCX5 6zu37S7gQlYSWVqE3BpTWkFyPxxacoIhdp85d5cqrREhsDXXJ8mQ8EoTh5XGNgwOmsuv lPNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Kc0D4WzPKq3iWD2G8Wh6oSBHInN47itmeV13Xhjx3os=; fh=cL+NnMyVCxhWNo6oIPB00F46I7roL0I6cIv0EFCOReY=; b=kFG/362KazCW62k3YUSaqkY9qMjGQ0cTxSGHkNGGSakKYbJ4oY+Sz2XPPDmmO4AomA 7KqtAe48iErdIoU/QJNbf3luogMdcVCVwpkmj+k+pDLsMpsauD8M0MYtveftkyFYNOp9 pm3soLu/KPPVC5erpuMNJ9JzDmT60mFDHWxPymgB1wmRMF+s14SpBAlH5NconATUJ/Oq vJkbSz2MmOGUMKBsAKpht/TWkxz/4FIqMdKNOEAaTtlEHjROqaQKCvCEN/X2g0m6QL// J/1vOxCk6TXFIhTLPy7QhaIOSyEwvtJDFBkospQDAJTjEO6l5PaNYqKeWGQDaLKEK9wm JoPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=AumFU0Kf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id y12-20020a17090322cc00b001c9fb2acff5si11127414plg.526.2023.11.21.07.49.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 07:49:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=AumFU0Kf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id EF3B5804C486; Tue, 21 Nov 2023 07:47:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234505AbjKUPqo (ORCPT + 99 others); Tue, 21 Nov 2023 10:46:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230509AbjKUPqn (ORCPT ); Tue, 21 Nov 2023 10:46:43 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C61E099; Tue, 21 Nov 2023 07:46:39 -0800 (PST) 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-Type: text/plain; charset=us-ascii 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-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 07:47:30 -0800 (PST) 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 -- 2.39.2