Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3256700pxb; Mon, 24 Jan 2022 06:02:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSGnUYqi4NgUZ/XltNi2o7DEZIYjm2LPn68x194mFKSJs2jmrVrfXt7EIGQbWCRhpCkMwl X-Received: by 2002:a63:d34b:: with SMTP id u11mr12065323pgi.510.1643032967958; Mon, 24 Jan 2022 06:02:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643032967; cv=none; d=google.com; s=arc-20160816; b=aVeqgvsPEU2iYSxZGxJ0D0aWBsWi1QuCD45cKoo0oJsWZI1uvkmGVCfzOMtzMypv4a kdUFDQE0kXLG1yqsFlKWBPxlOqpfO4QVm4/YLBboMl8CFMCW6q+uDCfxzdKXrEhxqeqb VDPCweF3iqLHNdHokBNp501RmvOk+1VlgsV721LanBKgFj25FKMXWdjaxHABI8kk7tsY sj2T0nZNRXHdvbho1q+Gf6TRk2xkVPGQVk5GSGWzKhQ4ojjUqXLB/lYd0u0rfRIAb5Rs dw+vyqpKv7MmRkYDVc478tX/bhOlDBDPSGNnTDHRoYxJudVNqM8R5VX9cHw9j93ZH3qT ybAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=pJh9I1eoTbpKvrdJo2eHmYHAPVSdA5hOmWOCZfSky6s=; b=HM2cBQwH3cFQ1E11xcyGmJTuK2aF7JbAkBgkBVpVV53m5cIPW6PI0U/MKqMVcCdH2c AzuLJ42OXK+fP4NKFeTEqp8upzfEs9wotJiA2tw7jqANCrX7k36y5ndb1Bc9w66i5cup TTdrI97prKbXjpfQNQmElZqZZTFUvopPRJl6AqOG8M9RI66zg1MWA55NK0FoKdrok0k5 fS51CBxYK1Trqe/2gjhaCNneOSq6qIAPdRqgHu/EHSpdSrgIoCMm7wyR8JNkANX+4z4n /jTUMjN1Pxy4lQNZgMQKY8AvEabhr6T/G26gvdc3p7UeOZ1BLtkdqCuddgeJj1pOBmZw 4G9A== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j4si3138643pld.288.2022.01.24.06.02.34; Mon, 24 Jan 2022 06:02:47 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240305AbiAWWAI (ORCPT + 99 others); Sun, 23 Jan 2022 17:00:08 -0500 Received: from mail-wm1-f52.google.com ([209.85.128.52]:46972 "EHLO mail-wm1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234697AbiAWWAH (ORCPT ); Sun, 23 Jan 2022 17:00:07 -0500 Received: by mail-wm1-f52.google.com with SMTP id a203-20020a1c98d4000000b0034d2956eb04so73903wme.5; Sun, 23 Jan 2022 14:00:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=pJh9I1eoTbpKvrdJo2eHmYHAPVSdA5hOmWOCZfSky6s=; b=aKkJbByhqFlDlCbXlxy3T4jgwHBdLW482Ch6JAUO0wStadqYQtHE1EOkIKZvALxcbW SUxWvknSQ3mnGzG5Iv4NmESj+BVpFT5xisy18EYsgWfXr0L6GXaNewARP+r9iM2yoFNc RyynaJNZ3qdpxv019H412dWA76jMH+SYX051yWBW/Ef/QbE2JW/P7zozYBH6jHeJ4dXi dwZ3Z5T8cposzPlLG2yPdVthMaYsQCiE64QJFawNQVcw+wr3TLj9Ft6lZL7SAjKEsfkE gNo3Vs95EYC8mzg6bXAsKLE+xp9Y2BT7qXcDs8rfw8B16cDlW0tV8oLcI6uWprrW/vgA U/tQ== X-Gm-Message-State: AOAM531//IflXssx0RymEdR9KbKLWJ4RbmIv0h7i7ljPLhQfXl8lI5k1 wVKKisDpHGr1YuucSIRwIL8= X-Received: by 2002:a05:600c:5127:: with SMTP id o39mr9231510wms.81.1642975206017; Sun, 23 Jan 2022 14:00:06 -0800 (PST) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id c14sm15908197wri.32.2022.01.23.14.00.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 14:00:05 -0800 (PST) Date: Sun, 23 Jan 2022 22:00:04 +0000 From: Wei Liu 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, "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , linux-hyperv@vger.kernel.org Subject: Re: [PATCH 43/54] drivers/hv: replace cpumask_weight with cpumask_weight_eq Message-ID: <20220123220004.qtwdl5oqufiy4elj@liuwe-devbox-debian-v2> References: <20220123183925.1052919-1-yury.norov@gmail.com> <20220123183925.1052919-44-yury.norov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220123183925.1052919-44-yury.norov@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 23, 2022 at 10:39:14AM -0800, Yury Norov wrote: > init_vp_index() calls cpumask_weight() to compare the weights of cpumasks > We can do it more efficiently with cpumask_weight_eq because conditional > cpumask_weight may stop traversing the cpumask earlier (at least one), as > soon as condition is met. > > Signed-off-by: Yury Norov Acked-by: Wei Liu