Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1024496rwi; Wed, 26 Oct 2022 09:52:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7KPJqTqIFcO3oY1BxNJopIJC2JziGfZb3pbvl2Jq1yRijk7cvzqxD3LN37P5m5Eb8u/Lxc X-Received: by 2002:a17:906:4fce:b0:78d:9fcb:50c7 with SMTP id i14-20020a1709064fce00b0078d9fcb50c7mr39289188ejw.63.1666803132682; Wed, 26 Oct 2022 09:52:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666803132; cv=none; d=google.com; s=arc-20160816; b=vAWPUcKtsJuGvkeAomEmdUb/6QqzYhNlCzvuV1yV045cCtzu+JZenEuuKNVwOnvkIv luhjch5AaxWlVdwfZbNWicA7+WE4A2ZcX4413EszFbV5PvNJAK8kCi7/W1+SG0V12F9H NhlnJYb5Ud2705VBy8a4iKA4aRrXJmvAwj0guBacVHgjK/qNBYN6NCj8nBbJpVlQHq88 HU1jhVXZ0srYwTkhhgvIDS00wIg+oiBdprEhgq0TRKSOpXP7SGEUjSWXWBWqYBjgvX1P HtSFq4PxEyv9HQziBCPLevs9nC4TuTYPveXNA57VBT4iTbzph6lz/sQr82+OipbVxIqW 254A== 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:dkim-signature; bh=QNT/nJWBZ0B25xH5gebjc0gKcBh9l0PW5hY0rvQ21rc=; b=PX8/R92da1AKpUqjzoeaR9lxol3LLv4cPkpkU6ATcUKCtEUIFRYC8R0SvzOiDoymgx WmDc1LPSHdI3wbfE2LyQ2JTKUTU6wCkH+1tDsgcAUYi0nfXz02E9U8cRGmwoY3stPliM DPqfyu/XHtOKnbg5pNogNWTzDvZcbtL4RW6LbLPextUq9urGvyejedDK7wt/U6nJCQJ6 bZi1BIjYeibqkQoLn0hFZuL3MyoMIkNaNm7wo8YBS4Jlwgn1gxJDI+fPwKQAmhZU0cP8 ZYwy3LyAEvvNtQcG3tXlr8OSspjWuSJ89urQjhj7R41e6N4vSe3+CwY68xVg3r765RHw RiIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Rq4Mxi0k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b15-20020a056402350f00b004615855c483si6918335edd.98.2022.10.26.09.51.45; Wed, 26 Oct 2022 09:52:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Rq4Mxi0k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S233626AbiJZQep (ORCPT + 99 others); Wed, 26 Oct 2022 12:34:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232946AbiJZQen (ORCPT ); Wed, 26 Oct 2022 12:34:43 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DAB32D1CF; Wed, 26 Oct 2022 09:34:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2CEF8B82381; Wed, 26 Oct 2022 16:34:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A4D8C433B5; Wed, 26 Oct 2022 16:34:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666802078; bh=0OyATpcFpMtfgLWCG8arPflGf4wLgAo29PwRBcaXU7s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Rq4Mxi0kWqi0Mf0HO1Sk3X9j00MMjiOG5P1k57nofpBmBYYBaCEN33upwhoXThPIu UGAM7fKsz41ESBlW61TjPC/44dX1Ur+8aBRoS7HcBTwyoZXFIp86AboZ/npjFjgJ9x SO+abeadcBXvIxQe+RTsvyAi4WWpOGMwhYESo833sWWHgbV8JwN4OCysriP+C4hRl1 RDwX1C9+ro8LPN5InnwxBVFcMFMqk5X7YCjFAfofZTAG7JKCMf+mY2ekd4PlAIw1Sp P1k9I4+QnEjhBt5N7CdBd+W0GEm3PuDn5GRjUR8Msy2KAxrR4hDn4vNrEF8W56TteL PsvDdBFS4FCfg== Date: Wed, 26 Oct 2022 10:34:35 -0600 From: Keith Busch To: Bart Van Assche Cc: Dawei Li , axboe@kernel.dk, hch@lst.de, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] block: simplify blksize_bits() implementation Message-ID: References: <30ea2fa3-0e4d-788b-b990-3bdb9e687377@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <30ea2fa3-0e4d-788b-b990-3bdb9e687377@acm.org> X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 26, 2022 at 09:29:21AM -0700, Bart Van Assche wrote: > On 10/26/22 08:14, Dawei Li wrote: > > Convert current looping-based implementation into bit operation, > > which can bring improvement for: > > > > 1) bitops is more efficient for its arch-level optimization. > > As far as I know blksize_bits() is not used in the hot path so performance > of this function is not critical. blksize_bits() is used on every IO going through iomap_dio_bio_iter(), though the usage there is completely unnecessary and can be removed.