Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1070433lqp; Fri, 22 Mar 2024 05:00:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXkatgJGmrzLx9UmEE5V8W2tSi5RZJnLZ4elbXli2jERrX3XCH11hsrvMTyMB0i8MNqLiFJxPzj21euPRZUs011THERSSFg1ghxkzVFxA== X-Google-Smtp-Source: AGHT+IHNIAu6TjxRGjgN7EqpqgA3yyuFdCoQEe+J+wCcwSevzd4tY1yI4kD333UUiY9abSuNCBt0 X-Received: by 2002:a25:6b4b:0:b0:dc7:465d:c06d with SMTP id o11-20020a256b4b000000b00dc7465dc06dmr1745707ybm.28.1711108842095; Fri, 22 Mar 2024 05:00:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711108842; cv=pass; d=google.com; s=arc-20160816; b=Y7hS8lBeuMthyh9vZPDSZPikj9kgpwTGUL86CAnfuwT8N3/kQVUZfDfD/o2bd5MCUk JTWRLmZfehcHyMxYkG0cqERTG1LypaOXBKR81oOuzrGbtZCUCoQjBXCD/kX+NVF1GXe/ I97tlm79vpf8BcAgxyIinnTWt2tG8fKX5JCSBQk8XDI5Kb/pXa0gPVZEpf9oR86jQN0V uT5HPtzKTHMEF8hGzCSb2z5NTJpGU2XJAB6mRYkgNA3/gFzOJrXToUyAUxZV9uF7e5er mDYF6QHGwWa3T30WPsjm+M8X4sKilG5neHT67hqTzHspGMqTR0u23atlAS4u0cEbMvoa vBXA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:date:from :dkim-signature; bh=A03nbeSOs2WiQxxlypNH/bkr8nMGWgsKzeKXob/LTQY=; fh=FsRig29ZB29kkJ9iqn320o8ulJTTYqS1A2tOCu77HZI=; b=uX1MdcHGhibImhlft1rYQy5auan5YUUn8xdLZ7T5SmubR6vIstk+OxrLgIlKlMBRrp yC1u9E/awwuw+k/6kmU1FkSXcAj7OJfHglJZKFGiOA9iESnmqaFkEK/rX9r5+RiMoacT N5yPZbbdCuw7xJ0KfkkiNzWLOCMj9yQysj7G3Mv2TTcYjbQIImX4XUTyWS3wdPBxT8du NCh5y4woijajmIWF3cPON1ln2xWC7H73lo58BOaCU2EMN8Zf1fC5DNhMKF/xTaiOYEEo 8rOXo+5+XKLHKfJvx7oZAouP6YJnColQ5fZiMF9NNrmLvRJYo4p7PuoAEqj9SpqsEZhw 6z/w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RpMmkcgY; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-111397-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111397-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v131-20020a254889000000b00dc6cbdff4b2si599397yba.398.2024.03.22.05.00.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 05:00:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111397-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RpMmkcgY; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-111397-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111397-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C72091C225F7 for ; Fri, 22 Mar 2024 12:00:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F1393FB85; Fri, 22 Mar 2024 12:00:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="RpMmkcgY" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 5C8C6405DF; Fri, 22 Mar 2024 12:00:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711108835; cv=none; b=r1cCAoD9/vg6HMGqX+Vev28aY9vG34lE2l7Tb5oJj36rbgtFd6Rqoz5d7s9MF/sLQw13DcxarpmkkstFWyBx0AvoN29z2LTdoBA0vkT+94GwKyTP5Yj2txp0ebtsHL+PxVj3kasxOUWepMdy6L8zziGOKyHpSiWtdpiMtsb5rLQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711108835; c=relaxed/simple; bh=92pX5IDP/FkapkpehkoB1Zy0xn13DvY+iux3kEzJFh0=; h=From:Date:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=MefNiKNrZ55MqGXEc8cE4eB1202KClPBhMaRppjR9qErIt7JfYis4qAcUN9eL6pfY9LzrHgBv9cawG0+g54KgUxIjTrBJ1e38WAZm57nFNZ2qZNMzlf+cjTy2mbYs5P/5AhfSFxtAa+gjjm6CZcLvm7Sqp2ZScV2QVNwAwsYBHo= 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=RpMmkcgY; arc=none smtp.client-ip=192.198.163.19 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=1711108834; x=1742644834; h=from:date:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=92pX5IDP/FkapkpehkoB1Zy0xn13DvY+iux3kEzJFh0=; b=RpMmkcgYVBhrQDTc0m3aAqNBjjThmVTuaN51Vz1MSrRYHmb0whIKYa+J I6IFmPDk18O11RZzKiOD257NLlxl7dSyqN3+BeDYZ5q26T8PswyT6qo/k RqeqHxC8gHSnozgVvIK8s47SpphEbAkp5+K66CmEJCOeAAVeuHYPty4zo iP4dnjyZA0L9uKTEZR+j1XXGiQGFu8ddCRHNYee5T5q3N3VJ8vpNGhsn6 HBrm/xe0uEa8jBcSTA24b924rUG8WfqDgcJNMAbWiJ8mINnDOW+Dl5GBY KRYMAmuHBooTevd8+USrYw1XlyPLdVTxmPzKzFqzioLBZ7edslLIlryFC Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11020"; a="6007738" X-IronPort-AV: E=Sophos;i="6.07,145,1708416000"; d="scan'208";a="6007738" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Mar 2024 05:00:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,145,1708416000"; d="scan'208";a="46002387" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.245.247.18]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Mar 2024 05:00:29 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Fri, 22 Mar 2024 14:00:28 +0200 (EET) To: Reinette Chatre cc: linux-kselftest@vger.kernel.org, Shuah Khan , Babu Moger , =?ISO-8859-15?Q?Maciej_Wiecz=F3r-Retman?= , Fenghua Yu , LKML Subject: Re: [PATCH v2 01/13] selftests/resctrl: Convert get_mem_bw_imc() fd close to for loop In-Reply-To: Message-ID: <2d75c1fc-3ff0-839b-996b-28fd4d02433c@linux.intel.com> References: <20240311135230.7007-1-ilpo.jarvinen@linux.intel.com> <20240311135230.7007-2-ilpo.jarvinen@linux.intel.com> <832ec5e1-db5c-4123-8768-39ba9e6cca82@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-207245466-1711108828=:1115" 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-207245466-1711108828=:1115 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Fri, 22 Mar 2024, Ilpo J=C3=A4rvinen wrote: > On Tue, 19 Mar 2024, Reinette Chatre wrote: > > On 3/11/2024 6:52 AM, Ilpo J=C3=A4rvinen wrote: > > > The open() side handles fds in a for loop but close() is based on two > > > fixed indexes READ and WRITE. > > >=20 > > > Match the close() side with the open() side by using for loop for > > > consistency. > >=20 > > I find the close() side to be more appropriate. I say this for two > > reasons: (a) looking at the close() calls as they are now it is > > obvious what the close() applies to and transitioning to a loop > > adds a layer of unnecessary indirection, (b) I do not think a loop > > is appropriate for the READ/WRITE define that just happen to be 0 > > and 1 ... there should not be an assumption about their underlying > > value. >=20 > Hi, >=20 > So to confirm are you suggesting I should remove all the other loops=20 > instead? Nevermind, I read the comment to second patch, so the answer is yes. :-) --=20 i. --8323328-207245466-1711108828=:1115--