From patchwork Tue Jul 23 15:35:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13740174 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 8C8A6C3DA63 for ; Tue, 23 Jul 2024 15:35:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6FA0D6B00B9; Tue, 23 Jul 2024 11:35:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 63A586B00BC; Tue, 23 Jul 2024 11:35:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 37B9E6B00BA; Tue, 23 Jul 2024 11:35:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 1728A6B00B9 for ; Tue, 23 Jul 2024 11:35:13 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id B9496801C9 for ; Tue, 23 Jul 2024 15:35:12 +0000 (UTC) X-FDA: 82371416064.21.E14EA19 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf25.hostedemail.com (Postfix) with ESMTP id 1F2FBA002A for ; Tue, 23 Jul 2024 15:35:07 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Wix4ip4b; spf=none (imf25.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1721748863; 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=5qfarQf/HcpWv0H28k3K2oNhrJDB2EHlR8Yx12bkJ3U=; b=Ki3pLrqJ/jFo2ls8CnD5xKPAMJkdFj5wTUPuzXNH4/NFZetFO2OZhJFyIslehSG/ImbX2D CzYC1plRviWNpnvRo628550O9DvObO2fUG/DzZ5X76+GZj7KEOIDJBAjBUWIO3e4IMSD4t c6rEU6otiwAO7A8+lIYSadrPhp1n9gY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721748863; a=rsa-sha256; cv=none; b=ui/3+3bcgFigoMz/YpQypURLSYMTEtCiJ23dAOMkXeSDp1YoxMcr41O4keKlkT62yKGOAN X1krBnbEZf4hWQY22ugk+CQZcrVJ4VYTDmXUkXcSF+vtHEDMHnbUjgRvJ7AOwcERwCn8c0 /5/MIL8EcuqokQIqIRF3f+oRQPqNVdE= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Wix4ip4b; spf=none (imf25.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=5qfarQf/HcpWv0H28k3K2oNhrJDB2EHlR8Yx12bkJ3U=; b=Wix4ip4b8VcC39L3FGKOG1HhJL Qy3eaFTipD2W0cATfTG5aWZRTQqZOGCyyvQV78sVlFORoYnuklMkRmu0ykr1H/XbtAvIYbqXlNN5B EYwVIRUwOgOwGfWq2vPQ3EkQ95QqrA2w684bjT1ZyuXCPbqmfdgAyz/DUf0t9D6Mb7Yua1WF7oc0w 8MAq5fQq8qfxcYzTpRLqXjNI9n8aDcaUQwg0IhIlSNTNzL9PK3Btst5BWun8oCL26ztFu3w4bd9JN N4NEBvlZBAUomWE5lRYG8ly6xIb92tSUkMGKxR/OD/aq099CrYj0LRzgAYDeMS6RlcQhhZ+2eBp6Q QYtYTaGw==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWHXd-000000070LQ-2P8J; Tue, 23 Jul 2024 15:35:05 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org Subject: [PATCH 6/6] mm: Use page->private instead of page->index in percpu Date: Tue, 23 Jul 2024 16:35:01 +0100 Message-ID: <20240723153503.1669586-7-willy@infradead.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240723153503.1669586-1-willy@infradead.org> References: <20240723153503.1669586-1-willy@infradead.org> MIME-Version: 1.0 X-Stat-Signature: tsdajpmpaquuh3gytkxrzjkqotpgnsqu X-Rspamd-Queue-Id: 1F2FBA002A X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1721748907-134563 X-HE-Meta: U2FsdGVkX1+T5XDAj8KUm0NG30CAqoE7747P8puHmpWGoRXAZvdHg9SB7LcoMfh24BQiWe5eFs9NCa+Ms3KBX878K5LAUR2yFr+Dw9qiV+9PafLKRMgPu3Dp5uMu1DyvQf4Q6XBjWMgIt7QUPN3OQ/NcqNDMl8cpWHSomyGudxM+IWPyiyxQydMQY70+EfwWESNePWTYbShX4tvR94OkQRyR4x3wu6CnXq5p5eb2t6BuGp2OUpc45lqUOkPXB6JrtCn7p+bWN/hrncwbAWSZ3EAFsTbDUvK2PYtM84BqeruJHJjE/54Fzwl/AGc6PJemhKwDdH+9/C59PsBl/yJJwOrKSqdmhutF0YyCNHRawnTwGlpWtmDCQhpdibx4LDGV1HMb4nm/ZjMOqsffYiEw5KXr42WsQXtAbSICgxcCwL+5vcVfhCedeRlzJe4qWN6qhBoNPWycqJjsoWgBY2t627U4bzyd89ZvZBXFiCx1I70M3/uGq2aLdMSXo2ary/YcttWDj89jscX/dSx5mWf99+ziqv5Pz3GSLtVUQj3dGKl9Dt4+JACGIFahd/oISEereylTLDhQvWIj/TNh1G2D53NDaHIc4K+3plvDqnUMiFI8NJcqu9ghrZI5j2cWx5Zijrs1T8dDIgJZe6C+RcaDigF1VWXWZfudsy6BROc6Af5P9mYUMrOFROoHSPxhoIOD9CIDwi54rpJXEY7h5GNyGpMn1CSxDR3pxZVIhenW8OFlc4ea/f2sY9TXlm1alL+irF1pkpt/9XZlXcttW2cfJLK8FvQDgD0OqQT/Pj3Gfqvdg9ro/EBZ5kxzyhVo60fMBlWgp86tMfASpYPcDZT66T/auqQtTAzi04cbzMYlVPNQf24Q1qIiyCjAaAoNX+sb+EjlbxXnRfLvKM/aoPSZDg3RiHKtRhYp+UXdrDS/eYexPzYrX+J/0LhyeczdTgRLUnDZnOHq0JTIGwSGJAN Kls9jQGI uUhEXqIZFnTnPPhA58WNxqU/XFm5iqg5SU3WYsbk57qZYBuWDDmdD5BHCM2TsszMn96CBuztXkGkrHyIL/ROPNurxfJMRf0T7m7tVvGmykh6zpV68YZE2O/O04BRFUD1epGC5HpZaV0GJEEaOC1dBaRN5riG3fYIcCOs50xEe3o0ctFBskK6HC6iqAwvozwlqy0s4rppTEi6bcNRdTHWCnomcGw== 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: The percpu allocator only uses one field in struct page, just change it from page->index to page->private. Signed-off-by: Matthew Wilcox (Oracle) --- mm/percpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/percpu.c b/mm/percpu.c index 20d91af8c033..763fe7641602 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -253,13 +253,13 @@ static int pcpu_chunk_slot(const struct pcpu_chunk *chunk) /* set the pointer to a chunk in a page struct */ static void pcpu_set_page_chunk(struct page *page, struct pcpu_chunk *pcpu) { - page->index = (unsigned long)pcpu; + page->private = (unsigned long)pcpu; } /* obtain pointer to a chunk from a page struct */ static struct pcpu_chunk *pcpu_get_page_chunk(struct page *page) { - return (struct pcpu_chunk *)page->index; + return (struct pcpu_chunk *)page->private; } static int __maybe_unused pcpu_page_idx(unsigned int cpu, int page_idx)