Message ID | 20230807230513.102486-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 CF38FC04A94 for <linux-mm@archiver.kernel.org>; Mon, 7 Aug 2023 23:05:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9C5EC94000A; Mon, 7 Aug 2023 19:05:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 97621940008; Mon, 7 Aug 2023 19:05:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 754C094000A; Mon, 7 Aug 2023 19:05:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 67640940008 for <linux-mm@kvack.org>; Mon, 7 Aug 2023 19:05:31 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 2DE8F401E2 for <linux-mm@kvack.org>; Mon, 7 Aug 2023 23:05:31 +0000 (UTC) X-FDA: 81098842062.16.6DCCBD5 Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) by imf01.hostedemail.com (Postfix) with ESMTP id 5C3C14000D for <linux-mm@kvack.org>; Mon, 7 Aug 2023 23:05:29 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=Q3CUliIC; spf=pass (imf01.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.167.175 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1691449529; 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=xo55EeeiRtqMJzFppY7LfosEC+4EKSW+Y1wbH/R/zko=; b=RjmJfGXzP4ayf4or5yYGYG7RaOLJHjeEKGt1B+cKe4XOBq4TEz6EntzUvkhBwElo8O10FG bZHiAFV+hhgAZa1r3O/5qwhLs4j8vQ0jsnMg+/QazDncLF+rzSfP/i33p04400qUXeTi6L XbgygspyWNQXeORjiTPqcoWOnlq1iIs= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691449529; a=rsa-sha256; cv=none; b=xBNev30JqwqVTFys8ubyhpaectsTcHG0oWYL5SmOPjDd/Bkw8uW/BJwukMD7DkSZpBQMy0 aBrQ4zTsZSqmowvhZf4Dek9ndqMWahum32/X8TMJ0lVpCbYDk2uCboYtP/prf3pdwodGNN EYK746mLkRX96Lt7Dnr8cE+5hyDwBXs= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=Q3CUliIC; spf=pass (imf01.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.167.175 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-oi1-f175.google.com with SMTP id 5614622812f47-3a3efebcc24so3748053b6e.1 for <linux-mm@kvack.org>; Mon, 07 Aug 2023 16:05:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691449528; x=1692054328; 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=xo55EeeiRtqMJzFppY7LfosEC+4EKSW+Y1wbH/R/zko=; b=Q3CUliICB5ucW5n1+cyfiOVvgvAwhYv3ZRrcZge/C2xN1y7mPAKTaAhnTC4tg457In GS5yV5pdx2fEbQ6Paw0G9gZpAwxLk7uLiA6v3+SIa2nM9cjP9BC4TMrWHjABBg1TkaAc jFqkxuJnd0T58a+3c4oi7Pn3k6jPqHaryISvoGLWFF1pysLGpyRN4pc1ANxWoEwI+30p K69XzaaIceuwI5auke9JvMGfHaTbti7Lrj0CNiE6K9RZ1Cm9I6s2gJdVHKhyUn9Bc8fw XFhL6ezBClgRYA33kHsXSFVngHlISmggGRScePESZQUU6OPVK5MugkAHJIXH8vtrGuLn AiPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691449528; x=1692054328; 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=xo55EeeiRtqMJzFppY7LfosEC+4EKSW+Y1wbH/R/zko=; b=kxHNy/zdyX8+xKee7Tqh8erzwSxTytANdybQ6xDV0HUGrjxWC91CWY1PSr25Dny2UL jsXvc2BrihggHVW0uzuoB7bK4Ck/k0S7pWD+m2FHZK0KJgGXKcHlIoHWXAjh0C7pRGb5 7tXFyFG3iC5OPn5ynWbDim1xu6rXmRL/HuIyEVgfxg+nsRte37Bw8pDsm1OHchTLqlyi H7ulNu/Z7Ot7Rf7E8d2mbqNpnFEQnXcso3XoT6uhU25jh0O4ToZfSJCbVIgDuJQkiny8 plOPjQ38xcIU86JJEuqqaq3FkVNliJ1vMTNhWptIlCd02ShfC+M97kR1tXWvFP0ldrr3 wDyg== X-Gm-Message-State: AOJu0YwESIhrtX3E2fBh+NxFq7fGRCiy7EYmPh223J/oJLExR0ZaEuqe QpmDG9sUZQaFeC5HsRkT22c= X-Google-Smtp-Source: AGHT+IEuvpqTpP0gccwCdePAresyzfHn008a21Ty6dvsje55NxjSSMn6qMCPG3M+rc/X2+vc3Y/lYA== X-Received: by 2002:a54:4886:0:b0:3a7:238a:143e with SMTP id r6-20020a544886000000b003a7238a143emr10421463oic.2.1691449528538; Mon, 07 Aug 2023 16:05:28 -0700 (PDT) Received: from unknowna0e70b2ca394.attlocal.net ([2600:1700:2f7d:1800::16]) by smtp.googlemail.com with ESMTPSA id d190-20020a25cdc7000000b00d3596aca5bcsm2545203ybf.34.2023.08.07.16.05.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Aug 2023 16:05:28 -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 v9 05/31] mm: Convert ptlock_alloc() to use ptdescs Date: Mon, 7 Aug 2023 16:04:47 -0700 Message-Id: <20230807230513.102486-6-vishal.moola@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230807230513.102486-1-vishal.moola@gmail.com> References: <20230807230513.102486-1-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Signature: nzxwpe9rm3t8w8agng16zsuceoadfafg X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 5C3C14000D X-Rspam-User: X-HE-Tag: 1691449529-638473 X-HE-Meta: U2FsdGVkX1+4IN0L+9CFb7hTf9Mj1ymu1FYeTFGlApzgEdMOoNS+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tZ5s7RPHJESp8yDq/rN/bni6y0/xByBjbi/teXMZUxEH9CkNf+MN3/jX/ozOPsqpw8cZzNANxlj7DkCdSfRkXZ6i8kLrzsB1QnvXj9yR9f9Oj7NDatiHTF0LA4wZLDGT1IUCY1iZ3feFKjoWxcWph7k4Wn8jGUoPi8lnhWQQIa/7eqtRVyZtD/ZgKmlGLIwxv86t76c2kSr9L/KQRatLSZJ8v4Yrr+kpGHHtiuayBkcdztUtbP2BOqGPpwV/nwYbD2MrwhFOcltHWf3Lufflv8zuFmdAHUuMFo9/ox+j6Yg+7u1AKmTtVHTJrwTc+JdevYC9f40SiLXL2un492qJX3f9yHP6l1q/2q8NhRHd4M8G+XcXpE0Drax8UTxfM01IyNBzHG4/skJvioESRzIK5Ax+vPqOkwlSRScG4Svray5JbYAIEp4n2DtrAG6F+7GPNz9va/W4dJF0XC2z96j0kLZ0g+WFkXTNT9obWJEM56jv16YBWjX/RLKbkE 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 f6d14a5fe747..6aea8fb671f1 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2860,7 +2860,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) @@ -2872,7 +2872,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; } @@ -2902,7 +2902,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 956aad8aff34..3606ef72ba70 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -6134,14 +6134,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; }