From mboxrd@z Thu Jan 1 00:00:00 1970 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 E614EC433EF for ; Sat, 11 Dec 2021 16:24:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EF6056B0072; Sat, 11 Dec 2021 11:24:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E7F2A6B0073; Sat, 11 Dec 2021 11:24:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CF8AB6B0074; Sat, 11 Dec 2021 11:24:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0253.hostedemail.com [216.40.44.253]) by kanga.kvack.org (Postfix) with ESMTP id B98EE6B0072 for ; Sat, 11 Dec 2021 11:24:12 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 78983181AEF1E for ; Sat, 11 Dec 2021 16:24:02 +0000 (UTC) X-FDA: 78906035124.09.D1114BB Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf30.hostedemail.com (Postfix) with ESMTP id 29F7080003 for ; Sat, 11 Dec 2021 16:24:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=duqWjPgqnpdR2SAcoAzM6rFQ0Wy0jzMQfoUHoYd8x4E=; b=ZVCnBQ0UgBu3mOSCPICSsiPhER YgywyrFU4f5c5Mw0lauY2ZAIlGNb415s6IbNFSQs3mro6qlzY8KVxnO83lf2LyIwB7FlSgITWEr88 d6wtvAPDSi5AAetA962b/6A+jMpzyAMMCwLU2dWY7aOj+G/7/J9aBjbFTOVKt/zGWWFdoOBu0xKbh UFPBSFSglEbv8lJ9SLNovUbub03JugNmSo/Zah33tsUdTVLETA7E0OkYpGefdUeKYLBsy6SfZpSN5 Wlg0r0ITWyyN6/euhSxL/FfEEvznPYCbpgtreGhLF/+ub5rBJOgng1NkvJ6UZ4yVMkYrOT22TLX30 g35bw5gw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mw5A3-00BJr3-8n; Sat, 11 Dec 2021 16:23:47 +0000 Date: Sat, 11 Dec 2021 16:23:47 +0000 From: Matthew Wilcox To: Vlastimil Babka Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>, Christoph Lameter , David Rientjes , Joonsoo Kim , Pekka Enberg , linux-mm@kvack.org, Andrew Morton , patches@lists.linux.dev, Marco Elver , Alexander Potapenko , Dmitry Vyukov , kasan-dev@googlegroups.com Subject: Re: [PATCH v2 31/33] mm/sl*b: Differentiate struct slab fields by sl*b implementations Message-ID: References: <20211201181510.18784-1-vbabka@suse.cz> <20211201181510.18784-32-vbabka@suse.cz> <20211210163757.GA717823@odroid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 29F7080003 X-Stat-Signature: 6cz47g7bk41afn1qzfcwptu36zfyuijs Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=ZVCnBQ0U; dmarc=none; spf=none (imf30.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: 1639239841-972045 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: On Fri, Dec 10, 2021 at 07:26:11PM +0100, Vlastimil Babka wrote: > > Because SLUB and SLAB sets slab->slab_cache = NULL (to set page->mapping = NULL), > > Hm, now that you mention it, maybe it would be better to do a > "folio->mapping = NULL" instead as we now have a more clearer view where we > operate on struct slab, and where we transition between that and a plain > folio. This is IMHO part of preparing the folio for freeing, not a struct > slab cleanup as struct slab doesn't need this cleanup. Yes, I did that as part of "mm/slub: Convert slab freeing to struct slab" in my original series: - __ClearPageSlabPfmemalloc(page); + __slab_clear_pfmemalloc(slab); __ClearPageSlab(page); - /* In union with page->mapping where page allocator expects NULL */ - page->slab_cache = NULL; + page->mapping = NULL;