Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6838626rwr; Tue, 25 Apr 2023 04:45:29 -0700 (PDT) X-Google-Smtp-Source: AKy350bzl4/nLq2HiTsubQm0u/R2UeEd3WI5cc+ypWwIj4lyLhaI20bkD2WiPd/ECbzqPVjwmyn/ X-Received: by 2002:a05:6a00:124c:b0:639:c88b:c3e0 with SMTP id u12-20020a056a00124c00b00639c88bc3e0mr22698293pfi.22.1682423129161; Tue, 25 Apr 2023 04:45:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682423129; cv=none; d=google.com; s=arc-20160816; b=Dhyb14DeJVj2L1Ih0eFiLK97Roe1a8QYQlkLaExeYbkrLUtnc/1PCyvX54loUhNplD gbaY3DOKa1geuScLXaT1DWVINv1gHrG9mOoiuj9LDeu4vCRAl60N2DMaZdNBEhJmwUY5 h1xW9SPkWqu57dAq8wp4/Nq8559/hE92HQePFfJZju+24R84Fgzprw2ArgvZK3n+aAew OTrt3MJUw7aYQdq5gKaZ8rrpAIJ+ZoqKDofcqNpD+ALQYcAV0Xd2v2zQeFjypuZeiUjM 1oFWV1GfjP80zXGVpZKA6oKkwt7qr5bmD4OYGgv7LlqQK3yB+mJZRm3cWks/mCCOgDd7 SIjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-id:mime-version:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=0xp9runwNQbK66915FWywesiEJRC0um7R+lQuZrZRmM=; b=PJWYhn6jhHEsq23I7pKHv8SZgcPzRBbqEQnmlItRyIFOYz5EsHrcwQn8XcQsV3fPYr Hb0ptn9wQlW+Xjo0SlNZAJmuscUnNuj7YxV5pYO1Cxa/RIvZp963tSmf2irYXmbP4jaA 2RLFEZS9WaMCZHzmxpMVNtiusM4kZvu1KwMLUYmKk6QySXVjA6NJRyCDw44d8ouukMZv 3Yg/6KfWgV9Or0xoV34+Xlqd9sxw/8917R2edMwk25kbVLFOepKupENuCp/98fmS2Mg1 2iBdecC3L47I8jyIgAWWpXu1TSqHgHdzB6Fe4Ck1ECcaFx9bfGGGFGYpMAUPOuvVaq5Z lm+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=A7DnH6bw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a21-20020a63e855000000b0051b10b20ceasi14214020pgk.893.2023.04.25.04.45.13; Tue, 25 Apr 2023 04:45:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=A7DnH6bw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233793AbjDYLlz (ORCPT + 99 others); Tue, 25 Apr 2023 07:41:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232851AbjDYLly (ORCPT ); Tue, 25 Apr 2023 07:41:54 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4B54468A; Tue, 25 Apr 2023 04:41:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682422912; x=1713958912; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version:content-id; bh=92nD2nFX4b4wdJozm12atNE8oXhLy20Dg1Gg1HUpNUU=; b=A7DnH6bwq5RrT0SU/v7zmWltGr9eq98uTlGMXfkv1MZY8kCbh6tlGC1X 7JJ6qKixO7KOFk5uY4+y3tSJHKSiuiPRZA+uLrUadfKATQetuE/lT870H n7AJE6vpmz8Gd/cOAGuOc6J3sY/afcfakXDssp9hQjFJeonndTc9eo7uI XKAE/L5G5HNq83MjwTuIyveb8JdZhr5qI/Q/Byqa/CmviMhPQVoIM/Hz8 t6O+WmY5qkVV+xbz15Pw92PKYysDdZfdBBWiJZy3bEA0sWtnuftFQafqY KVH66McOlWrBnCjZO8qLvdiAPKlibIR1GgtEoPZfdfkXDgH3Nye8BrLsu w==; X-IronPort-AV: E=McAfee;i="6600,9927,10690"; a="345492856" X-IronPort-AV: E=Sophos;i="5.99,225,1677571200"; d="scan'208";a="345492856" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2023 04:41:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10690"; a="817658146" X-IronPort-AV: E=Sophos;i="5.99,225,1677571200"; d="scan'208";a="817658146" Received: from rolfneux-mobl.ger.corp.intel.com ([10.252.34.113]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2023 04:41:50 -0700 Date: Tue, 25 Apr 2023 14:41:48 +0300 (EEST) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Reinette Chatre cc: linux-kselftest@vger.kernel.org, Fenghua Yu , Shuah Khan , LKML , Shaopeng Tan Subject: Re: [PATCH v2 17/24] selftests/resctrl: Replace count_bits with count_consecutive_bits() In-Reply-To: <455c986a-0d51-0302-d5c3-c6c0f1cc6bad@intel.com> Message-ID: <7bb3f116-2f4d-b81a-3f49-dae7175e82c1@linux.intel.com> References: <20230418114506.46788-1-ilpo.jarvinen@linux.intel.com> <20230418114506.46788-18-ilpo.jarvinen@linux.intel.com> <455c986a-0d51-0302-d5c3-c6c0f1cc6bad@intel.com> MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-1286874631-1682422390=:1992" Content-ID: <8aad71a6-8ed-59f9-388-47bba28647c@linux.intel.com> X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 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-1286874631-1682422390=:1992 Content-Type: text/plain; CHARSET=ISO-8859-15 Content-Transfer-Encoding: 8BIT Content-ID: <6d1bdaef-dd2d-13ca-344a-21a83bd677c5@linux.intel.com> On Fri, 21 Apr 2023, Reinette Chatre wrote: > On 4/18/2023 4:44 AM, Ilpo J?rvinen wrote: > > CAT and CMT tests depends on masks being continuous. > > The term used in the spec is "contiguous", using it here > may help to convey the goal. > > > > > Replace count_bits with more appropriate variant that counts > > consecutive bits. > > Could you please elaborate why this is more appropriate and > why this is necessary? What is wrong with current solution? > > Please note that cbm_mask in resctrl will always be contiguous. Hi, It's good that you asked this question. This comes from a change (not by me originally) that also excluded the shareable bits from the mask the CAT test uses. I assumed (w/o better knowledge) that those shareable bits could create a hole into the mask. It could be wrong assumption and the shareable bits are always at one end of the CBM mask. Do you happen to know how the shareable bits are positioned within the mask? -- i. --8323329-1286874631-1682422390=:1992--