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 B2844C49EA2 for ; Sat, 19 Jun 2021 10:50:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 821EA61245 for ; Sat, 19 Jun 2021 10:50:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 821EA61245 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0895F6EABE; Sat, 19 Jun 2021 10:50:30 +0000 (UTC) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3FA366EABE; Sat, 19 Jun 2021 10:50:28 +0000 (UTC) IronPort-SDR: ix7Gkvl7+EZ4uQvQA3TfKxRH/o5OjgcDi1W8wp+INRMsGMzlOqwnWZ8XnGwt8slC9ObTiR5I92 CSl7s0az2QCw== X-IronPort-AV: E=McAfee;i="6200,9189,10019"; a="292293357" X-IronPort-AV: E=Sophos;i="5.83,285,1616482800"; d="scan'208";a="292293357" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2021 03:50:27 -0700 IronPort-SDR: fnU5lVuLvE2SosjadnbVc8+U+7EHHkhelglov8CVVi9knSHUKJ7SSBwFCv1q78S+K+GHwRHqgz fDHRW+TfgD+w== X-IronPort-AV: E=Sophos;i="5.83,285,1616482800"; d="scan'208";a="485964066" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2021 03:50:22 -0700 Received: from andy by smile with local (Exim 4.94.2) (envelope-from ) id 1luYYL-003nwP-Hg; Sat, 19 Jun 2021 13:50:17 +0300 Date: Sat, 19 Jun 2021 13:50:17 +0300 From: Andy Shevchenko To: Yury Norov Subject: Re: [PATCH 2/3] find: micro-optimize for_each_{set,clear}_bit() Message-ID: References: <20210618195735.55933-1-yury.norov@gmail.com> <20210618195735.55933-3-yury.norov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210618195735.55933-3-yury.norov@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wei Yang , Geert Uytterhoeven , David Airlie , Rasmus Villemoes , dri-devel@lists.freedesktop.org, "H. Peter Anvin" , Marc Zyngier , x86@kernel.org, Ingo Molnar , Russell King , Guenter Roeck , Jean Delvare , Alexey Klimov , etnaviv@lists.freedesktop.org, Borislav Petkov , Thomas Gleixner , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Morton , David Woodhouse Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, Jun 18, 2021 at 12:57:34PM -0700, Yury Norov wrote: > The macros iterate thru all set/clear bits in a bitmap. They search a > first bit using find_first_bit(), and the rest bits using find_next_bit(). > > Since find_next_bit() is called shortly after find_first_bit(), we can > save few lines of I-cache by not using find_first_bit(). Any number available? -- With Best Regards, Andy Shevchenko