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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2A58DC433F5 for ; Fri, 8 Apr 2022 09:13:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JGtdAD2FjjpNWRn40+xNU+4+kDy78sbvgunbTCKyWAI=; b=D9zvZkmzd1wWQf rn8baSFmLBE6cz7w3y0SUS8M1w65fMJ7BFNU5KOdhN64Ky5+8zXdWOdn24Jp0/gwyybyj6eUP0Oiz FEwvJB0ZGO2fNKvG97kBPs2qZKvfI6CChiJFN5mfZg5chAUzAiSVIPPJnIl80cFeMDYKt0fbjtOME 15ysd0zYM1ZNNuE1IVx7YcMdvkd4tUcH/5TeWB7nk9kNgtuJEBK3PcZKKTj9lrJEDUEzpuvntAnvn VaThAgVUvwL5Jp6ZWgvYuIAw8IyevipUiyxSEU0ReF5MeiNcy3PygLwYhJJPxzrHn2F8sh9QyPQU+ 0skEoOqnA1MPcLnQ+8bw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nckev-00G5Wn-01; Fri, 08 Apr 2022 09:12:01 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nckeo-00G5Us-4x for linux-arm-kernel@lists.infradead.org; Fri, 08 Apr 2022 09:11:55 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9FFE961CB5; Fri, 8 Apr 2022 09:11:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C19BC385A3; Fri, 8 Apr 2022 09:11:51 +0000 (UTC) Date: Fri, 8 Apr 2022 10:11:47 +0100 From: Catalin Marinas To: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Will Deacon , Marc Zyngier , Arnd Bergmann , Greg Kroah-Hartman , Andrew Morton , Linus Torvalds , linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/10] mm/slab: Decouple ARCH_KMALLOC_MINALIGN from ARCH_DMA_MINALIGN Message-ID: References: <20220405135758.774016-1-catalin.marinas@arm.com> <20220405135758.774016-2-catalin.marinas@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220408_021154_284376_8B2A414D X-CRM114-Status: GOOD ( 20.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Apr 08, 2022 at 03:42:13PM +0900, Hyeonggon Yoo wrote: > On Tue, Apr 05, 2022 at 02:57:49PM +0100, Catalin Marinas wrote: > > diff --git a/include/linux/slab.h b/include/linux/slab.h > > index 373b3ef99f4e..d58211bdeceb 100644 > > --- a/include/linux/slab.h > > +++ b/include/linux/slab.h > > @@ -187,17 +187,30 @@ bool kmem_valid_obj(void *object); > > void kmem_dump_obj(void *object); > > #endif > > > > +/* > > + * slob does not support independent control of ARCH_KMALLOC_MINALIGN and > > + * ARCH_DMA_MINALIGN. > > + */ > > +#ifdef CONFIG_SLOB > > +#undef ARCH_KMALLOC_MINALIGN > > +#endif > > I think you should replace ARCH_KMALLOC_MINALIGN with ARCH_DMA_MINALIGN > in mm/slob.c too? Or detect minimum kmalloc alignment in runtime like SLAB/SLUB? One step at a time. The slob approach is a bit different, doesn't generate kmalloc-* caches, so I did not look at it yet. Also based on Vlastimil's email, there is some reworking going on in there already. > current code seem to break with SLOB on machines that has 128 byte cache lines > because ARCH_KMALLOC_MINALIGN is 64? Does it? The point of the #undef above was precisely to make sure ARCH_KMALLOC_MINALIGN stays the same as ARCH_DMA_MINALIGN when CONFIG_SLOB is enabled. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel