Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5885988rdb; Thu, 14 Dec 2023 02:25:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IF+yqB7gvrfL1BFWGAahaB79Ni8tYDZBteO0Rlc9h/cIDLPN+hl79esO62BVKmQqP7MqaNJ X-Received: by 2002:a17:90a:f3c9:b0:28a:fdcc:e5ce with SMTP id ha9-20020a17090af3c900b0028afdcce5cemr1110225pjb.4.1702549559390; Thu, 14 Dec 2023 02:25:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702549559; cv=none; d=google.com; s=arc-20160816; b=AnXaWQ/TMLK0WZB9BrzJbYIviHXfEi3nK4MuXnC4Fi+B2WX9o3tScWSq/lhpBJEE/A p1oOm75NtFfghwFQvnkeEG4WluiHd3eyZcOWtxAtJu3tsY+HDDUAlcLzybT4kjj9wM1y k1qIFnpExQYJcl2VdfRdEVQcDhtAsFDA1W311+jenS6s49gD/8Ck33IOCPbEcInHYwO1 KdMLCQ/k4PQUOnVJ2pSGRu6guVqPyAcE+82oh1RSUm60TMFl96UIxsuiAjLv9pZT4iyN WVmkikaRZ7TMWPMJm6w2ofuQIR+b3c54HN6Rvep32jLGcCWqwcmXkwQyDJvoU5sox6w2 sjhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=X/guIrd8MDL58PfOTx3xnx7FWCddrl3B9yWP947w38I=; fh=thThAoZeHUbpnsrLFqWCKH4IYRwp6d9YviFbepjY5VA=; b=braMqPf2prH/t5ee0dyV475CV6NR+p3aZIcPM0pPwwvg1xFCLX/5G/0q7LvU6oDH+q pwETtYyE1B7aVXVZ3TBs7KpfNCxEM7QzcVoewzYAkGZ7TjTjUposcxMKj1oX3JRypxu1 VT54/5v/sZUsQtBiE0OoYMpeZrgRfTzAbqJPbvFHvHdU6EfUIms0qK27CH67uxXCs963 XAeTSeFj8g/a99oDxcdQydOEDRdt75FM/x83l21O4OZ3ka970rfp/0d24EJBO9qC0uMl P/TVfoo4bvNrGjjZSCVWyFhn/wt8e4jgECZPzxf2C6d0SwUyp2jj1UGfpSjB2Qkh4DyX YlqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Bxs93YLM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id 66-20020a17090a09c800b0028b14327e57si288973pjo.123.2023.12.14.02.25.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 02:25:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Bxs93YLM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 460E080BFED6; Thu, 14 Dec 2023 02:25:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443599AbjLNKZW (ORCPT + 99 others); Thu, 14 Dec 2023 05:25:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443626AbjLNKZT (ORCPT ); Thu, 14 Dec 2023 05:25:19 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A796FBD; Thu, 14 Dec 2023 02:25:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702549524; x=1734085524; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=Y08OL+ZDG+251KCF02UCSALATUKZP/Mzo4boe/OL14E=; b=Bxs93YLM0WpOKdGF4coCaGBM0Rr83YLPoBTn5WumC8lCd8sVRIIi49Mb dMQcqNs1bkO7YHwNHqnQPuI9kBgcKeBvJFaH1YYZzTdwD2xmI6x/I49p8 omlCsAeFVCexaXqqqgRKyFyswtYWNZaacETRkNmZ9SIv0T+rrljLOBz8L bX0MFa/D+yj0V1f1iXrR38nSkfDUYkhGeiA29/F//lj3m4A+EvWLgkPK5 EqwBubLZRfGA4/K34UUlsLRHQSLjjJTB/dZKf4dbg1w2X3IkHH7vWjoiO 5Ybk/cKQl3+QNEhg6xLmPn8Fdh0KasYqt+FZYVAzBc+xSIGGPhk6TUxxj w==; X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="1918285" X-IronPort-AV: E=Sophos;i="6.04,275,1695711600"; d="scan'208";a="1918285" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Dec 2023 02:25:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="844655770" X-IronPort-AV: E=Sophos;i="6.04,275,1695711600"; d="scan'208";a="844655770" Received: from ijarvine-mobl1.ger.corp.intel.com (HELO ijarvine-mobl2.mshome.net) ([10.237.66.38]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Dec 2023 02:25:20 -0800 Date: Thu, 14 Dec 2023 12:25:18 +0200 (EET) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Reinette Chatre cc: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= , linux-kselftest@vger.kernel.org, Shuah Khan , Shaopeng Tan , =?ISO-8859-15?Q?Maciej_Wiecz=F3r-Retman?= , Fenghua Yu , LKML Subject: Re: [PATCH v3 23/29] selftests/resctrl: Restore the CPU affinity after CAT test In-Reply-To: <04650d92-fb80-49e2-87b7-4f9dbec922b8@intel.com> Message-ID: References: <20231211121826.14392-1-ilpo.jarvinen@linux.intel.com> <20231211121826.14392-24-ilpo.jarvinen@linux.intel.com> <04650d92-fb80-49e2-87b7-4f9dbec922b8@intel.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-866747641-1702549522=:5690" 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,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Thu, 14 Dec 2023 02:25:39 -0800 (PST) This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-866747641-1702549522=:5690 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Wed, 13 Dec 2023, Reinette Chatre wrote: > On 12/11/2023 4:18 AM, Ilpo Järvinen wrote: > > CAT test does not reset the CPU affinity after the benchmark. > > This is relatively harmless as is because CAT test is the last > > benchmark to run, however, more tests may be added later. > > > > Store the CPU affinity the first time taskset_benchmark() is run and > > add taskset_restore() which the test can call to reset the CPU mask to > > its original value. > > > > Signed-off-by: Ilpo Järvinen > > --- > > +/* > > + * taskset_restore - Taskset PID to the earlier CPU affinity > > + * @bm_pid: PID that should be reset > > + * @old_affinity: The old CPU affinity to restore > > + * > > + * Return: 0 on success, < 0 on error. > > + */ > > +int taskset_restore(pid_t bm_pid, cpu_set_t *old_affinity) > > +{ > > + if (sched_setaffinity(bm_pid, sizeof(*old_affinity), old_affinity)) { > > + ksft_perror("Unable to restore taskset"); > > This message is not clear to me. How about "Unable to restore CPU affinity"? Okay, I can change that. I actually was on the edge what to with these because I was just trying to be consistent with the existing error message in taskset_benchmark(). I reasoned that because "taskset" is the userspace tool which the user might be familiar the original idea of using "taskset" might be helpful. And now rereading what I wrote in that message, "restore taskset" does not sound very sensical grammarwise. :-) -- i. --8323329-866747641-1702549522=:5690--