Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1506931iob; Fri, 29 Apr 2022 06:55:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+2KXvOSyuq5WOfvb8SOW85B8NxelLxuCXMshbEzbgXWPNmMy+fn2ByL9LMepjAFxGJryX X-Received: by 2002:a17:902:f693:b0:15d:1c2:3436 with SMTP id l19-20020a170902f69300b0015d01c23436mr28101597plg.161.1651240529172; Fri, 29 Apr 2022 06:55:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651240529; cv=none; d=google.com; s=arc-20160816; b=LgDRvrwMG/HgYunDmyg/JiJ/rpBoeeA7PS6eHf2fdcXg9Y7/9usJxyCTg34/h+KkEj T15DKpqnG/OkZLh7bnaSjn6GxwP3EdmdXUa0YYzCDeZLpb7sQW3uZGF/YicoYikQjPlC j92x8vs8ujnc4y4cloqQG5cxulYPSf6WJHgZyxJpav+d1OagcYPJpybnpcnejPfRb0EO 0moSPfwpocaiiXNGpZ9xPDbDHo2k5TQW1dJf/HpheKnerdIBTEXGJkaKyCKzMgMF15RA kxtkp2L02Mou3bfAQctlbnmUiyzQJYnHGS0dsd5Hcce2VbNs+CJs8Qa15/gMIA3PijIa pmNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=c50DF01aKj1CW75/eNJw3BumKm0+zPFfK1oMV+pk24I=; b=hJU84uYZKq+kphtmkZZwRv/ahGqnZDY3F9lsIZhUC3mB/a+SAcd5R1q6fsjxUi5ri5 CGcgmMyXvcyqdSU5MXm1OFb4xvXZb8DVrQmOfsg+oxioUFZPndKZDo+UwQ/5z6xRevQ1 xVcfRFk7iH6/8AFQY8dK4jCn1onGQtqOp+Jf8a2WZfHepUJvnNLCWyTr92+cXjU8b8W/ R0O9Txt+ugAA/77iIvUXtXmQ5vh5eTm783fwdhQlJcNMhnHH+nh3MEzJq43SjoupjrhB sqxwBX46jHuWhZpDKWLUT0O0dtlA+V2Ct6tM0NS9A5U0UEafOcDHN89cEFdrnWbB91NC v5AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=ljEEUfWi; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=UlkbKJTm; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k187-20020a6284c4000000b005061eb330a1si6880284pfd.351.2022.04.29.06.55.13; Fri, 29 Apr 2022 06:55:29 -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; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=ljEEUfWi; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=UlkbKJTm; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357116AbiD2J7y (ORCPT + 99 others); Fri, 29 Apr 2022 05:59:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235489AbiD2J7v (ORCPT ); Fri, 29 Apr 2022 05:59:51 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9D2E36321 for ; Fri, 29 Apr 2022 02:56:33 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 5490D21877; Fri, 29 Apr 2022 09:56:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651226192; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c50DF01aKj1CW75/eNJw3BumKm0+zPFfK1oMV+pk24I=; b=ljEEUfWi+6AlnTjiGF2lXCRDMgkNjliDgjPWetyY+nd74sn+YGHonn9886TLfklgiG1Eat DSYulZuWGa2xq+hcCPLEelsND8zgJnIRz+9VDspmPP+l5JPH5zdZpwKdUC8dDQis8LpyMR jAyfVZvCsll3yoOySi9ivmCpGhpb3yU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651226192; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c50DF01aKj1CW75/eNJw3BumKm0+zPFfK1oMV+pk24I=; b=UlkbKJTmkK1VV7foFZ1hx56oPs3gI/iSyBC26ypSERws2k1zWZtumF/0xPCUkTeccf+3n1 YUtvmPSo87fjHXBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1953C13AE0; Fri, 29 Apr 2022 09:56:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id UNF3BVC2a2IZEQAAMHmgww (envelope-from ); Fri, 29 Apr 2022 09:56:32 +0000 Message-ID: <2408e290-e016-250c-9e54-350fb923d162@suse.cz> Date: Fri, 29 Apr 2022 11:56:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH v5 2/2] mm: make minimum slab alignment a runtime property Content-Language: en-US To: Peter Collingbourne , Andrey Konovalov , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Andrew Morton , Catalin Marinas Cc: Linux ARM , Linux Memory Management List , Linux Kernel Mailing List , 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 References: <20220427195820.1716975-1-pcc@google.com> <20220427195820.1716975-2-pcc@google.com> From: Vlastimil Babka In-Reply-To: <20220427195820.1716975-2-pcc@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, 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 4/27/22 21:58, 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: Hyeonggon Yoo <42.hyeyoo@gmail.com> > Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> > Acked-by: David Rientjes > Reviewed-by: Catalin Marinas Acked-by: Vlastimil Babka Andrew's fixup LGTM too.