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.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 AB027C4CEC4 for ; Mon, 23 Sep 2019 18:57:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7777B20820 for ; Mon, 23 Sep 2019 18:57:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="YRtXCfih" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732334AbfIWS5r (ORCPT ); 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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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)