Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1674027rdb; Thu, 7 Dec 2023 06:04:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IFXpL5bhAJmx6AwZmcUvBk4t5gkP1HaIhlUT/q22qHguMjimPn9JxwRTFDnXbUZFbZ0tTVc X-Received: by 2002:a05:6a20:1609:b0:18d:4836:f5a2 with SMTP id l9-20020a056a20160900b0018d4836f5a2mr2522037pzj.45.1701957858775; Thu, 07 Dec 2023 06:04:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701957858; cv=none; d=google.com; s=arc-20160816; b=kwFCY6Q8o+IVCTylWHf1utSWlGXljoeRWmirdh+azV8mI6uWBVq7ALaGUUTJTM9Gqo Pdd1hInIwAxfcreT+DLOgLG9cgiwn13tPyVaVMWWk43Axtn86o2DW9jTxzj6yOEUQnkU 1kRrAjh7m7jaQfYtiWjafoIErAOoA82HCsIKOJs57rlXnMhjLUNrl4OSqSm7Jmb++g90 Nyu5F7V26jrMEjUKD72a1kw3E6DLyIKoYLF1yk9gEcg1ItjPhCj5q+jERTlVzgSDPKv1 Nx37J+FpSL5ec34cwLKqNZav9yPRfeq/X3jfAdvIgA8dRQUnb56uMHtgD3xYStJKNfS0 ZQZw== 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=EiUXNOtYm8g4jHJewJz9DYab9/pRbiXmYAtJNCNijZA=; fh=XHJC3rNtFqy9NBdwfesynq0dG98cBzq8Qrv2Usg7GS0=; b=E/1IDeAeVC+ClTT3pOteT5ExpaEF7y55O3NkAjarVPdJ5d5QrS1j6XtipXjKFOrbjT FMgNXKeTRhD2be5AIGWZWOy20URLjwVwKhI2jnxG+uhLHgKYu3pyZd+yeaUzBnfiY/lf XxtZH2oGuOkiI4h2uPnwrtFg0lQ+ImZryeo3HYe4sTZlNiIy7kiqm3XDicrmBWlRCrH0 k7rGYi6JMlNpYvcvsYkitAKvTQk9JTgyvVaqUIOoL6oNTikc2zXyAbSLSUke+zN3r9Qz 0eVcyZuI8SSdJeZzCZZgCSxY3DZjJsQD7R7fyzIm620Tbeu/v9SSEXiWvqMfpLKkIVSr 47VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dx0NFVnx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id c12-20020a6566cc000000b005c6001ec190si1277225pgw.892.2023.12.07.06.04.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:04:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dx0NFVnx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id B06E4804E78E; Thu, 7 Dec 2023 06:04:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442950AbjLGOEH (ORCPT + 99 others); Thu, 7 Dec 2023 09:04:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442604AbjLGOEG (ORCPT ); Thu, 7 Dec 2023 09:04:06 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7259310C2; Thu, 7 Dec 2023 06:04:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701957852; x=1733493852; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=sQ3VPlHWz03Xl+CmKdb7cfnD+1sqirMdhZ7aUAJOLcI=; b=dx0NFVnxmjHsMraKtyFHMB5OgbdBxW2XQmX5nMTfGfyzPY1+lfXf1fs1 rsE1L15sM5aa0deNTZTr+Td8Exmkhznb8uu0cC2oPMDx2VeQs/T0gVgc2 Wbk+oNEDm/klJJ6YmAJgP4utkX3r5+aPwNev0ONabZDZIt4PUrq1HfZE4 h/8DbjP6H+2yJziVH2VwuzNwr/CucJxTGWAas7zBcpWzr7uoxXMQsSB2L d6Zd495ff8PDfFNiCfh1rLCuscq9z+iLNjYN5ymP+8LlPcITcugJZIeps 7BTVlLxNS110A6fDcvNtsfCLa0QkQGTf2OtoqSPeke61dpPC8GgttTZv6 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10917"; a="397024582" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="397024582" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2023 06:04:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="19709866" Received: from dkrupnov-mobl3.ger.corp.intel.com ([10.249.34.6]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2023 06:04:10 -0800 Date: Thu, 7 Dec 2023 16:04:07 +0200 (EET) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Reinette Chatre cc: linux-kselftest@vger.kernel.org, Shuah Khan , Shaopeng Tan , =?ISO-8859-15?Q?Maciej_Wiecz=F3r-Retman?= , Fenghua Yu , LKML Subject: Re: [PATCH v2 02/26] selftests/resctrl: Split fill_buf to allow tests finer-grained control In-Reply-To: <356eb613-a380-4389-96d3-f2667b7d18d3@intel.com> Message-ID: <4ad2d41-9d65-e2ae-ade8-6d38dd4cbd81@linux.intel.com> References: <20231120111340.7805-1-ilpo.jarvinen@linux.intel.com> <20231120111340.7805-3-ilpo.jarvinen@linux.intel.com> <356eb613-a380-4389-96d3-f2667b7d18d3@intel.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1882619583-1701957851=:1765" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 07 Dec 2023 06:04:16 -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-1882619583-1701957851=:1765 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Tue, 28 Nov 2023, Reinette Chatre wrote: > On 11/20/2023 3:13 AM, Ilpo Järvinen wrote: > > MBM, MBA and CMT test cases call run_fill_buf() that in turn calls > > fill_cache() to alloc and loop indefinitely around the buffer. This > > binds buffer allocation and running the benchmark into a single bundle > > so that a selftest cannot allocate a buffer once and reuse it. CAT test > > doesn't want to loop around the buffer continuously and after rewrite > > it needs the ability to allocate the buffer separately. > > > > Split buffer allocation out of fill_cache() into alloc_buffer(). This > > change is part of preparation for the new CAT test that allocates a > > buffer and does multiple passes over the same buffer (but not in an > > infinite loop). > > > > Co-developed-by: Fenghua Yu > > Signed-off-by: Fenghua Yu > > Signed-off-by: Ilpo Järvinen > > --- > > Could you please list the changes to a patch in this area instead of > lumping all in the cover letter? Without this it is not clear what, > if anything, changed in the new version. Okay, I'll try to keep them per patch. > > +static int fill_cache(size_t buf_size, int memflush, int op, bool once) > > +{ > > + unsigned char *buf; > > + int ret; > > + > > + buf = alloc_buffer(buf_size, memflush); > > + if (!buf) > > + return -1; > > + > > if (op == 0) > > ret = fill_cache_read(buf, buf_size, once); > > else > > ret = fill_cache_write(buf, buf_size, once); > > - > > free(buf); > > > > - if (ret) { > > - printf("\n Error in fill cache read/write...\n"); > > - return -1; > > - } > > - > > The changelog does not motivate the removal of this error message. > It seems ok at this point since the only failing functions already > print their own error message. Without a motivation of this change > it is not clear if it is actually intended. Hi, I don't have recollection of how it ended up into this patch as it's so long time ago already... But in any case, it naturally seemed to fit into the next patch that removes the extra call level so I moved the removal of the duplicated error printout to that patch instead. > In any case, this looks good. > > Reviewed-by: Reinette Chatre -- i. --8323329-1882619583-1701957851=:1765--