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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1CE58C38A02 for ; Fri, 28 Oct 2022 07:33:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lbArd58JUFZCIuGuq5W9YjlYmJrLigJgKQRq9xnsHyI=; b=iRhQxD8znjTCnz muuRNzM35EQHFApV0fjtpH4OiKBfwdAaSEM5FtFafd8+0p46ZSquXjabnKi3yelZOSjxwNmMPw/f+ bWStRjEf7YhUI+kj+l/IH6wIfhyL0Gl+mO+aVa33l1ZoLWUfA021/835O/V4EcRf96DAbz+hzUa+E Mtttpj1LPwn5Jmr71nGikPL9VSlOb1obWZmgKMNqj0dG1TXo9bjni6q1sFPmOgjzDBNZbK3fXNYei Jk5Y16I+0mOAD+yWKauLK64YJvhY57mcuAcUKZl3z4PnPGVAO++J4TXwGtBUpk8ehfUHlmLJdvXWS kMAKWFbpayuIyluu7a8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooJrH-00G1Lq-97; Fri, 28 Oct 2022 07:32:51 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooJrD-00G1LJ-RI for linux-arm-kernel@lists.infradead.org; Fri, 28 Oct 2022 07:32:49 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4FC6FB82899; Fri, 28 Oct 2022 07:32:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA193C433D6; Fri, 28 Oct 2022 07:32:41 +0000 (UTC) Date: Fri, 28 Oct 2022 08:32:38 +0100 From: Catalin Marinas To: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Linus Torvalds , Arnd Bergmann , Will Deacon , Marc Zyngier , Greg Kroah-Hartman , Andrew Morton , Herbert Xu , Ard Biesheuvel , Christoph Hellwig , Isaac Manjarres , Saravana Kannan , linux-mm@kvack.org, Vlastimil Babka , David Rientjes , Christoph Lameter , Roman Gushchin , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 1/2] mm: slab: Introduce __GFP_PACKED for smaller kmalloc() alignments Message-ID: References: <20221025205247.3264568-1-catalin.marinas@arm.com> <20221025205247.3264568-2-catalin.marinas@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221028_003248_046676_5D0429EC X-CRM114-Status: GOOD ( 14.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Oct 27, 2022 at 09:11:49PM +0900, Hyeonggon Yoo wrote: > On Tue, Oct 25, 2022 at 09:52:46PM +0100, Catalin Marinas wrote: > > +/* > > + * This alignment should be at least sizeof(unsigned long long). > > + */ > > +#define KMALLOC_PACKED_ALIGN (KMALLOC_MIN_SIZE) > > + > > I think __assume_kmalloc_alignment should be changed as well, > to avoid compiler making wrong decision. Good point. Thanks. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1EA20C38A02 for ; Fri, 28 Oct 2022 07:32:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AC2956B0072; Fri, 28 Oct 2022 03:32:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A72DA6B0073; Fri, 28 Oct 2022 03:32:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9617C6B0074; Fri, 28 Oct 2022 03:32:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 8AA0C6B0072 for ; Fri, 28 Oct 2022 03:32:49 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 54CE6ABB57 for ; Fri, 28 Oct 2022 07:32:49 +0000 (UTC) X-FDA: 80069541258.10.30873D0 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf18.hostedemail.com (Postfix) with ESMTP id E7FA51C003F for ; Fri, 28 Oct 2022 07:32:47 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4FC6FB82899; Fri, 28 Oct 2022 07:32:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA193C433D6; Fri, 28 Oct 2022 07:32:41 +0000 (UTC) Date: Fri, 28 Oct 2022 08:32:38 +0100 From: Catalin Marinas To: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Linus Torvalds , Arnd Bergmann , Will Deacon , Marc Zyngier , Greg Kroah-Hartman , Andrew Morton , Herbert Xu , Ard Biesheuvel , Christoph Hellwig , Isaac Manjarres , Saravana Kannan , linux-mm@kvack.org, Vlastimil Babka , David Rientjes , Christoph Lameter , Roman Gushchin , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 1/2] mm: slab: Introduce __GFP_PACKED for smaller kmalloc() alignments Message-ID: References: <20221025205247.3264568-1-catalin.marinas@arm.com> <20221025205247.3264568-2-catalin.marinas@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666942368; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1rIZlTCt8D7SLnchX5U9zZQUVT604gTvYhDNsOlr7hU=; b=wGprfvHUbMRplTqSAy0/6/5RnpUFE9GUe1SDZeEcFGp7lfEV7C/gUjEJHQUfQeHyvXMQ/3 /tKQPUT+pYJtwd/YurHuF3Q7QOR26LDy2dPr2wN0gPUkwMG0U0K19rBiqKFem0K482uM0H uQdetLr/CaTQ0NCI6XF8SD9xaC5UVJQ= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf18.hostedemail.com: domain of cmarinas@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=cmarinas@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666942368; a=rsa-sha256; cv=none; b=8j/mChBtqKxhNHSEQvo2Y3o3+aJmZuE6/iVXXCR8Ksv7PDw5oEvDD813+P0uOlsAltkRgR 6wRh2Cx946UIUk5a/wBffeQgMNWHsLZYW3zcC2mhv9Gb27bJjsIpMKEBedQlO0AKc+gPcH 8BOIMz/ro6S0BubpzJzTIpERdfqJD2E= X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: E7FA51C003F Authentication-Results: imf18.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf18.hostedemail.com: domain of cmarinas@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=cmarinas@kernel.org X-Stat-Signature: zucyi576oajz6u8kbkrhytdb4sgnqp7n X-Rspam-User: X-HE-Tag: 1666942367-707446 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Oct 27, 2022 at 09:11:49PM +0900, Hyeonggon Yoo wrote: > On Tue, Oct 25, 2022 at 09:52:46PM +0100, Catalin Marinas wrote: > > +/* > > + * This alignment should be at least sizeof(unsigned long long). > > + */ > > +#define KMALLOC_PACKED_ALIGN (KMALLOC_MIN_SIZE) > > + > > I think __assume_kmalloc_alignment should be changed as well, > to avoid compiler making wrong decision. Good point. Thanks. -- Catalin