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=-2.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 B66BCC433DF for ; Fri, 29 May 2020 14:13:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9137120707 for ; Fri, 29 May 2020 14:13:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20150623.gappssmtp.com header.i=@kernel-dk.20150623.gappssmtp.com header.b="eE5upXYz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726993AbgE2ONk (ORCPT ); Fri, 29 May 2020 10:13:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726629AbgE2ONi (ORCPT ); Fri, 29 May 2020 10:13:38 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88F24C03E969 for ; Fri, 29 May 2020 07:13:38 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id h95so491859pje.4 for ; Fri, 29 May 2020 07:13:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=sstDEw2eR7/x5s00uzGBoVK1nqE9b65b7cAMAqhOjao=; b=eE5upXYzk0pow1GTjkztlADM6NfVbrh/uHt+G1jl9EulITHptpOGivfgZ9UM2DZPeT QzDSBImSr62zvHA4fpZjPKoOgIad9kZyPX2Pg/8nuAQTJ3/2yu1dOc5WcOu99Kko/uk+ JHHjcQeYVXofPi/9w67mwpp7taL/v8rnEtFjiUQt2+5HJT1HNIqLVfzk8C15zK0dRQDM HprQkgIl0QIfcdgkulZv6c2+BpjhhJc39zy3lRejrUhTw58N+xFCRBzYs65EUgEZZaQb C23jReqIIypb479CHVfyFfIhwVVplo1+96n+FWZRlsJS/ZWLbHO247w+VeMKyAtOGXp+ Nwmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=sstDEw2eR7/x5s00uzGBoVK1nqE9b65b7cAMAqhOjao=; b=LCWrpGh+1tsOMBik8QWr+ZAHytikVY1dSQTHqtTRpbb/LlosS1azvBq2H2MrxeQBMv S9qh/41wGqdj5wyVqI9Vd/TM7iXWFARssUQfCpwQi0At9URC6thSW09N8BdVf4Bc8oQA KtOyTHR2os23dtwVKvO6mXPHK8t7DphYyGMJm5wfB+ag2mdRokpUtgmR9AmPsxCSHD7U imtJeUmVhKjM2D8tUJKVQ4OZd95wYZ7MnwoOP/QUgDQYorTiuOtCDomoNEuyNJgzA/bI BgzU3oIY8pWdZGoqzEJMgwwemYamAULwfx1IHu30EMqPM16sP83H5/FGyLgWXVZDCIi6 DWHg== X-Gm-Message-State: AOAM533jBP13PiKrTTRpFI8Nu2jvMPIaxMxGuww8jt7qiRGSjRYNEbp1 l44VHd7wZ5u1bQg2wXcvhHkg4A== X-Google-Smtp-Source: ABdhPJx/vZKTQwjkEYDfjCmjXR8SsS9x7O54I1G0OhUxjA27obWAm6HjQIWQQc+C6Ua+WQEtGiJQ1Q== X-Received: by 2002:a17:90a:bf18:: with SMTP id c24mr9827989pjs.171.1590761617982; Fri, 29 May 2020 07:13:37 -0700 (PDT) Received: from [192.168.1.159] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id d2sm6688603pgp.56.2020.05.29.07.13.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 May 2020 07:13:37 -0700 (PDT) Subject: Re: [PATCH v2] blkdev: Replace blksize_bits() with ilog2() To: Kaitao Cheng , hch@lst.de, sth@linux.ibm.com, viro@zeniv.linux.org.uk, clm@fb.com, jaegeuk@kernel.org, hch@infradead.org, mark@fasheh.com, dhowells@redhat.com, balbi@kernel.org Cc: damien.lemoal@wdc.com, bvanassche@acm.org, ming.lei@redhat.com, martin.petersen@oracle.com, satyat@google.com, chaitanya.kulkarni@wdc.com, houtao1@huawei.com, asml.silence@gmail.com, ajay.joshi@wdc.com, linux-kernel@vger.kernel.org, songmuchun@bytedance.com, hoeppner@linux.ibm.com, heiko.carstens@de.ibm.com, gor@linux.ibm.com, borntraeger@de.ibm.com, linux-s390@vger.kernel.org, sagi@grimberg.me, linux-nvme@lists.infradead.org, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, josef@toxicpanda.com, dsterba@suse.com, linux-btrfs@vger.kernel.org, chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net, darrick.wong@oracle.com, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, jlbec@evilplan.org, joseph.qi@linux.alibaba.com, ocfs2-devel@oss.oracle.com, deepa.kernel@gmail.com References: <20200529141100.37519-1-pilgrimtao@gmail.com> From: Jens Axboe Message-ID: Date: Fri, 29 May 2020 08:13:34 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200529141100.37519-1-pilgrimtao@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/29/20 8:11 AM, Kaitao Cheng wrote: > There is a function named ilog2() exist which can replace blksize. > The generated code will be shorter and more efficient on some > architecture, such as arm64. And ilog2() can be optimized according > to different architecture. When you posted this last time, I said: "I like the simplification, but do you have any results to back up that claim? Is the generated code shorter? Runs faster?" which you handily ignored, yet sending out a new version. I'm not going to apply this without justification, your commit message is handwavy at best. -- Jens Axboe