From patchwork Wed Aug 30 18:49:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13370628 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 DE982C83F17 for ; Wed, 30 Aug 2023 18:50:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 30626440175; Wed, 30 Aug 2023 14:50:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 151EE440171; Wed, 30 Aug 2023 14:50:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E23C3440173; Wed, 30 Aug 2023 14:50:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id CC6C2440170 for ; Wed, 30 Aug 2023 14:50:36 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id A38FD1A036B for ; Wed, 30 Aug 2023 18:50:36 +0000 (UTC) X-FDA: 81181662072.01.7CD74A1 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf25.hostedemail.com (Postfix) with ESMTP id 34FC2A001C for ; Wed, 30 Aug 2023 18:50:33 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=RK56wnOu; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=mQSij2sF; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf25.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1693421433; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=f4OnxoLyqQLXegBCEBZgTprHs3FXRbEDL24PiKFwl6s=; b=t8iSZRC3mFBbmyyQRUB7Vmf5Dq8CuykVxmNY4mh+rRdm1r2SddhT9uoka3nFR42b+L0Wke 9HNmkceunLOHeZ4GPQ9CdXue20TrpuZU1JpJlEMIQlJP9UZb7KETMxHWdLjdaJrBrbt3P6 WZO2qWfOOKQ2dAg5GXPtsTZUBO0oO1Y= ARC-Authentication-Results: i=2; imf25.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=RK56wnOu; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=mQSij2sF; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf25.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1693421433; a=rsa-sha256; cv=pass; b=7k/E0cle6DMjM7xwks8iBmiDKg+INbW1B3gBTB4G7MAJ8KLOJpOaiQgG5dotye0QRiwCMf fs2dIJHNjWf03VjmpXPdM5rzz8b3Z6U8ljigbPbUn7ymj9e7awZDu1PAyEyNkp9OV0eCWn Pr9QYIJ/n/MhqH/a5M4iZCggc5JahRY= Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37UInWYr032351; Wed, 30 Aug 2023 18:50:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=f4OnxoLyqQLXegBCEBZgTprHs3FXRbEDL24PiKFwl6s=; b=RK56wnOu0QkZnqxXtEboZftEvj3JUv080fonk/+0gHTOOvTw7L/cMPx+AFJN6AdHcBil iZBWRJCt+1lJsvtm28C45xjyNhvEl6hGU//2VRSr6OP1IhkX+ZVQ5tW5p12nX4Yr60H1 WgWtAUU/om0pqn6uxoYD7qX799j0yA3SFCE31QntrW78sY1uo0kaEPvNNjRuvmjONUGv Mz9qX28sHojw6zHK9T+2wOem8eYsPufN+ZlyiGupl2ReB0/qNaggRaYBIInEYygBXGFZ 4ChqchpSHEuzwdaaNZT2bK4y0z+uH08VZPiciLbUReSjJt8CJCLzlGw+kY/pZ0N0kEE8 Sw== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3sq9k686be-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Aug 2023 18:50:19 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 37UH8ZkU024310; Wed, 30 Aug 2023 18:50:18 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2042.outbound.protection.outlook.com [104.47.66.42]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3sr6dpxdpj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Aug 2023 18:50:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H8Xs569DfhBMDWIx4oYi2tvNYohrKLluzf5YBgQD6Zd8pZUJ4U7EbXLEo6Ujq8BMseL4it+qNQgluUOamBna3zsD8lMVsoXKJy5EosExOf+FT8OtFjRCcN6ut/ZdFzgua4bkDCd3suFnjhLGFjlOC95xOC7oJnqNqqELBNDnWugsVk7d/ZtrTmDAUKvk283UWPjpXcg9VKn+k0nhm+jGv97NWX0Dijn+93Wl3Y1sXIyuGPPIkpFSxguHkH+91pbFva0JrWdjmYDaBia8YKMyMkLuaJFVL9V0uOt90x67qrpAhkYdDoezUjB/N2CQ/79EBVvCXLJ3jCiKsnB1iAsoUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=f4OnxoLyqQLXegBCEBZgTprHs3FXRbEDL24PiKFwl6s=; b=HCG0LwtYtWklSbdIm7GxY7e7b274OOIDlZXuNk4GeZUENMy6He0A6SsGl0ho3XwxmlzL3ms5Z64+2OFGW3fZv/lP36RqCUPj3Yb9AiSDUv5GodhlG+3BYXqc1rMzoYtn7yUTXJoGy2Z+hCDClp07Txc6JPJqHDmOutAQTY1uMLa6incS7PdMUmyQ+QJiNk3/7pW3lcoP4cvnT5hjHOiC2cDiwowRtTTBgwwaIop+A19F/EntWrXPQDoS7TQLl/1y5boJvH4KAEgMv/p9q07/ln4ode2baN0QtsohEweK2yDY0VtiiGqx0e4hh69+3AwdCjGqIytA/QFywzmxIcabqg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f4OnxoLyqQLXegBCEBZgTprHs3FXRbEDL24PiKFwl6s=; b=mQSij2sFzFH8OF49dSJHo/HEyZWcj9i4r/H3CJfmd/InDcvKDv+E6araT8qKmOdpxGzrtCYWwc0DGqidrLrU+E/UZGtmXq4JrKRUoAzSmUwwDm1Ha8ycoOzYV3uOdTF38l65K71DzU9CAgUKfiLkQetx89ytqmLwJS/ZPzNChFI= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CYXPR10MB7897.namprd10.prod.outlook.com (2603:10b6:930:da::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.20; Wed, 30 Aug 2023 18:50:16 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::238e:5e86:cbd0:7415]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::238e:5e86:cbd0:7415%4]) with mapi id 15.20.6699.035; Wed, 30 Aug 2023 18:50:16 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org Cc: akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, peterz@infradead.org, rostedt@goodmis.org, tglx@linutronix.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, Ankur Arora Subject: [PATCH v2 5/9] x86/clear_page: add clear_pages() Date: Wed, 30 Aug 2023 11:49:54 -0700 Message-Id: <20230830184958.2333078-6-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230830184958.2333078-1-ankur.a.arora@oracle.com> References: <20230830184958.2333078-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR03CA0037.namprd03.prod.outlook.com (2603:10b6:303:8e::12) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CYXPR10MB7897:EE_ X-MS-Office365-Filtering-Correlation-Id: 15522295-d22b-44f4-8411-08dba989f376 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: USGohVyEfoXKqZ7N8gal4AAUWfEUluDAJW0m8qk38KHSH2bKnMBTZnyx0oq60UU8QRtun2Jj9c/YCc8I9Cu1kIgIZkcZ/X2YXNGHZpSYybk1C9EXxyu2qXXZ11wIQ/ZKEJvwR1DcR7Ed3CdM4/Lh67ckdA6XG5HraPBZdeUAP493zzB4kdZ/OIIakf9YNFLNFGcVxrLGQL/OO79lh5qPlaQdHmjt5LjosZEhR9QDDRP3t7UoqIrFcI5qR11HvVYfoCzPqM2ccxODnAAr+Z3SBDP6IabOqJ7AkFpI/LqVnUJ7qVr4Njiiksl08/ssdV8qoIeQwwITDZz7VA6eSsariHcRKasfi7ZUvtMpRNK/D8qDro5IfKjwxAj4o7ZfUlS14E+OH3YvA/jMnen96e0eRb5Q/1Vq3JRIfoDrrByeCioAW6OFAz92mKIbxZIzKs+M1OyWXLvqd5hdRxdY2ZQljrhsLqvficZFlv7DgtO5j6OaMbtCt1wv0lAUs/Z8/Bpy1YfRoFvXX2/w0QvI+su5lkkxrP43uxBYpO+ZdEFs+HatxJUjnHknpoOnQKstbAYS X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(39860400002)(376002)(396003)(136003)(366004)(451199024)(186009)(1800799009)(478600001)(38100700002)(26005)(1076003)(36756003)(66946007)(41300700001)(6512007)(83380400001)(2616005)(107886003)(66476007)(66556008)(6486002)(6506007)(316002)(6666004)(7416002)(5660300002)(4326008)(8676002)(103116003)(8936002)(86362001)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uTu5kpS8sz1hUDLsjANxDWQSDL1AHRQ/Lrwzo6DdSKtBV2JVi7ynx7DVfukChaK4TFII3bjIYSQrcXYQPrejm+V2jLNbLg7hezF8EM+ireVXAB/lN78nveP/9Iqof+6cPPxxQLQqaKXggdkhjorhd6mdcCc39SRH9KeN9/XTHX7B2voVUHL23H+W69vvRkLCWLHCIGLyi+QglzK4e0EJ7yRrBnPc/nVLOZwbNxFUtZ+3UyXYaOq9hpLfvyJfNsT/aQLcnXl8XB/xo4r6x0wD4i7+JfAllEqVmtBa4Aws019Oahdxw4Vp6jY6AtxY9cNC2LQ4euekRezAQtskAssCfDgQde4rew1QVdtRqY1kxdPkRdJY18SYV+Lkd4sfkO57CrB42356TCZmnLw4sk9Q0BUIlZr1O73J5B1LISRhixMcNzueELnx9/fFIxj7Ty1wll6BcqZlK0Xp3jA5hR06d3WLJ4wTHX3zJOsrRzmvJGVP5o0cqA+ad2DbWyGfo1MWReO0VKYPiiPewyYOFkM3UxJX4OIcFjhMwPGoKGzygp98Yuq77TP6KCkZA1T1Ezldm40W9NnjDwgqzn7P/cHB+cOOEI19U6C62YfkUhFlOIxvO5x2NLxLpVaz/tkQQC703wBCJ9DymIQ7RD7ep4lC6Vt3/MjfZBfs2NUpoSKLZZaLO9778aPkrmn/9pPmcY+89RK6o/7Y3bpNFv8NOTcl2FAyssEj3Ub0qADaGuPKh+oCUmvE5i8u5fuhVWpwFr6tQbhUDx/MLMFJKa6aV0qPKuuZoj30chO7q5nW6pcu9/OYkrVmkI1rP+C4EAC8QBPGYBUJgrg2okLTZz3QYvK7DHb53NgB9LTsV4HcyFqh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duQAjeWjb5qtXMeEUUAqjVONB0LtWW8hJ+evr7qZo5a1gESuCYUeMpX9NXINmN3HrUYNhhA8uaeSsGHA1lppA1E+Q7LKTVqvYgAHwgelshFzhISdncwdtKsbixVeiKfzBVp1ZXy0qn2SilIKUoLI1Lwd14n5FU0O/Bx6aa3j1lSU1YBk1Wfr++z6j/yiEnfbTYsPkfspgm3mb5i44nsBITV23AeD12xyk1vsOXUmeAGArjuEct9+/899gMAynCPnkUyfZUOesWqUpfFIlyhefH4F7iq9lC2MxCRX2bTqlI4D2/EtZ5PPqewcNGZOGaEbb5it2cLpMurR1oSG/TnF+zDopTvt3/MHsD4sLf8xFqUeLA/Pod3EXdmZ33zNeVWH3oR0sibjKR2bx2eXmVcU1oAKCEKyjYpgsqZmx7IO1NK6/rKOTglF+KsldIrchm5XX6W3GLAVKxTSkqBPKyfCTuImbjI9CdmUlH9pLf/gfjl9nBF7rNo6FWKSxj0BZ35+3V+ct+H+KrgRTP/SuI3CPOG+FbdBtmHpXqM+7oLYETKKSNIDM9FTRby5MJbFTR6sFPN4dF5lofK4OHzS79llS6bkUSCHfFq6+IRMSdhIBMmvjI3zZh77usblK3w4UOcFRPtkXrTXqPFnAw1Ou8RnuE9D7LBowhf/8rK0x2HZb4o+IfWZh43a7GQD+KWFGpeui99CbLUaoe905Ae4L9aPdIzlo3c6VMVgbgPjDmvRD9OvBiP435+p0eH5k9Iak/roCu8S+DJezkbMiJIPR4XOFTvb9eqx7+TbhxfjetmB/6xfChP7TVWHISZiAGra7kfmQuby+Ec5MBwGV8+dHFWBoig6PTDtBWfiLQK8Ony3t3HHKvke7dTYtpYxtLK6vGUhckd/xNsODEFc1C30La2eTNmCRJ72kVl3pDq8vwT76/0+auhaxA6XuVo= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 15522295-d22b-44f4-8411-08dba989f376 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2023 18:50:16.6142 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: V+i1tj9py8sU1bIso13RywBga3n8zHMg0IzyhH9xiDd2k4p1kidQEMFLFUn2Ox/b8NMg7z6xak7NeVxboIogunw420RRDm5kKUiOY+2dVmI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR10MB7897 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-08-30_15,2023-08-29_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 spamscore=0 adultscore=0 suspectscore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2308300170 X-Proofpoint-GUID: HYKnwjGXzyMIkziu8CDz8UyInc4rrSH5 X-Proofpoint-ORIG-GUID: HYKnwjGXzyMIkziu8CDz8UyInc4rrSH5 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 34FC2A001C X-Stat-Signature: q3u5b3rafgcbwutwwpnmf577tb1a9sg9 X-Rspam-User: X-HE-Tag: 1693421433-320425 X-HE-Meta: U2FsdGVkX1+8U0wPTeBfPBxkAeQ+wIEtZTEMty0ISKTOoS2uo//Ta7/3THD2t6Jz2lRt5SaA64jlIdhM26q2ZevcJ4CmMNLwaPJBECvcZa23NTSeUT40E9xaNPD001N9fs4bws/8C8NEHk0Ad85pE/jTZaA8DnP9fHF3Gv+SM3EYZi4VkF8LiUvT6zG2ez3njO2q/fTpoMKMstqqwAiwZUNj5ZbNH76kf3aZyFqJGD9QX4B5yVDcZI7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OaoABEo/LcZTe9XuUuRzT4kBBHZmNU5hLm//2afEGPl3YAWEioFANPsMldONci4kpsDrtjqzeEdCi5ZV+r1dzyAdH2wG8JwXJKzjVL2B3O3+jZ3i3GkMXE30/QK30Tvf/+sq3DLqAT4KgyzxgZdZKA8Qe4plCsJtgYUL6x5yPdgN7RD7BbIznB+FTnERgfJQiFOF4+I1sWAdUz63BgK1JqxX9UsHVU8QnShUbRJdFV4tpj/k= 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: Expose multi-page clearing via clear_pages(). Signed-off-by: Ankur Arora --- arch/x86/include/asm/page_64.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/page_64.h b/arch/x86/include/asm/page_64.h index 56f9adf0e892..1e71570ea987 100644 --- a/arch/x86/include/asm/page_64.h +++ b/arch/x86/include/asm/page_64.h @@ -43,9 +43,9 @@ void clear_pages_orig(void *page, unsigned int length); void clear_pages_rep(void *page, unsigned int length); void clear_pages_erms(void *page, unsigned int length); -static inline void clear_page(void *page) +static inline void clear_pages(void *page, unsigned int nsubpages) { - unsigned int length = PAGE_SIZE; + unsigned int length = nsubpages * PAGE_SIZE; /* * Clean up KMSAN metadata for the pages being cleared. The assembly call * below clobbers @page, so we perform unpoisoning before it. @@ -60,6 +60,11 @@ static inline void clear_page(void *page) : "cc", "memory", "rax", "rcx"); } +static inline void clear_page(void *page) +{ + clear_pages(page, 1); +} + void copy_page(void *to, void *from); #ifdef CONFIG_X86_5LEVEL