Message ID | 20211004134650.4031813-54-willy@infradead.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=Fowb=OY=kvack.org=owner-linux-mm@kernel.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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B46D3C433F5 for <linux-mm@archiver.kernel.org>; Mon, 4 Oct 2021 14:54:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6250761373 for <linux-mm@archiver.kernel.org>; Mon, 4 Oct 2021 14:54:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6250761373 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id EE695940051; Mon, 4 Oct 2021 10:54:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E950F94000B; Mon, 4 Oct 2021 10:54:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D5D1E940051; Mon, 4 Oct 2021 10:54:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0183.hostedemail.com [216.40.44.183]) by kanga.kvack.org (Postfix) with ESMTP id C411494000B for <linux-mm@kvack.org>; Mon, 4 Oct 2021 10:54:18 -0400 (EDT) Received: from smtpin33.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 849952DEC8 for <linux-mm@kvack.org>; Mon, 4 Oct 2021 14:54:18 +0000 (UTC) X-FDA: 78659050596.33.0DB5539 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf23.hostedemail.com (Postfix) with ESMTP id 2CE83900070C for <linux-mm@kvack.org>; Mon, 4 Oct 2021 14:54:18 +0000 (UTC) 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=/qXjlT9umJV3/fh5rGiESQtEI1YS5Uel0xJHsvq5R+0=; b=oCdyqFHpgJGUlYKoStAtkfIg13 Np44sNRkLsXnE/EyauG5/5CGoDaiJEnmZYlwDzijqnptep1N/6O6g91GIQoQ35u1n3VEgTQSaGYxV yEFETI0g0mrNe/4MUYqoTxM5b67ceCOLNg6arJg8cmvhF/JY3ZRzY/HxDlAOlzKAvovRpPffHRIbu bdpYwFWuoXLD5tOZXWhQ+rXxdNwSBrhJ2sDz7YGcdEpA7JRbP/Xnc8xLbq0AmiuqaCLtSGYjBlKrA IecNtuYu4bfjG6fI49ikUn9YkDEr8rF/NscrCD1S3hRoAPSuqW5rTiS7DAqqIPV9FLbjOC7tJcy9/ YgBVyU9w==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXPKi-00H1jC-Nr; Mon, 04 Oct 2021 14:53:14 +0000 From: "Matthew Wilcox (Oracle)" <willy@infradead.org> To: linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org> Subject: [PATCH 53/62] mm/slub: Remove pfmemalloc_match_unsafe() Date: Mon, 4 Oct 2021 14:46:41 +0100 Message-Id: <20211004134650.4031813-54-willy@infradead.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211004134650.4031813-1-willy@infradead.org> References: <20211004134650.4031813-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 2CE83900070C X-Stat-Signature: uea5qww1x93dfi1joq5yj7ceu5dfnd7f Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=oCdyqFHp; dmarc=none; spf=none (imf23.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-HE-Tag: 1633359258-563489 Content-Transfer-Encoding: quoted-printable 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 |
Separate struct slab from struct page
|
expand
|
diff --git a/mm/slub.c b/mm/slub.c index 7e2c5342196a..229fc56809c2 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2796,19 +2796,6 @@ static inline bool pfmemalloc_match(struct slab *slab, gfp_t gfpflags) return true; } -/* - * A variant of pfmemalloc_match() that tests page flags without asserting - * PageSlab. Intended for opportunistic checks before taking a lock and - * rechecking that nobody else freed the page under us. - */ -static inline bool pfmemalloc_match_unsafe(struct page *page, gfp_t gfpflags) -{ - if (unlikely(__PageSlabPfmemalloc(page))) - return gfp_pfmemalloc_allowed(gfpflags); - - return true; -} - /* * Check the freelist of a slab and either transfer the freelist to the * per cpu freelist or deactivate the slab @@ -2905,7 +2892,7 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node, * PFMEMALLOC but right now, we lose the pfmemalloc * information when the page leaves the per-cpu allocator */ - if (unlikely(!pfmemalloc_match_unsafe(slab_page(slab), gfpflags))) + if (unlikely(!pfmemalloc_match(slab, gfpflags))) goto deactivate_slab; /* must check again c->slab in case we got preempted and it changed */
slab_test_pfmemalloc() doesn't need to check PageSlab() (unlike PageSlabPfmemalloc()), so we don't need a pfmemalloc_match_unsafe() variant any more. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> --- mm/slub.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-)