Message ID | 20211004134650.4031813-52-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 C7A98C433F5 for <linux-mm@archiver.kernel.org>; Mon, 4 Oct 2021 14:52:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5DBCC61373 for <linux-mm@archiver.kernel.org>; Mon, 4 Oct 2021 14:52:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5DBCC61373 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 F353694004F; Mon, 4 Oct 2021 10:52:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EE58194000B; Mon, 4 Oct 2021 10:52:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DD54694004F; Mon, 4 Oct 2021 10:52:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0003.hostedemail.com [216.40.44.3]) by kanga.kvack.org (Postfix) with ESMTP id C7DDE94000B for <linux-mm@kvack.org>; Mon, 4 Oct 2021 10:52:40 -0400 (EDT) Received: from smtpin32.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 8B5F1250D3 for <linux-mm@kvack.org>; Mon, 4 Oct 2021 14:52:40 +0000 (UTC) X-FDA: 78659046480.32.F057207 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf04.hostedemail.com (Postfix) with ESMTP id 41A0B50009D6 for <linux-mm@kvack.org>; Mon, 4 Oct 2021 14:52:40 +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=FF2KZ97aw0nGufx3iFvBniAMSz+RDBFYPAt9qka6On8=; b=wAbBM8MOKBwpDrib9tFTfZNgoO Zx/HfItUgbKJkfP4nIL8IU6+gahRRRrdaEcBi/krHP6l8ccPF35nt4IJ2gor+2mjvw9dmd22SXQVz 36Pivk0EmyoUyL/zOZ9oV32cesFxpNqxoYbITUKtsDEWcUeOlhwavif2/ZfKGefNf2wRd+PYA0Wf5 eRPinVo2d5kxthGbU4Awxu3CFN6a1ArKSVJdOblFFbnh8P843V2M+KdJ8pLpMqXbzZEAZQ/WLhDgT gHdboViwQbra3QjQACwXgLoJ+TP4+h/5GFM7jVq2aZN5OXAnFqHjtNh0iOmpT0r9J+6EIsD+eGcvC /MjP6k+w==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXPJW-00H1ez-JO; Mon, 04 Oct 2021 14:51:44 +0000 From: "Matthew Wilcox (Oracle)" <willy@infradead.org> To: linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org> Subject: [PATCH 51/62] mm/slub: Convert setup_page_debug() to setup_slab_debug() Date: Mon, 4 Oct 2021 14:46:39 +0100 Message-Id: <20211004134650.4031813-52-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: rspam05 X-Rspamd-Queue-Id: 41A0B50009D6 X-Stat-Signature: 1i9niuut43zkoy56erfiwzfworwcer7m Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=wAbBM8MO; dmarc=none; spf=none (imf04.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: 1633359160-202674 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 5cf305b2b8da..24111e30c7a2 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1250,13 +1250,13 @@ static void setup_object_debug(struct kmem_cache *s, void *object) } static -void setup_page_debug(struct kmem_cache *s, struct page *page, void *addr) +void setup_slab_debug(struct kmem_cache *s, struct slab *slab, void *addr) { if (!kmem_cache_debug_flags(s, SLAB_POISON)) return; metadata_access_enable(); - memset(kasan_reset_tag(addr), POISON_INUSE, page_size(page)); + memset(kasan_reset_tag(addr), POISON_INUSE, slab_size(slab)); metadata_access_disable(); } @@ -1600,7 +1600,7 @@ slab_flags_t kmem_cache_flags(unsigned int object_size, #else /* !CONFIG_SLUB_DEBUG */ static inline void setup_object_debug(struct kmem_cache *s, void *object) {} static inline -void setup_page_debug(struct kmem_cache *s, struct page *page, void *addr) {} +void setup_slab_debug(struct kmem_cache *s, struct slab *slab, void *addr) {} static inline int alloc_debug_processing(struct kmem_cache *s, struct slab *slab, void *object, unsigned long addr) { return 0; } @@ -1919,7 +1919,7 @@ static struct slab *allocate_slab(struct kmem_cache *s, gfp_t flags, int node) start = slab_address(slab); - setup_page_debug(s, slab_page(slab), start); + setup_slab_debug(s, slab, start); shuffle = shuffle_freelist(s, slab);
Removes a call to slab_page() Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> --- mm/slub.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)