Message ID | 20230725042051.36691-6-vishal.moola@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 BE1F2C04A6A for <linux-mm@archiver.kernel.org>; Tue, 25 Jul 2023 04:21:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 51B5B6B007E; Tue, 25 Jul 2023 00:21:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4CBC66B0080; Tue, 25 Jul 2023 00:21:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 31DC76B0081; Tue, 25 Jul 2023 00:21:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 21ED76B007E for <linux-mm@kvack.org>; Tue, 25 Jul 2023 00:21:20 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id EAB3FA038A for <linux-mm@kvack.org>; Tue, 25 Jul 2023 04:21:19 +0000 (UTC) X-FDA: 81048834678.03.2CFEE5C Received: from mail-yb1-f171.google.com (mail-yb1-f171.google.com [209.85.219.171]) by imf09.hostedemail.com (Postfix) with ESMTP id 29789140009 for <linux-mm@kvack.org>; Tue, 25 Jul 2023 04:21:17 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b="gPFq/JoY"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf09.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.219.171 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690258878; 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=hLtCJBysrabsGyMeKlbK2lKTjEzHhmjaMpElw0hOQuQ=; b=0GblmfU5nZnpdrqUAOnj9sc1evkSPbXmltyHr2jVWb8hxwaJSFab06CY6yHMX8ty0Jb+Yo NV2DJ9TIZKSMH6t8k2kzUM1YD3Cj6Xiz8XzGdi1yEThLjWYDtDEupNzwH/4v9cGaGRtc6F WeOxYt4Z9GNJkv+xvhAnOv1WWiYXW8M= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b="gPFq/JoY"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf09.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.219.171 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690258878; a=rsa-sha256; cv=none; b=IwZb3b2URh+sd8DUGbHBF82DMCfiBH3z5rBL9XeX89eqgXNlFI3zRmxNZRtuxlYWEiTYF6 M/Xpi/vSGZpBXlbt2ZyE0ezXSRSIOxXoHvAOuHOLYVbRj7g0pngZeT6sbK75rrf0hag9L8 6WeZ1aV1MU5QGDfYZ5Qka3dbwjlrazY= Received: by mail-yb1-f171.google.com with SMTP id 3f1490d57ef6-d124309864dso1372603276.3 for <linux-mm@kvack.org>; Mon, 24 Jul 2023 21:21:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690258877; x=1690863677; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hLtCJBysrabsGyMeKlbK2lKTjEzHhmjaMpElw0hOQuQ=; b=gPFq/JoYwJjLf9rVCoB8Lw8LOssqafkFQKm1MRAos7/YFfmCVQ5zZtnC0rhhBdQCXk N7cP2rb2Gc3I1sIFDEA6WDVqpFvuzV9g0ksMwxcFOLrW1SrVCbGbF2JEMKH7iGrlo6kh szCDqr3K9qHITaCMG+6I4Bv2DGuidVlNjZotb70C80Hqf3ER0SLHbbdax/uMFjYuJbcP w5E647QIdwTWza0fMIXSMCOI01eppzdj1zv2JddPFf9pPmBUxHnIhf/jhE5I9HeeHTOn pGU0qrcAaECYa9O8B/YJzvoVn8SSXjyAEPRTA5PEQfVza6O4EJzAJ9koweASwJRx6Tml xocw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690258877; x=1690863677; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hLtCJBysrabsGyMeKlbK2lKTjEzHhmjaMpElw0hOQuQ=; b=FzsnGXdKTx3oISPjIItwBFl8BNQ/5XP43LLl1LtQR0VwMJRtseS12qKnXB6Stq46Ac D6bLvezxFj7/WN1/rgxMdg6U6npZWEjhreuLLMhoWq2X0s44ql/4A7t+e0SB7iQI/vxn I1AljAft2pyjzw+8jwTE+oQiTKQ+BWzPtHRHwU5MwmiSrm2/kgImzyR2PZhNNfhYVbR6 xHLuDJ7vqmz4wiXdCg44lcTjMpvmWxu9ruxlTKM069kk/4jUHjiEJH08Bk/Kqc5AxO1g 0L1JxoLtU42xEXC2y4Dw1eK/ZWAAgTwOiRDMw8bbDaHkh8t1Cu0F0yjxKnVSzqVO5vq4 1vzg== X-Gm-Message-State: ABy/qLbBdl0iDTzwW0KFWsFA/cTGcGX5fjtiORVx56l8n9ZR15PxjPxz Y5B6hnZIy0xwaZlc8gRJfWM= X-Google-Smtp-Source: APBJJlHyqmJ7X8HSspT6LddsJqdqN9Il/WFvcTF4BUwycttfbECYy8j8wA/EIsdExukzdWEa0jT4RQ== X-Received: by 2002:a25:4cca:0:b0:d01:52da:9625 with SMTP id z193-20020a254cca000000b00d0152da9625mr7877273yba.13.1690258877265; Mon, 24 Jul 2023 21:21:17 -0700 (PDT) Received: from unknowna0e70b2ca394.attlocal.net ([2600:1700:2f7d:1800::16]) by smtp.googlemail.com with ESMTPSA id h9-20020a25b189000000b00d0db687ef48sm1175540ybj.61.2023.07.24.21.21.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jul 2023 21:21:16 -0700 (PDT) From: "Vishal Moola (Oracle)" <vishal.moola@gmail.com> To: Andrew Morton <akpm@linux-foundation.org>, Matthew Wilcox <willy@infradead.org> Cc: linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-openrisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, xen-devel@lists.xenproject.org, kvm@vger.kernel.org, Hugh Dickins <hughd@google.com>, "Vishal Moola (Oracle)" <vishal.moola@gmail.com>, Mike Rapoport <rppt@kernel.org> Subject: [PATCH mm-unstable v7 05/31] mm: Convert ptlock_alloc() to use ptdescs Date: Mon, 24 Jul 2023 21:20:25 -0700 Message-Id: <20230725042051.36691-6-vishal.moola@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230725042051.36691-1-vishal.moola@gmail.com> References: <20230725042051.36691-1-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 29789140009 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 6pi3nxdam31wh91z744wm6ebcegcmf3k X-HE-Tag: 1690258877-983633 X-HE-Meta: U2FsdGVkX1+9A/+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1Py1mX1+Mms4DlEZKKwP1PCEGluH61FrM+aZIKGq+lBm8FXf5yqbDSUEUrv6Ack0ACVQUjQ98sIovzC1WQieORKfeuEn3EjkacERsQNa2d9cp8hgdrTzs05A/USEMSu/OcA13a1iMno6OFkd4kG/LYFBX0fJhVvJlFMJzheTHWWxJZw3S6JdUhig1YwMjTk7U37lD2RcmfZaWzP6cwvdJdo8rWvcn8ms4W80mjKYnG38CNnVPfVd2awagWlHtscqbYj/Tu8+Sg+v5HsmeiZDt6OCsQ3vDaHvmUV6P1AaFSxJxFmnO23/CpANjfyjFTX/TwGQubKVRWd7hN0e0ADzSnq8tuX8HOBGJx94Ai06vHEpQ0jidMiSYBpm4ra1RAiZ7LuWdQTAFmqL7fa817FRWLHYTKY9ui03yeXndB5THQTa8vTCaHnATOA+X6B2POeClAb/fP+f9Uy6XpSY90WC+VP1FYJELX8fmCFDS45VUh4p/4+2U0VDn8ceM93VV6eHPWjajDWuWhXQPVoE3NtkDm4L1XewSMWLwp/yQcArQD+T4RoxMCw= 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: <linux-mm.kvack.org> |
Series |
Split ptdesc from struct page
|
expand
|
diff --git a/include/linux/mm.h b/include/linux/mm.h index bf552a106e4a..b3fce0bfe201 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2841,7 +2841,7 @@ static inline void pagetable_free(struct ptdesc *pt) #if USE_SPLIT_PTE_PTLOCKS #if ALLOC_SPLIT_PTLOCKS void __init ptlock_cache_init(void); -extern bool ptlock_alloc(struct page *page); +bool ptlock_alloc(struct ptdesc *ptdesc); extern void ptlock_free(struct page *page); static inline spinlock_t *ptlock_ptr(struct page *page) @@ -2853,7 +2853,7 @@ static inline void ptlock_cache_init(void) { } -static inline bool ptlock_alloc(struct page *page) +static inline bool ptlock_alloc(struct ptdesc *ptdesc) { return true; } @@ -2883,7 +2883,7 @@ static inline bool ptlock_init(struct page *page) * slab code uses page->slab_cache, which share storage with page->ptl. */ VM_BUG_ON_PAGE(*(unsigned long *)&page->ptl, page); - if (!ptlock_alloc(page)) + if (!ptlock_alloc(page_ptdesc(page))) return false; spin_lock_init(ptlock_ptr(page)); return true; diff --git a/mm/memory.c b/mm/memory.c index 2130bad76eb1..4fee273595e2 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -6231,14 +6231,14 @@ void __init ptlock_cache_init(void) SLAB_PANIC, NULL); } -bool ptlock_alloc(struct page *page) +bool ptlock_alloc(struct ptdesc *ptdesc) { spinlock_t *ptl; ptl = kmem_cache_alloc(page_ptl_cachep, GFP_KERNEL); if (!ptl) return false; - page->ptl = ptl; + ptdesc->ptl = ptl; return true; }