Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp567200pxb; Mon, 25 Apr 2022 16:46:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdHanA0hW6FzOZVemciLo75WyLJgHblKBhSP+sqHeGsvc3KLmNkciKFii9+mwpOtpjnno5 X-Received: by 2002:a65:6cc9:0:b0:399:26da:29af with SMTP id g9-20020a656cc9000000b0039926da29afmr5737751pgw.489.1650930414896; Mon, 25 Apr 2022 16:46:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650930414; cv=none; d=google.com; s=arc-20160816; b=bFkb/9Y/JYNYX8wnDwbcVNMMCfW00CyPwgwyct/h+2LIy+l3dYjhXHnXKnvrXiP+qE 5pb+dFdsTNUt5657cehP9acWlQeJfQ6mESVlKKwH7itt+yJPeIyzCFmj8i1vk3DCqKxI wf+DN0K1M7Xkj0rhFYPSzHlf7+Hy3SKto3FObII9G9Dq6ZtJ0oGOFon0zXPOVKrRH4Nz 012IsxPA0NBQMvOFouy/Qle+vc95xUlxQsBKpJfb9ndtd+qEdEt2EXDmeVTy4z4CjYDm NStcSl24LzIO+orWd/aR+tOS7HimPdru2d7iZCNveGBJFIz+JdhUu8Rxhbian9NeewCG IJAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=1SLmJ+Gt1L0k/kCkmeaKgKiRoc9tt47YHMUgXXFr5D4=; b=u3EE/XY2hkgBkL+45u+FnIiZne0igfi1w8CksaryfSxAddloYL3zhU4fbkaFtGklu6 YSnovTeKCyZk7CvyPFGId3VIS5hgVHNtXZyf9y10FYUpPpB03jI//NigtP0MiHuiCa5V NtmO/5r3cDCYMTy8dCppScIZKbpqcdZeCto8r7GnhmMQdLNZ6cf2RxDVVhS7TjGYL8g/ YMO96FjNAV4QJwdmzvVTTxDp/63qf7lc54RyIsgK0+63So/I/UCc1XYmDr5LN7ZZ5n9P c6vAu59pcuZj8zmuD42QHPa7+dOe+hMzyPY1OPJRhSPrMOVm1eSfnf8HbH4bYxg+Lu3h xZuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i190-20020a6387c7000000b003ab1f09b880si6005228pge.694.2022.04.25.16.46.37; Mon, 25 Apr 2022 16:46:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243099AbiDYP7U (ORCPT + 99 others); Mon, 25 Apr 2022 11:59:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243103AbiDYP7S (ORCPT ); Mon, 25 Apr 2022 11:59:18 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0DA83FBE5 for ; Mon, 25 Apr 2022 08:56:14 -0700 (PDT) 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 45AAAB81864 for ; Mon, 25 Apr 2022 15:56:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0018C385A9; Mon, 25 Apr 2022 15:56:08 +0000 (UTC) Date: Mon, 25 Apr 2022 16:56:05 +0100 From: Catalin Marinas To: Peter Collingbourne Cc: Andrey Konovalov , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Andrew Morton , Linux ARM , Linux Memory Management List , Linux Kernel Mailing List , vbabka@suse.cz, penberg@kernel.org, roman.gushchin@linux.dev, iamjoonsoo.kim@lge.com, rientjes@google.com, Herbert Xu , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , kasan-dev , Eric Biederman , Kees Cook Subject: Re: [PATCH v3] mm: make minimum slab alignment a runtime property Message-ID: References: <20220422201830.288018-1-pcc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220422201830.288018-1-pcc@google.com> X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 22, 2022 at 01:18:30PM -0700, Peter Collingbourne wrote: > When CONFIG_KASAN_HW_TAGS is enabled we currently increase the minimum > slab alignment to 16. This happens even if MTE is not supported in > hardware or disabled via kasan=off, which creates an unnecessary > memory overhead in those cases. Eliminate this overhead by making > the minimum slab alignment a runtime property and only aligning to > 16 if KASAN is enabled at runtime. > > On a DragonBoard 845c (non-MTE hardware) with a kernel built with > CONFIG_KASAN_HW_TAGS, waiting for quiescence after a full Android > boot I see the following Slab measurements in /proc/meminfo (median > of 3 reboots): > > Before: 169020 kB > After: 167304 kB > > Link: https://linux-review.googlesource.com/id/I752e725179b43b144153f4b6f584ceb646473ead > Signed-off-by: Peter Collingbourne > Reviewed-by: Andrey Konovalov Reviewed-by: Catalin Marinas