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 X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8496CC432C2 for ; Thu, 26 Sep 2019 00:16:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 65CC021D7B for ; Thu, 26 Sep 2019 00:16:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387754AbfIZAQE (ORCPT ); Wed, 25 Sep 2019 20:16:04 -0400 Received: from gentwo.org ([3.19.106.255]:49668 "EHLO gentwo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728768AbfIZAQE (ORCPT ); Wed, 25 Sep 2019 20:16:04 -0400 Received: by gentwo.org (Postfix, from userid 1002) id 753313EEC6; Thu, 26 Sep 2019 00:16:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 73A743E86C; Thu, 26 Sep 2019 00:16:03 +0000 (UTC) Date: Thu, 26 Sep 2019 00:16:03 +0000 (UTC) From: Christopher Lameter X-X-Sender: cl@www.lameter.com To: Vlastimil Babka cc: Andrew Morton , David Sterba , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Pekka Enberg , David Rientjes , Ming Lei , Dave Chinner , Matthew Wilcox , "Darrick J . Wong" , Christoph Hellwig , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, James Bottomley , linux-btrfs@vger.kernel.org, Roman Gushchin , Johannes Weiner Subject: Re: [PATCH v2 2/2] mm, sl[aou]b: guarantee natural alignment for kmalloc(power-of-two) In-Reply-To: <34a45e87-5bad-5f01-7dcb-8a3f6cf37281@suse.cz> Message-ID: References: <20190826111627.7505-1-vbabka@suse.cz> <20190826111627.7505-3-vbabka@suse.cz> <20190923171710.GN2751@twin.jikos.cz> <20190924165425.a79a2dafbaf37828a931df2b@linux-foundation.org> <34a45e87-5bad-5f01-7dcb-8a3f6cf37281@suse.cz> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org On Wed, 25 Sep 2019, Vlastimil Babka wrote: > Most of the new code is for SLOB, which has no debugging and yet > misaligns. For SLUB and SLAB, it's just passing alignment argument to > kmem_cache_create() for kmalloc caches, which means just extra few > instructions during boot, and no extra code during kmalloc/kfree itself. SLOB follows the standards for alignments in slab allocators and will correctly align if you ask the allocator for a properly aligned object.