From patchwork Tue Nov 21 12:03:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Gordeev X-Patchwork-Id: 13462962 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 3E217C54FB9 for ; Tue, 21 Nov 2023 12:03:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CB0576B044D; Tue, 21 Nov 2023 07:03:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C5F8D6B0455; Tue, 21 Nov 2023 07:03:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B28EB6B0456; Tue, 21 Nov 2023 07:03:19 -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 A26006B044D for ; Tue, 21 Nov 2023 07:03:19 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 74CF340B22 for ; Tue, 21 Nov 2023 12:03:19 +0000 (UTC) X-FDA: 81481826118.07.BD3AF99 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf30.hostedemail.com (Postfix) with ESMTP id 9C9B98002F for ; Tue, 21 Nov 2023 12:03:16 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=a3e0xRg0; spf=pass (imf30.hostedemail.com: domain of agordeev@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=agordeev@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1700568196; 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:references:dkim-signature; bh=UbI3gRx2z11WJvUL9FqBRaWO2/YxaKCV9eYngKPduqY=; b=ng6snAvb+KibKo2F7Cne1w2K6ugOco8g6s85fKBgrdpLd/sRbWLapXmyRap9zlVquQ2JmA 5VU8X3F2qyiZm00U7uSUlFAV7NEmSuBpzYMhGLoRlPdacdik5CIO5HiXSFc8uG7NwqmvmA xYxX6GS4IhwMQyPyyhH/j9dIBO/e0G8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700568196; a=rsa-sha256; cv=none; b=lk2rZD8K/zIOTcfZkcEZ0MPWgd+jHUDv+fbCSkBHMhqORSJhUjNrEyj2NFBYrpzfg9nHxB VjFlsVnsARgKJYkV047oxIQ4YUkZ0o2cZU+7pLZB8nkbVVFyYvrz7t5Mi7lXtyrXO8/2Ga N3jKaJKXG0xU1xaI6bDdDxXRx4Bw/ls= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=a3e0xRg0; spf=pass (imf30.hostedemail.com: domain of agordeev@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=agordeev@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3ALBc2v1023436; Tue, 21 Nov 2023 12:03:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=UbI3gRx2z11WJvUL9FqBRaWO2/YxaKCV9eYngKPduqY=; b=a3e0xRg0LtYV+rUXxM0fFf/nmsd9WAnKkD6Z/1WZ2zPez5g2YH1K9LXFkBJ/d1SQbkpI gNzZ3MirvbMIJoBdWcUdJLJrypKmosyJJSKIEyNY6u+yQGIBy1LRSUW2E5WOe0n2/0H0 +FJ2LXtgHK9daJgcCFDl0Rd3COC5hKNpmoiohyiDhqnUTlFIE+fiBYPomkN5+Irk8z3t lJXk/utmJolm19/gIQ0QljqjekAcHXg3UVlBBNkt65as+0MLUb2tgQwgl8ZUQfSdzquT 76BC3BkqrLyeXBmSxJ+zHr7zPiIdklEKhQ2+VhJI/LQJ8SSvWhyTHWOx6jF2O555Vmko lw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3uguuj0ns6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Nov 2023 12:03:15 +0000 Received: from m0360072.ppops.net (m0360072.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3ALBugM3015000; Tue, 21 Nov 2023 12:03:14 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3uguuj0nrq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Nov 2023 12:03:14 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3ALBnHvF015865; Tue, 21 Nov 2023 12:03:14 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3uf8knrd03-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Nov 2023 12:03:13 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3ALC3AA217564168 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 Nov 2023 12:03:10 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B050E200CC; Tue, 21 Nov 2023 12:03:10 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A0C2E200CB; Tue, 21 Nov 2023 12:03:10 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTPS; Tue, 21 Nov 2023 12:03:10 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 55669) id 65D3DE0320; Tue, 21 Nov 2023 13:03:10 +0100 (CET) From: Alexander Gordeev To: Vishal Moola Cc: linux-mm@kvack.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Gerald Schaefer , Heiko Carstens Subject: [PATCH] pgtable: do not expose _refcount field via ptdesc Date: Tue, 21 Nov 2023 13:03:10 +0100 Message-Id: <20231121120310.696335-1-agordeev@linux.ibm.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: YznpofG2GbqLlI3z4KWXDiYITvyETh0y X-Proofpoint-ORIG-GUID: hT0Li9jmuNkQcOhBZADPauH-OGkCMEb_ 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_05,2023-11-21_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 mlxlogscore=994 clxscore=1015 adultscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311210094 X-Rspamd-Queue-Id: 9C9B98002F X-Rspam-User: X-Stat-Signature: px498ndwfpau154fzrkpbufypk7fj57a X-Rspamd-Server: rspam03 X-HE-Tag: 1700568196-493349 X-HE-Meta: U2FsdGVkX19fOFG8pw177yEw5rtN2kzpeM3OUQwAwJsxj7fdJbOnHL7BFYimIzNmY7xz940Kkn8ecP2OY5lx+Tkt65ICYwZzEELNmI4jLChcr8Gnd8oCSNJe8LPkqp1M106ND86TJn5mFLCMtd0/B/cWM6oTP3Xr4/mFgfF7GWsQrg9YU3OYfZS5AUGfx2W0SDtL7SJC9qdb5K/5DNTW3Vd+RD1c+sCsJ2BwZNBalovthcOkl7eVQx4oIah2lKKIsGcfgdBSycmvEBKgg5TtnsA8GmhkHzXwDKXV21ICFF/5lRh58017F/UTC/F/sX/HHUxxMBAPT9w/Z7rHK7xI7Jd/+1s3hkdAUxumMCjCutcbSVJOhveDbMuAWJKKrytPu57l0WLGQXBXqs0DPCr6esdq8QengDNqlVCIwZSsgDMq3NMeaTCyfr1wfHAY5PjuIDZRWdtw+X9ldmt0ilsXB3wlktTzRIY7JGMM7BlfM/gQU47T60v5NjYgl3cDYVfK9Bz8idIUb/N/voFp/yuEQHwcgPK335VIGMDyk6+eEOiJNzoFVpXhwS+EXBpTLCGauJ8nkP3tJJmIb9iOFcuz66WvXVymiaFl0ZJ+/XKVSbsCxSuDDbBtUb1GIxXyfdUyyIbRz33Vl1JkX162M6jEM8rZzmOaup/XEXoTqj8Itf4s9pbTOfGtI5jD3Ou4Tv7O4/7r0y/X5edrZ0DeiEqxM56wBEVKnD3NSAJVS4KNbR4eu36GaEaKkRPcaEW/r+CepYVl24ObBrQZVfmJ0m2pCSZ+6qfqKgtRhEnGs2Guazs46rzWz3p3GwpeBJgL/1+zUT8ci9Fk3mGRvILPx7MqkCzxni9pK4GWLeRXJ+HPx5sDX/GDhuTu0Skm3cOgORuuoZKJ8ltEsYGDD5j3wqGA/tHDZ8fEhqpr065BqqZN4uPNLSs4LhEpoPVVHVMFgXFKdhI8cckWtr4iDbvs/8Z 9ax3FtgS BzskRKtFv/Rh/YBWdZrHxDxMkLTv4HbP/bMFA420g7AxpfJKW7I+hjqf/fsOlAb8WVf7Pg73Iz7uJ5Svjc+Jw/CnhjTyI7vtXpGjCVgY8XQsnItAzlAx6kr8KgmDuJRc1kicm1aO64n0zgmXDecC7+CSFMLcjvQJ1qIPKaRP1izOM4yDR+zU5zMHCbYzs8/JTYKhWJRCiz4N94QvMlfJ2MAbLDQ== 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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 957ce38768b2..0330e0ddca11 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -401,11 +401,10 @@ 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_memcg_data: Memcg data. Tracked for page tables here. * * This struct overlays struct page for now. Do not modify without a good @@ -438,7 +437,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 +451,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