Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp5364739rwb; Tue, 17 Jan 2023 12:43:06 -0800 (PST) X-Google-Smtp-Source: AMrXdXs9t+7xj+JWf5zXgSHQDkOpUPsssHCe0dMecImxxtlqzGy8259zTsYzs9mOwO8ZZaeiQ32E X-Received: by 2002:a17:907:cc13:b0:78d:f455:b5d4 with SMTP id uo19-20020a170907cc1300b0078df455b5d4mr3715739ejc.20.1673988186765; Tue, 17 Jan 2023 12:43:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673988186; cv=none; d=google.com; s=arc-20160816; b=GLpL7xcRYbVOkkaGIcLR43FrGoK3yLvyln/JrDMZ5/nO05pLa6bl+Yn+v8ddDbu+JO p8m09285IoYToZC8HjvBI+gWocI4hgqBtaspSa3eoy9tKKnGsabt/oDtRhmEGwnRAMc9 HwwNo4rt/AWdFqFuPbLbqGZrc4wl/x61ymK/RkXavfNPxI4aJBWBDQcqTrha25pnLafr gczWIsE/dXj07LSF/MGJgCEByCMz2V5yX1UlkLGSjM5ohdL3r7AHCrz17ZpiNkdjo3yh B9qMhoiW/C8k6VdkE16psSS3aDQgzyhtmb17FBvhOW4J4gXmX+JJPydapHho2lxKLmHA 0Hvw== 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:dkim-signature; bh=unmKUMBNwOXHvAndehV7v/2JxDCOLUZsRo+qdzYFj6A=; b=zau6zNh8X83sClwMUU4pkOIbLbaSYINn0QwGpojQwP4e0dP/+J4gH1LYPKebx+eE7/ FqUi7aHAPqsV1J+APlBTNOq+QBZgoAqm4e09XZvRspyEQmT1pcSlVN9gGWYYAV/4g4c2 U1nLtQgTkNl/6aJ5chJpZlo/p9e++t25GZKHHQUPVICH01EB0eqkfEK9V2isdDrn7r/C fDqumRECyzT5vzlXdORDbeJ0bPfHLxVHONzhwphQW6eySmwL4i7QWjbStB7BihqATqJX oMoLjVSAEJPKEDFnC4Hy+e8pgVHa5fENmo/D4TluyDygutg3MfD1h5+zTgwapnNfKsya yoiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=n0jfxOM3; 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 bb7-20020a1709070a0700b0084d4a07de68si28130066ejc.477.2023.01.17.12.42.55; Tue, 17 Jan 2023 12:43:06 -0800 (PST) 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=@infradead.org header.s=casper.20170209 header.b=n0jfxOM3; 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 S230254AbjAQTKH (ORCPT + 47 others); Tue, 17 Jan 2023 14:10:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232774AbjAQTHX (ORCPT ); Tue, 17 Jan 2023 14:07:23 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64F695A371 for ; Tue, 17 Jan 2023 10:21:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=unmKUMBNwOXHvAndehV7v/2JxDCOLUZsRo+qdzYFj6A=; b=n0jfxOM3FQiFZJqzalSvUFm+hO ZhdQcBgFrC4WuybQ7vqhCBQ5vnriNnOBC/Wf/3VU4G/PLdgtCKjQ8p8fJlwFrxjFnucdKs2jBoOh6 +8khK/X161uXMNtiyqPYR7y12+s5aXi2Cuo4kyY+2/meTLEenKUBekl05VIcOKI4jwPy4cVLAgBo+ sdt5uFvqPtGv/w9QX6Pn0BUf09bGuLbg4lQK8E7xz8jjhimia8STgLuXB5yqUj3Avpzqc0b2W5ILV nj1xiC7F/2/+yi9kHLyVI88rH2A6PRWQFt+apqQLA81gb9d03HuPEEQYwEe4x/OfxXtjUrghi9gR4 nabVIXkw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHqaT-009u5G-JV; Tue, 17 Jan 2023 18:21:33 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id B0A9E30030F; Tue, 17 Jan 2023 19:21:18 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 98FCC210FFF6D; Tue, 17 Jan 2023 19:21:18 +0100 (CET) Date: Tue, 17 Jan 2023 19:21:18 +0100 From: Peter Zijlstra To: Linus Torvalds Cc: "Kirill A. Shutemov" , Dave Hansen , Andy Lutomirski , x86@kernel.org, Kostya Serebryany , Andrey Ryabinin , Andrey Konovalov , Alexander Potapenko , Taras Madan , Dmitry Vyukov , "H . J . Lu" , Andi Kleen , Rick Edgecombe , Bharata B Rao , Jacob Pan , Ashok Raj , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Sami Tolvanen , ndesaulniers@google.com, joao@overdrivepizza.com Subject: Re: [PATCHv14 08/17] x86/mm: Reduce untagged_addr() overhead until the first LAM user Message-ID: References: <20230111123736.20025-1-kirill.shutemov@linux.intel.com> <20230111123736.20025-9-kirill.shutemov@linux.intel.com> <20230117135703.voaumisreld7crfb@box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE 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 Tue, Jan 17, 2023 at 09:18:01AM -0800, Linus Torvalds wrote: > But maybe even those aren't worth worrying about. At least they do the > unmasking outside the loop - although then in the case of execve(), > the string copies themselves are obviously done in a loop anyway. > > Kirill, do you have clear numbers for that static key being a noticeable win? Numbers would be good; I think this all started as a precaution, but clearly that's not really working out so well :/