Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5473172pxb; Wed, 26 Jan 2022 12:51:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJwX7PQq95MIsnYpeicXylWdO8Y/UDcU7s1DFlS7IfJPwe36VJzpcPewQkzkBm8KaNFxz5NP X-Received: by 2002:a17:903:32c1:: with SMTP id i1mr843086plr.78.1643230275270; Wed, 26 Jan 2022 12:51:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643230275; cv=none; d=google.com; s=arc-20160816; b=xwU+vMEGh9rv9vuEGR85xxZleXyX2CIKmAv2tN+vN8oOz1FyEx8ezKqp0rdR0Yoz1Q Ufd18/A9en8qeBPEk2rnqE8rrX3e6u64awZSDIkVYlHPUqGwhXRWa6ipR9ld7uhyHdQZ qH+UJplcMlbfUTbE9w1l+7zuMpJCuMtxeBUG3RszZ/3bOISky0NOpAqBzFrTNco1GOGs Z+I1kpUsicqLAMyFMHLC4ML+GGJFBs1F1dVnxdogv0iAcQRfqSnQbvevFkcPSt2onDs4 J032L5SVPbFhjUwkqNRgYyuM7TszJll3l8qs1nLbAf66Jn0rP9eAkylMG0o4p2DxLvAj O59g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=mp4dZGa9PeDk5DdyLrUXRpuQgBAipNTDO4LFMWvNaik=; b=vXIP+a2pRq06L+dziRAvYmo4MHQ22UQqi+u5axPymsKC0K7MHs/gA3H8y5ulqNSllE Nmm2BSGaTWs0szuw2RPa9ucHZIVw2pseEVGGVnSAsZm7RwmqCaWFFb9YZr4bCjKfgDkL ufVBXqUmXpTx/aeTsYN+ufu/pqfYdNyrVx7XSkWlG8u7cdW4ONf546m1rBVO2KWOCnTe R/jYUHuScWjwomu8tl8YDz+0uAT1Ms0ACZmVopXQZvnb0VDlrc9WkNySXRVkc2iFly4d 8dx7ab98VoOfCkeSjmEPzhBxTQK8r5f0+HvL1m3x1aWezl+R79ur4Zicnq6SFOA7zL3x KBvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AsDiqbkR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v8si287836pgi.789.2022.01.26.12.51.03; Wed, 26 Jan 2022 12:51:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AsDiqbkR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231982AbiAZJoA (ORCPT + 99 others); Wed, 26 Jan 2022 04:44:00 -0500 Received: from mga04.intel.com ([192.55.52.120]:60268 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231934AbiAZJn4 (ORCPT ); Wed, 26 Jan 2022 04:43:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643190236; x=1674726236; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=FqtfkDWNNeSe+gVQGRrv7zXdFjdNf4dd0UsnuMjMtq0=; b=AsDiqbkRW+/Neu2u0WsOiWEmytuZutr+6t8Za1la+g17HZmxkprC2zB2 3/6awLt7BxYNdOvTf9tFCzqJzy9w89VySXXXQBYD5XDiVR/79RHRP/bKi H029dFRDhLnFBjHvN0BEwgRF/ER58GEJNnozJm1DWoW4MEu8sXXYOKPH8 8QAW8zJdeERtiiTzrJu0HvA2gSPxOjCw/HCmy7q/KI5E5M5Bb+aTeliVj 21Z8vdGgSIkdYIScdNPfQRHXKRAdT41k5e3l1fPKN8dBj3TX8OXl8SJwg IfmATwRpqn81pyxrPtctp8dli6HtHtmDwnjZfWqQXDH2+V+V0dP95J+TO g==; X-IronPort-AV: E=McAfee;i="6200,9189,10238"; a="245348614" X-IronPort-AV: E=Sophos;i="5.88,317,1635231600"; d="scan'208";a="245348614" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2022 01:43:55 -0800 X-IronPort-AV: E=Sophos;i="5.88,317,1635231600"; d="scan'208";a="581055423" Received: from mburchar-mobl.amr.corp.intel.com (HELO [10.212.54.252]) ([10.212.54.252]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2022 01:43:52 -0800 Message-ID: Date: Wed, 26 Jan 2022 09:43:50 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: [PATCH 17/54] gpu: drm: replace cpumask_weight with cpumask_empty where appropriate Content-Language: en-US To: Yury Norov Cc: Andy Shevchenko , Rasmus Villemoes , Andrew Morton , =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , Greg Kroah-Hartman , Peter Zijlstra , David Laight , Joe Perches , Dennis Zhou , Emil Renner Berthing , Nicholas Piggin , Matti Vaittinen , Alexey Klimov , linux-kernel@vger.kernel.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org References: <20220123183925.1052919-1-yury.norov@gmail.com> <20220123183925.1052919-18-yury.norov@gmail.com> From: Tvrtko Ursulin Organization: Intel Corporation UK Plc In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25/01/2022 18:16, Yury Norov wrote: > On Tue, Jan 25, 2022 at 1:28 AM Tvrtko Ursulin > wrote: >> >> >> On 23/01/2022 18:38, Yury Norov wrote: >>> i915_pmu_cpu_online() calls cpumask_weight() to check if any bit of a >>> given cpumask is set. We can do it more efficiently with cpumask_empty() >>> because cpumask_empty() stops traversing the cpumask as soon as it finds >>> first set bit, while cpumask_weight() counts all bits unconditionally. >>> >>> Signed-off-by: Yury Norov >>> --- >>> drivers/gpu/drm/i915/i915_pmu.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c >>> index ea655161793e..1894c876b31d 100644 >>> --- a/drivers/gpu/drm/i915/i915_pmu.c >>> +++ b/drivers/gpu/drm/i915/i915_pmu.c >>> @@ -1048,7 +1048,7 @@ static int i915_pmu_cpu_online(unsigned int cpu, struct hlist_node *node) >>> GEM_BUG_ON(!pmu->base.event_init); >>> >>> /* Select the first online CPU as a designated reader. */ >>> - if (!cpumask_weight(&i915_pmu_cpumask)) >>> + if (cpumask_empty(&i915_pmu_cpumask)) >>> cpumask_set_cpu(cpu, &i915_pmu_cpumask); >>> >>> return 0; >>> >> >> Reviewed-by: Tvrtko Ursulin >> >> I see it's a large series which only partially appeared on our mailing >> lists. > > The series is here: https://lkml.org/lkml/2022/1/23/223 > The branch: https://github.com/norov/linux/tree/bitmap-20220123 > >> So for instance it hasn't got tested by our automated CI. (Not >> that I expect any problems in this patch.) > > Would be great if you give a test for the whole series, thanks! Can't really test the whole series for you, but if you want to send just the i915 patch standalone to the intel-gfx mailing list, that would trigger the CI run and if that passes we can merge that single one. >> What are the plans in terms of which tree will it get merged through? > > For the patches that will not be merged by maintainers of corresponding > subsystems, I'll use my bitmap branch and send it to linux-next. Or I guess we can wait for them to trickle back to us this way. Regards, Tvrtko