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 BA31CC433EF for ; Mon, 20 Dec 2021 00:25:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9F9E86B0071; Sun, 19 Dec 2021 19:25:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9A9D56B0073; Sun, 19 Dec 2021 19:25:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 849E96B0074; Sun, 19 Dec 2021 19:25:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0039.hostedemail.com [216.40.44.39]) by kanga.kvack.org (Postfix) with ESMTP id 731316B0071 for ; Sun, 19 Dec 2021 19:25:11 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 39D206F65F for ; Mon, 20 Dec 2021 00:24:55 +0000 (UTC) X-FDA: 78936277350.03.44E126C Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf31.hostedemail.com (Postfix) with ESMTP id 5609920028 for ; Mon, 20 Dec 2021 00:24:44 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id ED29B2113A; Mon, 20 Dec 2021 00:24:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1639959892; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QS/OCdCcmeiC9lIu10Q6seQIOyuScTvbNIZyhMByFhM=; b=EFlINYyd/0dwFEmGFLZJLMASlucVauTDQ5SZ12dNfQ6r31naTaptiEwTVbyOfxPXpCB2cT ljvPQE3G4g1tnbRcINtU1YQtlSxy1/U6VoQT1ofUjs0fEIc2xRhwT6WL5cD9PbkZJ35Dj6 NzwUpPjWlTGet3+basc0unwNwWyigwM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1639959893; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QS/OCdCcmeiC9lIu10Q6seQIOyuScTvbNIZyhMByFhM=; b=en4PMr7JQnpVhR/Yj5DceOur/mcdk1eiP1XwqtDuloUzTdwsT7JJTZLi1UAwmw3RS7NXzU ZjrRD/TsdRhwADDA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 6E3BB133A7; Mon, 20 Dec 2021 00:24:52 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id lRYvGlTNv2HrZwAAMHmgww (envelope-from ); Mon, 20 Dec 2021 00:24:52 +0000 Message-ID: Date: Mon, 20 Dec 2021 01:24:52 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Content-Language: en-US To: Roman Gushchin Cc: Matthew Wilcox , Christoph Lameter , David Rientjes , Joonsoo Kim , Pekka Enberg , linux-mm@kvack.org, Andrew Morton , patches@lists.linux.dev, Alexander Potapenko , Andrey Konovalov , Andrey Ryabinin , Andy Lutomirski , Borislav Petkov , cgroups@vger.kernel.org, Dave Hansen , David Woodhouse , Dmitry Vyukov , "H. Peter Anvin" , Ingo Molnar , iommu@lists.linux-foundation.org, Joerg Roedel , Johannes Weiner , Julia Lawall , kasan-dev@googlegroups.com, Lu Baolu , Luis Chamberlain , Marco Elver , Michal Hocko , Minchan Kim , Nitin Gupta , Peter Zijlstra , Sergey Senozhatsky , Suravee Suthikulpanit , Thomas Gleixner , Vladimir Davydov , Will Deacon , x86@kernel.org, Hyeonggon Yoo <42.hyeyoo@gmail.com> References: <20211201181510.18784-1-vbabka@suse.cz> <4c3dfdfa-2e19-a9a7-7945-3d75bc87ca05@suse.cz> From: Vlastimil Babka Subject: Re: [PATCH v2 00/33] Separate struct slab from struct page In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 5609920028 X-Stat-Signature: depz6u9byg6kc57b8117nxx8jh11jak9 Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=EFlINYyd; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=en4PMr7J; dmarc=none; spf=pass (imf31.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz X-HE-Tag: 1639959884-695838 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 12/15/21 02:03, Roman Gushchin wrote: > On Tue, Dec 14, 2021 at 01:57:22PM +0100, Vlastimil Babka wrote: >> On 12/1/21 19:14, Vlastimil Babka wrote: >> > Folks from non-slab subsystems are Cc'd only to patches affecting them, and >> > this cover letter. >> > >> > Series also available in git, based on 5.16-rc3: >> > https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/linux.git/log/?h=slab-struct_slab-v2r2 >> >> Pushed a new branch slab-struct-slab-v3r3 with accumulated fixes and small tweaks >> and a new patch from Hyeonggon Yoo on top. To avoid too much spam, here's a range diff: > > Hi Vlastimil! > > I've started to review this patchset (btw, a really nice work, I like > the resulting code way more). Because I'm looking at v3 and I don't have > the whole v2 in my mailbox, here is what I've now: Thanks a lot, Roman! > * mm: add virt_to_folio() and folio_address() > Reviewed-by: Roman Gushchin > > * mm/slab: Dissolve slab_map_pages() in its caller > Reviewed-by: Roman Gushchin > > * mm/slub: Make object_err() static > Reviewed-by: Roman Gushchin > > * mm: Split slab into its own type > 1) Shouldn't SLAB_MATCH() macro use struct folio instead of struct page for the > comparison? Folio doesn't have define most of the fields, and matching some to page and others to folio seems like unnecessary complication. Maybe as part of the final struct page cleanup when the slab fields are gone from struct page, the rest could all be in folio - I'll check once we get there. > 2) page_slab() is used only in kasan and only in one place, so maybe it's better > to not introduce it as a generic helper? Yeah that's the case after the series, but as part of the incremental steps, page_slab() gets used in many places. I'll consider removing it on top though. > Other than that > Reviewed-by: Roman Gushchin > > * mm: Add account_slab() and unaccount_slab() > 1) maybe change the title to convert/replace instead of add? Done. > 2) maybe move later changes to memcg_alloc_page_obj_cgroups() to this patch? Maybe possible, but that would distort the series more than I'd like to at this rc6 time. > Reviewed-by: Roman Gushchin > > * mm: Convert virt_to_cache() to use struct slab > Reviewed-by: Roman Gushchin > > * mm: Convert __ksize() to struct slab > It looks like certain parts of __ksize() can be merged between slab, slub and slob? > Reviewed-by: Roman Gushchin > > * mm: Use struct slab in kmem_obj_info() > Reviewed-by: Roman Gushchin > > > I'll try to finish reviewing the patchset until the end of the week. > > Thanks! > > Roman