Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1046431pxu; Wed, 2 Dec 2020 09:40:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJyXsftC5spqxCj3SGi86N39Z7wY/NZ7OM9xoIrtiXhPQC0smhpSz0Q55hJwbt+l5UoEEOoJ X-Received: by 2002:a17:906:40c1:: with SMTP id a1mr855269ejk.520.1606930823338; Wed, 02 Dec 2020 09:40:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606930823; cv=none; d=google.com; s=arc-20160816; b=ECtaWCsEBlCAXAJxKsagnek0T0EUt8X+cL/J8987P5q5odxd5zYgASvAWFbeTMx5H8 rEGpgcgL3GSiLGvU7YijTHM9RE0sK29KCfFrCeo5RAhcOW6qxBeS1U6ZYkqqBEYYmlDZ uqnnOQeHTX1mJ2vvCLKW886kzHQPXGwI4u2J4Akrcdt1zHr0Pr0eNFe29Kn93RVCgHND Jtb1HP/sVy8K1wXGfad4nmWIVNQdPcEKhp9g1X0yoTbjEfFexbxWIq7rWx5o6eCoYv5b 9PNhYv8wdxL60cIXTDkPxuu2417KOVVuz0o3NAdhggCUqj62/JHZeeL8Z4k/2NG5h63s BcbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=FcJZBmKT9HjIm+qNynSmLr/hJkUCLrSOkca4MHDLEH8=; b=evHeET8aH/DVhnVadA30AGb8IjmbaEArq4e4qQWr6Dd+nLbuYaN9gOEFktUGfWnrKW K+yVTB4L6O5RNA1AI//ZsRBJ1JJpUsiFdpC1BWyxGqh9bKnEV8a5GHt+favYbe59RsMr y1goluS07MFnmorfYBefmLBJy4K/eW8yszFYfxB7MMMQ3mnbQRSwrOKJMOTnR5jAo2l6 2olRyWzKsE1SVO+3GNVPNMDMGd175i6+6uKDV+035DwJrYHYK0m3x/NjDTa0RMwTtpXK 4ltsNuB6CpmjH4NTxLbKXHBYoyOWm+ELy60LKQ9B+ubekOHEkQNLSQ5hDEwrS3vPgZrR lrPQ== 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=fail (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 c7si365032edr.193.2020.12.02.09.39.59; Wed, 02 Dec 2020 09:40:23 -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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728903AbgLBRhp (ORCPT + 99 others); Wed, 2 Dec 2020 12:37:45 -0500 Received: from mga03.intel.com ([134.134.136.65]:52848 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726366AbgLBRho (ORCPT ); Wed, 2 Dec 2020 12:37:44 -0500 IronPort-SDR: onY5/D1yDAxHeAzwiZtBblQtWwXYZ8FfSUIhJWI/dEZukVi8Anrz6TSQbx7oDbqv1O2VX2BGlO QVWrX0OQppMA== X-IronPort-AV: E=McAfee;i="6000,8403,9823"; a="173154737" X-IronPort-AV: E=Sophos;i="5.78,387,1599548400"; d="scan'208";a="173154737" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2020 09:36:03 -0800 IronPort-SDR: Wy/5zw3hcDuhEIv3twhlv54mbz6H22Fm4pfiMIORG3YakEV8vu8Gc5wCQ8XWV6L0PHGMfGCcPk JpPb+V81XGrQ== X-IronPort-AV: E=Sophos;i="5.78,387,1599548400"; d="scan'208";a="373578549" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2020 09:36:00 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1kkW3p-00BZAb-IA; Wed, 02 Dec 2020 19:37:01 +0200 Date: Wed, 2 Dec 2020 19:37:01 +0200 From: Andy Shevchenko To: Yury Norov Cc: Yun Levi , Rasmus Villemoes , dushistov@mail.ru, Arnd Bergmann , Andrew Morton , "Gustavo A. R. Silva" , William Breathitt Gray , richard.weiyang@linux.alibaba.com, joseph.qi@linux.alibaba.com, skalluru@marvell.com, Josh Poimboeuf , Linux Kernel Mailing List , linux-arch@vger.kernel.org Subject: Re: [PATCH] lib/find_bit: Add find_prev_*_bit functions. Message-ID: <20201202173701.GM4077@smile.fi.intel.com> References: <20201202094717.GX4077@smile.fi.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-kernel@vger.kernel.org On Wed, Dec 02, 2020 at 09:26:05AM -0800, Yury Norov wrote: > On Wed, Dec 2, 2020 at 3:50 AM Yun Levi wrote: ... > I think this patch has some good catches. We definitely need to implement > find_last_zero_bit(), as it is used by fs/ufs, and their local > implementation is not optimal. Side note: speaking of performance, any plans to fix for_each_*_bit*() for cases when the nbits is known to be <= BITS_PER_LONG? Now it makes an awful code generation (something like few hundred bytes of code). -- With Best Regards, Andy Shevchenko