Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2464313rdb; Thu, 21 Sep 2023 21:59:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG6NSWeFu1upFid4MReAmVG1Xs1OddWeGNWZeUw29zxC9Cw+MZKokLcTqCjrAvksbIczO4M X-Received: by 2002:a05:6a00:b86:b0:68a:3b25:50cc with SMTP id g6-20020a056a000b8600b0068a3b2550ccmr8167823pfj.30.1695358760033; Thu, 21 Sep 2023 21:59:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695358760; cv=none; d=google.com; s=arc-20160816; b=lfORfq1yimv85uiW0gseE4C0LDklTepL0SfN5yioT5sCrZ1l2gwgMY/+/tKTQ8gJiT iROwpKskurpxciR7pInYjH5C1SsHsiQ3pGiISj2mOEZmTNCfQf+nw0rle8DOsH+fBMdm 2TaJO77tgWkNl2yYKmebpFkigIG8DsihwgtFx06ClfjVgWsA/auGQgGvACk1BZuIPaOc RRpENSGKdhYFK2zFBLwf9J9p0GWBs1w+zI06nbFOBAgYyo1oNFZZSS+nYxTICvy65rQ8 pxjomMvz/01QAJWAK2zdoQ6EpmGRjw7GPhnXY2dnvbMLrj/hh9ZUqd/C2729nQRgbS6f woIQ== 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=11t8jSHK+5xnknO9Xtns2CUZiKe7EMDNUT7JG7qLXw8=; fh=xcjcTCuAWFIVlRTbA9CB94KXqzLmwk3PV7UrCC0y520=; b=EUQnwoof6HAoM0ulujbUsY/uG1lclT7Vm6IFREFlapef2j8FNt0Tm5zazca4HHB1eH C8I7uCXgUbyyQU6h+oCuQbAJqVadJiiVuIR7lx4TBb26apBPVR/5Fix1fPqUxcvpi/6c 0cilS3KVdQW5nRF6THmBWG/nZgayG0/LxOf+IFXr9I0DbwoswlCsN+s7cf1MbXiIBaoy maqSTCWbNxDVND3XJKtAXfKymK++38WDJFf6D6gSNzfYkLBE9FIMyWeaAuXT5hKDQfSh Et+JOpaoVwf+aEoEkIkJFjuAv+a+HcH0Ol9OvCQgTXbdrposi0BzVDVujPNxmPN0bTt7 r4Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=i0xMm4ax; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id o19-20020a056a0015d300b0068fdb060072si3208940pfu.341.2023.09.21.21.59.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 21:59:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=i0xMm4ax; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 8F8C680944C3; Thu, 21 Sep 2023 11:54:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230439AbjIUSyD (ORCPT + 99 others); Thu, 21 Sep 2023 14:54:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230018AbjIUSxd (ORCPT ); Thu, 21 Sep 2023 14:53:33 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6386AA0C35 for ; Thu, 21 Sep 2023 10:57:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695319057; x=1726855057; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=gjbxdq8y7aaWf3VCG1U9ZSnRf6AqDBw7U6aKAbhuAO4=; b=i0xMm4axsfilJQX1hcCklN9UC1wxkDj9yKTqQH8hvU6mfDiQbvrs0Yag qNll2vOohFqSf/5x2jJzq8eGapCZ2YDfYRYmfvKp8WiYt3PMWmcYYwi9Y 51I1IdMuuHx+lrKtB7qh0GHf8PmvgOQHdr8QLafF57+tWGTVRwD8SuM0D 3wF9admjE2EZCCIz+Rp42/k0rJlDQgqvmUs259Ep858pDL9VrrsTi0Enj P2psue8UNyfFEBJ8qPpeH9KC1hLFQgCYid4qvUvGFLS4axFeQ2XGnFXXF 5xxDo33ahZ/hxMY6YQ4DjOJfz2WYKr38x8/pm+aem+JLiMBXLV15Mi48i g==; X-IronPort-AV: E=McAfee;i="6600,9927,10840"; a="383341226" X-IronPort-AV: E=Sophos;i="6.03,165,1694761200"; d="scan'208";a="383341226" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2023 09:52:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10840"; a="696820646" X-IronPort-AV: E=Sophos;i="6.03,165,1694761200"; d="scan'208";a="696820646" Received: from tassilo.jf.intel.com (HELO tassilo) ([10.54.38.190]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2023 09:52:37 -0700 Date: Thu, 21 Sep 2023 09:52:36 -0700 From: Andi Kleen To: Ingo Molnar Cc: Yi Sun , dave.hansen@intel.com, linux-kernel@vger.kernel.org, x86@kernel.org, sohil.mehta@intel.com, ilpo.jarvinen@linux.intel.com, heng.su@intel.com, tony.luck@intel.com, yi.sun@linux.intel.com, yu.c.chen@intel.com Subject: Re: [PATCH v7 1/3] x86/fpu: Measure the Latency of XSAVE and XRSTOR Message-ID: References: <20230921062900.864679-1-yi.sun@intel.com> <20230921062900.864679-2-yi.sun@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 21 Sep 2023 11:54:08 -0700 (PDT) > It seems unnecessarily complex: why does it have to measure latency > directly? Tracepoints *by default* come with event timestamps. A latency > measurement tool should be able to subtract two timestamps to extract the > latency between two tracepoints... > > In fact, function tracing is enabled on all major Linux distros: > > kepler:~/tip> grep FUNCTION_TRACER /boot/config-6.2.0-33-generic > CONFIG_HAVE_FUNCTION_TRACER=y > CONFIG_FUNCTION_TRACER=y > > Why not just enable function tracing for the affected FPU context switching > functions? Or use PT address filters to get it even accurately, as described in [1]. In any case I agree the trace points are not needed. -Andi [1] https://lore.kernel.org/lkml/ZPOIVmC6aY9GBtdJ@tassilo/