Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1306949ybn; Wed, 25 Sep 2019 16:04:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqwiZcdY5DNFDLRzqljvTEU+sUwAXqEDoj9RAH+vM78RxF6DyLPsmrqxcccken5O+nUaPSQy X-Received: by 2002:a17:906:6994:: with SMTP id i20mr518642ejr.239.1569452658818; Wed, 25 Sep 2019 16:04:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569452658; cv=none; d=google.com; s=arc-20160816; b=RShwd3udU1U5GxmFkCK0Il+qveDBX4maHCmzIThRJ6fMNle+3+1iifK8XogXOsrlX4 xeEXZrjfhm0M6s8ZE2Nh6YgIh/cJp+vX6bJLiV53gPP0iyBbDKFm4pUQmjVn+WTUw9ra mpAylsvPr8wnujt6iGYkD1F2Inc0/UA4lCzO9RNuL3cp0qoSEjToYELKatlIDl9jZt+X VlBI9VvEpKlm4dvuIto1BuMBh+G1RyQe+2jgYJHd/y3ehd6sE+KfnMK3zROWqNTX6OBK pyFWJOuc9heJYibkay/2a312NLT200fXFkigks/czIULWhuKPlolvyR77LduaMfe3C0U 9ciA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wu+Vz9bwwQ8XY+ZG0DU7WreZpAj7L+s+8VYRLKVH1mo=; b=C2wCpTAyU4ipSEyjzsP7mU2zG9eGtU2chZFjv1VMPE1sEOxoSURkXzhLAuYsYFEEX0 XNxpeaElXS4t27mnSNW9VPZs6/lez+WBZnC4q7vJoWvSAAQjpWA7Zf6QFI/Wtwe8Zx8R iVsHLH03YDuL3IYYGAXIO5tpgyvLXpMURXCSmPcNMv0nPifWVGlMh6dV2mmWdHwYlgDb b0KuRyVEXvAfh4uQ1ATuWe6sX0iCCxr5NfS7ho+z5XfEbrYRkSE01/3zS1hNJBLqdzb/ itM3okTHFQsJJuL5arS5ycIc27XuVOObOciFOTRkOjF2Bqk2ckKkt7X66+Uz/d2vnU/D fN8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=YRtXCfih; 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 mh25si142938ejb.81.2019.09.25.16.03.54; Wed, 25 Sep 2019 16:04:18 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=YRtXCfih; 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 S1733148AbfIWS5r (ORCPT + 99 others); Mon, 23 Sep 2019 14:57:47 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:39690 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731880AbfIWS5q (ORCPT ); Mon, 23 Sep 2019 14:57:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=wu+Vz9bwwQ8XY+ZG0DU7WreZpAj7L+s+8VYRLKVH1mo=; b=YRtXCfihHwuAXZy0F1ATYoqqt wWyRWoqCsyWErW6HQfrFL+k/XiqQR704A88WoAHlPci2b9DzEG4oH1Ig935Y+SPf2R6tiT/iPozRL F1BaKlDeG5mECEwnjjxmkrl7aeRt1qSHYD3lLD+SXYajGapg5yTtEg3CXxIwePVYT2EQG6LnguZnv Bq8kjO4qmPLMnR6xrb7WHMaN9qdmEkodkcMDqc3q+u9+UMo707HkfFodhqsXxWdQay+WIyVllGafX zPdu9VwSGmS5V/jJeqJBKJSZwdVYsp7xhxlQ8TUgFkdopeTPybr9UIbzxaBRGEMzNbU3tebwTmuVR dapYaV+Sw==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCTWp-0004z8-Na; Mon, 23 Sep 2019 18:57:43 +0000 Date: Mon, 23 Sep 2019 11:57:43 -0700 From: Matthew Wilcox To: Vlastimil Babka Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Christoph Lameter , Pekka Enberg , David Rientjes , Ming Lei , Dave Chinner , "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 Subject: Re: [PATCH v2 2/2] mm, sl[aou]b: guarantee natural alignment for kmalloc(power-of-two) Message-ID: <20190923185743.GA1855@bombadil.infradead.org> References: <20190826111627.7505-1-vbabka@suse.cz> <20190826111627.7505-3-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190826111627.7505-3-vbabka@suse.cz> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 26, 2019 at 01:16:27PM +0200, Vlastimil Babka wrote: > @@ -98,6 +98,10 @@ limited. The actual limit depends on the hardware and the kernel > configuration, but it is a good practice to use `kmalloc` for objects > smaller than page size. > > +The address of a chunk allocated with `kmalloc` is aligned to at least > +ARCH_KMALLOC_MINALIGN bytes. For sizes of power of two bytes, the "For sizes which are a power of two, the" > +alignment is also guaranteed to be at least to the respective size. s/to // Reviewed-by: Matthew Wilcox (Oracle)