From patchwork Tue Mar 26 17:10:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13604745 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 45611C54E67 for ; Tue, 26 Mar 2024 17:11:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 966FF6B00A1; Tue, 26 Mar 2024 13:10:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8E85A6B00A2; Tue, 26 Mar 2024 13:10:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 624226B00A5; Tue, 26 Mar 2024 13:10:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 461016B00A2 for ; Tue, 26 Mar 2024 13:10:55 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 1EBCEC0B7F for ; Tue, 26 Mar 2024 17:10:55 +0000 (UTC) X-FDA: 81939830070.11.32A4E28 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf24.hostedemail.com (Postfix) with ESMTP id 7289218002C for ; Tue, 26 Mar 2024 17:10:53 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=TkO0yvdG; dmarc=none; spf=none (imf24.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1711473053; 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=/TxhYLHQ0xyjPD4SrsNY9DePy2Ipz06eYkWddMgp4fA=; b=LJIqHWl/f5xInHVEKGz8kyxlX+uQcAR0Hy80KT24c5+Vp8sXM8ddpaMcTiyAqNbR4hCg51 bbS6lqbrSnnSokhtJDX4iVXix9mjPProKCUGDPsqPmYa4d3cw9G89UsNj+ib5mYArDj1yh kU/u21ITDY7UK1kdFtutGJ6dWxaPClU= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=TkO0yvdG; dmarc=none; spf=none (imf24.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1711473053; a=rsa-sha256; cv=none; b=z99vK4AHcS1XkWLUVlQ3snNWfHKoQK2VjXrt+DQAyqJEqp8ZEKTZGUzNJzSsvFCSCob7Wb oepFN+P6Xz3PcqkOow2MHXTP3U3ItEA45wsUmdK9cMWyLGGGHILEiXYloG6Jwv/XwWZpUJ Ck8/FJAVDtDuO8/OtZ73y0OyuwrMcKY= 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=/TxhYLHQ0xyjPD4SrsNY9DePy2Ipz06eYkWddMgp4fA=; b=TkO0yvdGR8s/S19WIsCvKIQWnh fgUYH56x4sdQhzXGXiVE5iZsRsRJ2bs9ZTwIb0WZx6sXfaZy7jjZjdiNbdju8Nc0mrJ0V0s3E9C2i iCa5fG5Bnb9VyAGuRdig96JwH3vYqRF7B5mPPrWsJ6qk6hNVTvzd1zKr8zoK7oqadY76SkTTI0/tj Tw1gsBVVFq/YcG4CCmjrXL+h6yFMm0z97S4pJGBAOqIJ3BzXp1qLNfLHBv37hy/AZXCX52g+5hpn1 b4xkHAxKPr0GPlR2EgXP/CKc5gyxAexVOmRjNXoZrKQehCAkggjhH6rMBCwRDo1MJwZqdgLzgsjXc V5T7Y7+Q==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpAK0-00000001isZ-2JlW; Tue, 26 Mar 2024 17:10:48 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org Subject: [PATCH 08/10] slub: Remove use of page->flags Date: Tue, 26 Mar 2024 17:10:30 +0000 Message-ID: <20240326171045.410737-9-willy@infradead.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240326171045.410737-1-willy@infradead.org> References: <20240326171045.410737-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 7289218002C X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: mua3bzf95akibxsxfto68jpudicb7pon X-HE-Tag: 1711473053-872807 X-HE-Meta: U2FsdGVkX1/xzv19KTK1CqNH6SB5M6PWku6vtO3F6pUQeooCXBfPzfVPgVLPzOKd8Nca4SJ1oZKFdVnihS9WbH6TgKRcSmhviJhZB1y0MHH3EVu1UXnfUNhw078Eshi+Xm1zEAMK8tIFu507oxUn58Lp6dKrQmPxW6IsKB/MYmzu+Ipa55XKnKMIewutsSuuTpFSQAtevhgqkfHccl6OShEx+KG6eGBndRhyt3LUupzYn1+wrVcod/bxBs2e2YTuIsu1VcjlWyXY6tQjrm0GYrEdQwoXwNqR1vUCBkPrbsEL05qrFwfrkq8E5x86KgJ8EIPjJdyjV7N9emL1uAMmlOB8C+Mv0QwIt++pmjgU79BUtaL2Jg2rxe3uuYUR/u7YpuSGkZ3wsX9r5rT6klpuf/W1RKKFL0oaWJJ0iD2MuQcVSlj4+wsVk/LQXegKeDY20lql/QqnkHaQtD1EDvw1xFpj+uLI/qjrELjyw9PM2PUhwZgOJacBuejxTHpCswEB4BGKLFmGpi7+iOTOQ5hR35C4vkKpOkGLvf+l3H3g1Sa37h17c0c/C5uSlmt2K1jNsI5F/Vj0A+eDUiD84VOPEOp4Wr/Qejd15jjU58XUPNWs7dNBnLtIpB56v2C7dWxsfEOG48+I/xh1hLIUg6XWTVVYqPCKjCTeOhQFTPpJIhKQzXzyA9BMEX5ZLAsqkf1E75T+q8plMLonWNwJwNyeT6UErpeHCMvd9lsNUQNzo6cKILrjAKMi8beysKdnIY6oIZ5jVF9+13u744yhAzt4qWJXc4qT2Te4/WcqwkVYWdV8sHh9z08+fprXXaSDa/QWCBk4NlZf4/faF9rv/ux8vJWkSEPJM46N+m3truPI+qb7pumiko2W0zBxG2JExN5HGrcizZTeaSuAMTgbyF+G2jrTvEXs/BMmA4bAEpq062f69V53hd4zNs8ECdE955aeaVFWiUboIhgNQKoKk2S gRYJKSZT RGU6Us509cwpb+OM7lvWZtluRbXpbbzbn7QTKqBuIGm13/dx7W8F3CJZI5lG8MArmkB+aiwgeWaKI+yU7wKLa/Ike/SfbTglhazZlEZKdgg/b3Bc5kv5s46JaKbPnr5RPl4gHhOraAS4ErrtDvbnSgNE0YNkioQ18HLS4/P/GLzyiZuoa5xKzEjalXw== 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: Use slub->__page_flags instead. We can also remove the assertion that it's not a tail page as struct slab never points to a tail page. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand --- mm/slub.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index ceee8d76e1a9..1500546a9b68 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -616,18 +616,12 @@ slub_set_cpu_partial(struct kmem_cache *s, unsigned int nr_objects) */ static __always_inline void slab_lock(struct slab *slab) { - struct page *page = slab_page(slab); - - VM_BUG_ON_PAGE(PageTail(page), page); - bit_spin_lock(PG_locked, &page->flags); + bit_spin_lock(PG_locked, &slab->__page_flags); } static __always_inline void slab_unlock(struct slab *slab) { - struct page *page = slab_page(slab); - - VM_BUG_ON_PAGE(PageTail(page), page); - bit_spin_unlock(PG_locked, &page->flags); + bit_spin_unlock(PG_locked, &slab->__page_flags); } static inline bool