From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751274AbdFFD13 (ORCPT ); Mon, 5 Jun 2017 23:27:29 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:48734 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751194AbdFFD12 (ORCPT ); Mon, 5 Jun 2017 23:27:28 -0400 Date: Mon, 05 Jun 2017 23:27:24 -0400 (EDT) Message-Id: <20170605.232724.386554178947981058.davem@davemloft.net> To: jane.chu@oracle.com Cc: tglx@linutronix.de, atish.patra@oracle.com, Liam.Howlett@oracle.com, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] arch/sparc: support NR_CPUS = 4096 From: David Miller In-Reply-To: <6255d34e-499d-db38-ec86-8930828684de@oracle.com> References: <1496702911-717442-1-git-send-email-jane.chu@oracle.com> <20170605.205739.2124313705421284534.davem@davemloft.net> <6255d34e-499d-db38-ec86-8930828684de@oracle.com> X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 05 Jun 2017 19:45:49 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: jane.chu@oracle.com Date: Mon, 5 Jun 2017 20:03:28 -0700 > On sun4v sparc, it looks like kzalloc(64, GFP_KERNEL) ends up > allocating from kmalloc_caches[6] - a 64-byte kmem-cache allocated > by kmem_cache_init() with SLAB_HWCACHE_ALIGN flag set, so it's in > l3-cache-line-size alignment, i.e. 64byte. I printed out the > 'mondo' pa and verified that. Please check this, because that is an implementation detail. We have three SLAB allocators. For example, if the user enables SLOB, I bet you don't get that alignment. The only thing we are universally guaranteed is ARCH_KMALLOC_MINALIGN. Please implement this properly, rather than relying upon things like the above. Thank you.