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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67056C64E7C for ; Wed, 2 Dec 2020 17:37:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 08307221FA for ; Wed, 2 Dec 2020 17:37:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730744AbgLBRhp (ORCPT ); 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