Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp423889lqh; Fri, 31 May 2024 05:52:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUiljXqF7GXeJ1V9X71pmgUg2PCBPIkemIDFBXAVA4X4tZdrWXN7MdP0fpSw5NksAmGeAHGBLNuFIQ+VERyUfB052jq9ARLpv/P016Ykg== X-Google-Smtp-Source: AGHT+IEmqyeKTzXHOQObDp76WaQjanqR3iX6DmozPekT68zeLBJjcjuw9tmkXi3BtAspbPlcuR7K X-Received: by 2002:a17:906:4684:b0:a62:cef2:5711 with SMTP id a640c23a62f3a-a681fc5c772mr142560566b.6.1717159920267; Fri, 31 May 2024 05:52:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717159920; cv=pass; d=google.com; s=arc-20160816; b=Ulwx12cCIsRdP59jJhpFYm0j1vBjEulo2zwLi0nD83/LFLPO+OuGGVZOXZpN9cepBI qvGhDUp4LLYa8Y8jVAheG4AlPl00aX24/81Rw2e4tbAQg0tm8czDtK2eCio8jGiBt/Tf KNxgdZSz+4T79l/rHTE+BCLiCSDYekKKsdGlfzdERYtKc0d0QsaIJfSyDaawnlfLxe0z axlyfR/gCEV/5aS0NXIP7n3LOnrkX2T8vto2ZnzNcBA7ndSk8CWeWm6P8iUTbkmbHKx1 weEoUtHake+Tr8Gqi4yC2GrIiWfC9b5FznAxIF92iNThIz1EuAbqajg67bVLDTDlLso2 VX8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:message-id:in-reply-to:subject:cc:to:date :from:dkim-signature; bh=SXIUDT1VAlczL689xciNq6HcofGzzeNIfWP+0Kk0xZY=; fh=P1senaH0elpikFTV880QoDSyh1eiNG1AyyzHlIxEX20=; b=AliqKWZaqjuYBKvUpSXx2H2qfLwtR8CsOLLv/2n1STLRxL8IP5gKRGFux9dm2Gpt4W 4R2HyaB0OxhCh6v5bS2Co+y8m37q3xSuHk6xcuNXc4mzB78GF0AHXsn5/KSTbUeD7otU x/tqsEeJRcxPm/k+L+LVdQkN8loWN86jecwWkBHVq2Fw+mHi3DPFhzW+SBnHRayO2sgG Ms6mVPrEQ6pGBCzBsqqnU+3YO3zIHgmtk+wLX0LgizTOxPG12J5ZkkMhVwYqJWQVJBvn dV4u6yWS9i8bYURMxQ1zFTe6XT/MTVV9M3mJ/iY6Ex4ecVDZSe/BPKPfPh8119qoEz7+ ZHBg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=luLGxnmE; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-196824-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196824-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a683b146ec8si68399166b.762.2024.05.31.05.52.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 05:52:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196824-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=luLGxnmE; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-196824-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196824-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0066D1F24005 for ; Fri, 31 May 2024 12:52:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6AEFD158859; Fri, 31 May 2024 12:51:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="luLGxnmE" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1DD16210EC; Fri, 31 May 2024 12:51:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717159911; cv=none; b=DUmRi7sDMaIGFXQK/qb2dFUVvVlkvXXF8wLzvfgqsYetTsDZQQV0mytUJ+KwTgZX2gSjN0evji4AAy/bBi72HwOT8+qhMS05Mh0np8MAsBeObgdttxK2Xjv/AUScT49zD8TQRXeYFVO7VNfCzNb6Bb357gda+JptNS6QymlxuAI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717159911; c=relaxed/simple; bh=mq2Zzqny2IVXTs3luQ/FAMhkfHVKM3ejXtFE0TZCml4=; h=From:Date:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=oKJKk+0xGHGn3vJ692yORFNyoFfwVM/85hXXKzmPVDhtbX4UeuihsRiB2N5UUCLJ0RNc1qiqWYql/8i2Adse1asTpPOPyR37BpWA+QiGkskNmO1Bq1vL0aNZoUMftPWjruA8ZN4V6rKZUASpPW8A1X/9FDRzzGMpvWf/bLTafks= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=luLGxnmE; arc=none smtp.client-ip=192.198.163.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717159910; x=1748695910; h=from:date:to:cc:subject:in-reply-to:message-id: references:mime-version:content-id; bh=mq2Zzqny2IVXTs3luQ/FAMhkfHVKM3ejXtFE0TZCml4=; b=luLGxnmEAUdSPynLO7N1hp4ey3wblvcGEsWGmn/EJ1Nrh7bnvgF2lvKG eD9etu6B2hCAvjsdlBBW7zidJf5PMbVXGiDqWvF8A9hKvSnCNexLKKUNo MRGYS3pGFeI+X0sluXzXeXMRRuFCqEsp7d/hVdM6+xwdozBYydFC7fa/g +a280HH+/lRwa4KaDSlY5txi7E5zfaa38qyz2tZH+5A9ZGKSmTjkc1We4 nPaDXIATyLdgwbErITfP48JpuMONmQILXIM+3GJ3VH1brfmOORxv2MKxj 6tKnSBXsrtvL1ImfkGG/e4gMr7haM/s+iSSFiTNKL2bGaFb7Bv9Z6V3/C A==; X-CSE-ConnectionGUID: dEK4+ey5RMCWG35y1KdmUw== X-CSE-MsgGUID: DGKesi6tRdq05FQxoJ/zcQ== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="16647416" X-IronPort-AV: E=Sophos;i="6.08,204,1712646000"; d="scan'208";a="16647416" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 05:51:49 -0700 X-CSE-ConnectionGUID: ME7YDNouRmuXSHs5bc096w== X-CSE-MsgGUID: 1RdvsJU8T/yDNeC0TVKyXg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,204,1712646000"; d="scan'208";a="41077266" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.245.247.152]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 05:51:48 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Fri, 31 May 2024 15:51:44 +0300 (EEST) To: Reinette Chatre cc: linux-kselftest@vger.kernel.org, Shuah Khan , Babu Moger , =?ISO-8859-15?Q?Maciej_Wiecz=F3r-Retman?= , LKML , Fenghua Yu , Shuah Khan Subject: Re: [PATCH v4 02/16] selftests/resctrl: Calculate resctrl FS derived mem bw over sleep(1) only In-Reply-To: <3b0baf88-c9cb-49c0-a6e1-acb581403f52@intel.com> Message-ID: <23188ca6-2de8-3998-c73f-41939a964754@linux.intel.com> References: <20240520123020.18938-1-ilpo.jarvinen@linux.intel.com> <20240520123020.18938-3-ilpo.jarvinen@linux.intel.com> <04d0a5d6-82fa-4cc7-bd80-ee5cbd35f0c3@intel.com> <904aa442-9fc5-c6dd-f367-07b197085f7b@linux.intel.com> <700e3df4-4e10-4870-a1df-49d4616cbc45@intel.com> <0f294d43-e704-d1de-06ee-97bb81ebb9cb@linux.intel.com> <3b0baf88-c9cb-49c0-a6e1-acb581403f52@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323328-125186921-1717136622=:1027" Content-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-125186921-1717136622=:1027 Content-Type: text/plain; CHARSET=ISO-8859-15 Content-Transfer-Encoding: QUOTED-PRINTABLE Content-ID: <5c23432d-da0d-c4b1-66c5-528957fb8e06@linux.intel.com> On Thu, 30 May 2024, Reinette Chatre wrote: > Hi Ilpo, >=20 > On 5/30/24 4:11 AM, Ilpo J=E4rvinen wrote: > > On Tue, 28 May 2024, Reinette Chatre wrote: > > > On 5/28/24 3:19 AM, Ilpo J=E4rvinen wrote: > > > > On Fri, 24 May 2024, Ilpo J=E4rvinen wrote: > > > > > On Fri, 24 May 2024, Reinette Chatre wrote: > > > > > > On 5/24/24 12:57 AM, Ilpo J=E4rvinen wrote: > > > > > > > On Thu, 23 May 2024, Reinette Chatre wrote: >=20 > ... >=20 > > > > > > It is not necessary to open and close the file every time a val= ue > > > > > > needs > > > > > > to be read from it. > > > >=20 > > > > I'm bit unsure where to go with this. While I could change the code= to > > > > match what you described, I realized with the two files approach th= ere's > > > > no need to do even review/lseek() call during the measurement. It m= ight > > > > not be very significant compared with the open that was there initi= ally > > > > but it's still extra. > > >=20 > > > We are discussing the resctrl selftests that will accompany the resct= rl > > > filesystem in the kernel. When in doubt on how to interact with resct= rl > > > users > > > use the selftests as reference. Needing to open and close a resctrl f= ile > > > every time a value needs to be read from it is not the correct guidan= ce. > >=20 > > That's actually a different goal from the earlier, but I've no problem > > adjusting to it. > >=20 > > Initially, this open/close() refactoring was made because of another go= al > > which was to avoid doing extra syscalls during the test. > >=20 >=20 > It is not clear what you hint at here. Reading twice from an open file > should not be a huge adjustment so it is not clear to me how this results > in a big change to this work. As I understand this does match with origin= al > goal > of reducing syscalls since the file need not be opened and closed twice. What I tried to say is that with a single file, the test uses rewind()=20 that also needs to do a syscall within the test period, whereas if the=20 file is opened twice in advance rewind() won't be needed. But I've converted it into single file for the sake of serving as an=20 example for other resctrl users. --=20 i. --8323328-125186921-1717136622=:1027--