Message ID | 20230622205745.79707-7-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 B783AC0015E for <linux-mm@archiver.kernel.org>; Thu, 22 Jun 2023 20:58:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 092398D0009; Thu, 22 Jun 2023 16:58:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 01C0E8D0001; Thu, 22 Jun 2023 16:58:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DD94D8D0009; Thu, 22 Jun 2023 16:58:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id CBEA48D0001 for <linux-mm@kvack.org>; Thu, 22 Jun 2023 16:58:11 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 8A29E8028A for <linux-mm@kvack.org>; Thu, 22 Jun 2023 20:58:11 +0000 (UTC) X-FDA: 80931596382.28.9D24707 Received: from mail-oo1-f48.google.com (mail-oo1-f48.google.com [209.85.161.48]) by imf29.hostedemail.com (Postfix) with ESMTP id A9012120003 for <linux-mm@kvack.org>; Thu, 22 Jun 2023 20:58:09 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=UtF2QiZk; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf29.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.161.48 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=1687467489; 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=sr5TgrSX24KD5rPSp2rkPhxpII4heal/IIgk1FACoIs=; b=3fM6P5WTccqvIYU7pKYbdmqfndxq71F/T1nKY7HF3JLFR8VrptNlavKrQ7NUlJzkAwCzAX oOQJ/12FNyN+top+RlhboZwQhLsu2J9VOnsb2ZSiDBBBJ5EGxv9S4fH1NetMuwzxOLL2fn BvQG9Cq0iPi1b9butDYQ7uVK91NCR6o= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=UtF2QiZk; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf29.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.161.48 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1687467489; a=rsa-sha256; cv=none; b=gRsf1AuLW/veRq48b+Eko+9x6CHOe5i6NVdiYJQhsECIMoqfCBzJbJAgZBPdjTHEJqFezS zJcyvGUi6K4vThlLJf3ncs9Y85v9XPjj2650cAlUPH8vRdqJoFt4NaaJZktTH8bkheq3W4 4y8EYGBhAagtcYIII0Jo0wDBp1iKeiQ= Received: by mail-oo1-f48.google.com with SMTP id 006d021491bc7-5608bb16496so2706690eaf.3 for <linux-mm@kvack.org>; Thu, 22 Jun 2023 13:58:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687467488; x=1690059488; 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=sr5TgrSX24KD5rPSp2rkPhxpII4heal/IIgk1FACoIs=; b=UtF2QiZk6b9G+hZ8o+uaaa8jIMv9kwu5Z4W+DnKhqSxtuxZLeuCmgWiQ2UyCbKdGf3 JlKYQP1/9HAEwi4YcMuZIpkc1UasphklUD1y4PAfxdaiUenlc82pk0MDNgE4UyvTP/Ti WAZ4mtTP+0UbBT6PIwdrRUvrUpbxA+faq7jSe2iTSffGzc1HNKXsxuak3eG36Kz3Hx1p 3Bw014l7N9peXiYCyjbUvF7k31KviCnInVoJPhH8kz/FXkdJ8oxWXWbjuOh6BjmUEfNL NLvkARmq7C0ZzVI4l8HT21OfZWS/swkiU6k+jkbLgeAOyE/KVS/34HjWz0qthh2YGY4M vuhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687467488; x=1690059488; 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=sr5TgrSX24KD5rPSp2rkPhxpII4heal/IIgk1FACoIs=; b=VKHpXMPVGn7mt479M6GyW3cnp/+lecdipL7pJoKykBnz2O6u71kQ+PbvinA2Rrg2rz rFHGkIMHSDgh3l1GpZPc86WwNxqDKb8Lt19bRASED4sZk6YTw0V1IDyM/Zh5crPi9Y/g /w5ufev08SiHg0VFF5s3Kq740CrepSaLfyMtwVveIU7QaLNDAQw341cx8fKlSygC6rV/ KZMo2DAcAiXkwmjjrwBJjU8aioCzzhHk6khEgFHUfNYFOO+E/zkpGQcSnAnNHiHFxUmb SAG1d7gTWYs4l5R2gJam7K4RkdV7vLfM+UKefdty3de/vpd2rxjunebFNVbHaBSG/6+A Lz8Q== X-Gm-Message-State: AC+VfDz/CmTyu3b+6TQLyKkpNHao3uxmyyu/qdRgZbp9kFvmmNL/mVbx WARUkcXuh6k8zemUjj4ZGVh8ddINRmaJIg== X-Google-Smtp-Source: ACHHUZ6Wv4q+lCV8nxexJGI3S2vfJP94k7k+pAexpWAqQNNuxMHJpmGx+Tn2Ll2+HAYtwXHgGRnsHw== X-Received: by 2002:a05:6358:9f9f:b0:132:d8bc:b15b with SMTP id fy31-20020a0563589f9f00b00132d8bcb15bmr1343396rwb.2.1687467488545; Thu, 22 Jun 2023 13:58:08 -0700 (PDT) Received: from unknowna0e70b2ca394.attlocal.net ([2600:1700:2f7d:1800::36]) by smtp.googlemail.com with ESMTPSA id d18-20020a5b0c52000000b00bc501a1b062sm1684937ybr.42.2023.06.22.13.58.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 13:58:08 -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 v5 06/33] mm: Convert ptlock_alloc() to use ptdescs Date: Thu, 22 Jun 2023 13:57:18 -0700 Message-Id: <20230622205745.79707-7-vishal.moola@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230622205745.79707-1-vishal.moola@gmail.com> References: <20230622205745.79707-1-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A9012120003 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 49wm6drs54y9p9owmhadmyrumh7x5g4j X-HE-Tag: 1687467489-797926 X-HE-Meta: U2FsdGVkX18Dm68tkrbtiMZW2fTfpFu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sf7JfhINkYQPn67CUT68KrKB2yj/uWlQ4Cbx4qQ2WNhsKAFVnZcf3xdfBY0pEh665S+83Zf8nYaubI4wMLPkzdnL2xY7wlZ7+vIsby5ZkbFErES/sBM4LnjDzuLANr3e1/CKjRfBfZOILi+qkw0pw2k5rK5sUtuhludUkyl+akJNWFf1MiJK0Zd+4UftuCzDpSret/JPPnE71zsFihnj1+pmp9H2RjP7zK7x9oaEnonsG8xwKny4d8p/cxO3ooSaZKMkmI6cq+cdvcDfr5RFfY+iQrBaFzUrYoTEgxkQSNTUtv37WNqydqYlaVq/8t9kh2UYiUV69NBjDnqgOxdr7k6ijzaeHit/XMGzMy7p43pkuURkSmRjiBf6Wxsg2rfILIRwkq6Sj1yUoIbRL1EzGc8dlEoNDiW0oBuW0UwiZ+vgZuzO4lGhSduhq/QiqLVUf2g6LfSCi6rvD3IrjZhWN5d3eigm+nU8nYOg4sa1yedFhfmLMO3iQ43tOXT22OcU4jCtqedBu37QnsYGJlDC 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 1511faf0263c..39b0a4661e44 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2798,7 +2798,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) @@ -2810,7 +2810,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; } @@ -2840,7 +2840,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 80faf3e76232..2ff14f50c7b3 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -5920,14 +5920,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; }