Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1893837ybn; Thu, 26 Sep 2019 03:56:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqxeiFhhmFp3Iqf+cuWsa4gdfHdPiNn38YA/iFrcIOCArgwDXqpTNf8tn6BOepqNajIRsr/U X-Received: by 2002:a50:a666:: with SMTP id d93mr2785163edc.217.1569495386429; Thu, 26 Sep 2019 03:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569495386; cv=none; d=google.com; s=arc-20160816; b=ZCa5LfcvlWyAec+ZCqUS4w1WWe2e/K/VngykVcF2WKwEwA4OzdMAX2lOC1WDyd6/3O G3lqwlW5YDu5/zFW7IfOOk5tRnIoJI4BNO34Rn8gMAii8tPqmYMi0BU9ovQfCKciGiX+ XhjX+ajHMB2DJZprr+k3NUsOVztBf7UFpTKg/SV2LiIEE0AOiGkzCscvgALYnv1u5Kmw NodVb8fSUTFaEX/gwGtfEfoP5//4rTo0KWBxI1GaPgr3yhHqX1KRVHidJCDX4kWCI4mb uvW9Rf/ncNCELXNDzdFI1gbi6lWy5haAEcMrmpXxrZBmffYHr5rVsihAzBvzcgqMaP9a 3nLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=Gmjb78Q0z/V483MZh5iQU6xIYrhzY1I3tNTXWi22wks=; b=v8AHQbWv2Aalt9b9Sgdl7sAvndBTn1fd+KGxl9WnvM9OtMrAzjW5wJnYoezB7FVdDW a6AEzG/qbqrXGTIJNqww9yRIKXpAdcgpSre7cc2KNCsYmsOCM2fQTshUJ9IYQXJFfn9O K47F7XJ3x7OnyAcjlxeT+sAbHxCG1QNlyE+RcipQWZ+BOOk7c85n2nV0Vz462qrxAVob U+855lD2lt7WHqlG7zFsC5/jy1KFDBoifVGckwNQ2osoIM5P6a2cTbOBMFTGFYtae7F2 bsMuoO46UBYdCuhEhDiwfdNpcWI/3barg1DTxP4pk6ZwlZPA+iBi7YjEuxzpof9JnAHv fpyw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j24si1009889edt.259.2019.09.26.03.56.03; Thu, 26 Sep 2019 03:56:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387784AbfIZAQE (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.