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 EBE71C433F5 for ; Tue, 21 Dec 2021 17:25:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 802EF6B008C; Tue, 21 Dec 2021 12:25:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 78ACE6B0095; Tue, 21 Dec 2021 12:25:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 62C2C6B0099; Tue, 21 Dec 2021 12:25:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0023.hostedemail.com [216.40.44.23]) by kanga.kvack.org (Postfix) with ESMTP id 50B2B6B008C for ; Tue, 21 Dec 2021 12:25:17 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id F176E181AC9C6 for ; Tue, 21 Dec 2021 17:25:16 +0000 (UTC) X-FDA: 78942477432.27.47396EC Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf05.hostedemail.com (Postfix) with ESMTP id 53E36100043 for ; Tue, 21 Dec 2021 17:25:15 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 97EB4D6E; Tue, 21 Dec 2021 09:25:14 -0800 (PST) Received: from [10.57.34.58] (unknown [10.57.34.58]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 27FF13F718; Tue, 21 Dec 2021 09:25:06 -0800 (PST) Message-ID: Date: Tue, 21 Dec 2021 17:25:01 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH v2 00/33] Separate struct slab from struct page Content-Language: en-GB To: Vlastimil Babka , Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Peter Zijlstra , Dave Hansen , Michal Hocko , linux-mm@kvack.org, Andrey Ryabinin , Alexander Potapenko , kasan-dev@googlegroups.com, "H. Peter Anvin" , Christoph Lameter , Will Deacon , Julia Lawall , Sergey Senozhatsky , x86@kernel.org, Luis Chamberlain , Matthew Wilcox , Ingo Molnar , Vladimir Davydov , David Rientjes , Nitin Gupta , Marco Elver , Borislav Petkov , Andy Lutomirski , cgroups@vger.kernel.org, Thomas Gleixner , Joonsoo Kim , Dmitry Vyukov , Andrey Konovalov , patches@lists.linux.dev, Pekka Enberg , Minchan Kim , iommu@lists.linux-foundation.org, Johannes Weiner , Andrew Morton , David Woodhouse References: <20211201181510.18784-1-vbabka@suse.cz> <4c3dfdfa-2e19-a9a7-7945-3d75bc87ca05@suse.cz> <38976607-b9f9-1bce-9db9-60c23da65d2e@suse.cz> From: Robin Murphy In-Reply-To: <38976607-b9f9-1bce-9db9-60c23da65d2e@suse.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Authentication-Results: imf05.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf05.hostedemail.com: domain of robin.murphy@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=robin.murphy@arm.com X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 53E36100043 X-Stat-Signature: xgydyxrfq8yupq98c9obia8cpfcyaodb X-HE-Tag: 1640107515-210696 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 2021-12-20 23:58, Vlastimil Babka wrote: > On 12/16/21 16:00, Hyeonggon Yoo 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: >> >> Reviewing the whole patch series takes longer than I thought. >> I'll try to review and test rest of patches when I have time. >> >> I added Tested-by if kernel builds okay and kselftests >> does not break the kernel on my machine. >> (with CONFIG_SLAB/SLUB/SLOB depending on the patch), > > Thanks! > >> Let me know me if you know better way to test a patch. > > Testing on your machine is just fine. > >> # mm/slub: Define struct slab fields for CONFIG_SLUB_CPU_PARTIAL only when enabled >> >> Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> >> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> >> >> Comment: >> Works on both SLUB_CPU_PARTIAL and !SLUB_CPU_PARTIAL. >> btw, do we need slabs_cpu_partial attribute when we don't use >> cpu partials? (!SLUB_CPU_PARTIAL) > > The sysfs attribute? Yeah we should be consistent to userspace expecting to > read it (even with zeroes), regardless of config. > >> # mm/slub: Simplify struct slab slabs field definition >> Comment: >> >> This is how struct page looks on the top of v3r3 branch: >> struct page { >> [...] >> struct { /* slab, slob and slub */ >> union { >> struct list_head slab_list; >> struct { /* Partial pages */ >> struct page *next; >> #ifdef CONFIG_64BIT >> int pages; /* Nr of pages left */ >> #else >> short int pages; >> #endif >> }; >> }; >> [...] >> >> It's not consistent with struct slab. > > Hm right. But as we don't actually use the struct page version anymore, and > it's not one of the fields checked by SLAB_MATCH(), we can ignore this. > >> I think this is because "mm: Remove slab from struct page" was dropped. > > That was just postponed until iommu changes are in. Matthew mentioned those > might be merged too, so that final cleanup will happen too and take care of > the discrepancy above, so no need for extra churn to address it speficially. FYI the IOMMU changes are now queued in linux-next, so if all goes well you might be able to sneak that final patch in too. Robin. > >> Would you update some of patches? >> >> # mm/sl*b: Differentiate struct slab fields by sl*b implementations >> Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> >> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> >> Works SL[AUO]B on my machine and makes code much better. >> >> # mm/slob: Convert SLOB to use struct slab and struct folio >> Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> >> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> >> It still works fine on SLOB. >> >> # mm/slab: Convert kmem_getpages() and kmem_freepages() to struct slab >> Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> >> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> >> >> # mm/slub: Convert __free_slab() to use struct slab >> Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> >> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> >> >> Thanks, >> Hyeonggon. > > Thanks again, > Vlastimil > _______________________________________________ > iommu mailing list > iommu@lists.linux-foundation.org > https://lists.linuxfoundation.org/mailman/listinfo/iommu