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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9776FC433F5 for ; Tue, 19 Apr 2022 13:48:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352980AbiDSNur (ORCPT ); Tue, 19 Apr 2022 09:50:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352935AbiDSNts (ORCPT ); Tue, 19 Apr 2022 09:49:48 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE44538BEF for ; Tue, 19 Apr 2022 06:43:05 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1650375782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XIEjYwj2QAqx9py6IcEjJB2ia7qvYgpI4ylKTJuhGT4=; b=no4qYDUPmJaIjuNukg01OeTjgoV3wmfospQz7c9rfc/E+aZOvSGl1v7Y0fHEwVs7A9Kizl FQVyhnAmwXgaKdWtc6FAPLhcpm2FqSzcVRHv6nHtBjyBbomupKefZADIS0GKD3sNkqZWkw rfnmOevicwz8Q9iRQI6/LSOASEaEPcJEiXDo24PRQLs/EXKzAG/h+EhbMnQZ9Fc+S2LaAV 1chjSJd9RaY3pI6BUZNAb80IwCTTSjaQ1arRsSdAwDk+Fc21JPlsk9T6zEcrnCNR9/fAXT AH+Nb27O9KswYsVAqV+aiZsOoQhzvG+mQjGLlLZMnKwsWCJwde/8aRX42c/8Lw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1650375782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XIEjYwj2QAqx9py6IcEjJB2ia7qvYgpI4ylKTJuhGT4=; b=yfFLli6BsXGlU2KHolkrs9DNcjU0iuLqfJXGBKLsjFGzIp5oLihJ8by2U9Z4mgVsbdcPzD T/5jRAMs6dnhp7CA== To: Dave Hansen , LKML Cc: x86@kernel.org, Andrew Cooper , "Edgecombe, Rick P" Subject: Re: [patch 3/3] x86/fpu/xsave: Optimize XSAVEC/S when XGETBV1 is supported In-Reply-To: References: <20220404103741.809025935@linutronix.de> <20220404104820.713066297@linutronix.de> Date: Tue, 19 Apr 2022 15:43:01 +0200 Message-ID: <87ee1t9oka.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 14 2022 at 10:24, Dave Hansen wrote: > On 4/4/22 05:11, Thomas Gleixner wrote: >> which is suboptimal. Prefetch works better when the access is linear. But >> what's worse is that PKRU can be located in a different page which >> obviously affects dTLB. > > The numbers don't lie, but I'm still surprised by this. Was this in a > VM that isn't backed with large pages? task_struct.thread.fpu is > kmem_cache_alloc()'d and is in the direct map, which should be 2M/1G > pages almost all the time. Hmm. Indeed, that's weird. That was bare metal and I just checked that this was a production config and not some weird debug muck which breaks large pages. I'll look deeper into that. Thanks, tglx