From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB003C433F5 for ; Thu, 24 Feb 2022 01:57:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229936AbiBXB5n (ORCPT ); Wed, 23 Feb 2022 20:57:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229889AbiBXB5l (ORCPT ); Wed, 23 Feb 2022 20:57:41 -0500 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91DE0FEB24; Wed, 23 Feb 2022 17:57:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645667829; x=1677203829; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=d3w1+5OFGFVTtbNZejTZ3o12Tnm69aZayQDmW4rtE6M=; b=Sdt9mEy6nq8f4K5L3U4juL7LTVPfMAGlQlOXQbWc4jqw/oZ88G+aV/EV xFM8HZZhjuluRR5d2in/4xhXh4iLwvg/NuZW2JXMyiKnoZEmlELtnG6II jRC5Qdn/u0b5J7EHDP69ZFgcbqTnO+uf7SW0/ACkFj4ypYqpTzG8iB266 KVEkLR9v58hvT4sHeezBDcPEthz9qgjlRxmG5k+UdpomMi7lPPseGS/lm ZfN+BYHkWgvrxDXut4ZG7q1UpIE3aIy4ESwPzxJxs3duPaL9OgfPu+l1a bzAvMjXEM/NERaf4xk+ixd7NPg0dMinNTIL+CIoKLRpmjRffvNNiVWIq0 w==; X-IronPort-AV: E=McAfee;i="6200,9189,10267"; a="249700067" X-IronPort-AV: E=Sophos;i="5.88,392,1635231600"; d="scan'208";a="249700067" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 17:01:56 -0800 X-IronPort-AV: E=Sophos;i="5.88,392,1635231600"; d="scan'208";a="707259145" Received: from smile.fi.intel.com ([10.237.72.59]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 17:01:54 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1nN2VE-007dta-JA; Thu, 24 Feb 2022 03:01:04 +0200 Date: Thu, 24 Feb 2022 03:00:59 +0200 From: 'Andy Shevchenko' To: David Laight Cc: Jason Gunthorpe , "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Mike Marciniszyn , Dennis Dalessandro Subject: Re: [PATCH v1 1/1] IB/hfi1: Don't cast parameter in bit operations Message-ID: References: <20220223185353.51370-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Wed, Feb 23, 2022 at 10:50:19PM +0000, David Laight wrote: > From: 'Andy Shevchenko' > > Sent: 23 February 2022 22:30 > > On Wed, Feb 23, 2022 at 09:44:32PM +0000, David Laight wrote: > > > From: Andy Shevchenko > > > > Sent: 23 February 2022 18:54 ... > > Either way it wastes cycles, the outcome depends on the actual distribution of > > the interrupts across the bitmap. If it gathered closer to the beginning of the > > bitmap, my code wins, otherwise the original ones. > > The loop in bitmap_empty() will kill you - even if the first word in non-zero. What loop? Did you really look into implementation of bitmap_empty()? -- With Best Regards, Andy Shevchenko