Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp577971ybm; Fri, 29 May 2020 07:17:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwumWRMJr2KfOdhORzRuG0mfJ+4mYs0/RSrPRzzlvCwiU3u6SZPXgg8Surcg4NY/wEQBldf X-Received: by 2002:a05:6402:6cc:: with SMTP id n12mr2671105edy.266.1590761861893; Fri, 29 May 2020 07:17:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590761861; cv=none; d=google.com; s=arc-20160816; b=fLNSRLgdo1S1563yHU6XytLNeVBq7QKYqM9Z88hw0uBYGupy4dOIYh0g/mG7at/X3J mRp8+q2ZfydD9RQjEE64EHXRcCi6pvXnC5ocDl3tdF0y8u7Hycib1xVoBRm2d0gL+FHu mAKo0WNGTyLLi5Nz8eGBeewK5J33Xh4gjakwwqh5Cn4K67NajEG3ft3Uv/nV2QK2ZeMx g4ssLmpHAa/1154nK0gENME+xpR/sXjlfvhUSJHgovwDrkJiutGTwfydPfIId7wM+2/W 92Er/Nt7TJJNL4Ugnq4euWhz6DfytXkfqCUfn2+IW5L45GQzTi6ldQm3jbSzy2gkJPxK Th4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=sstDEw2eR7/x5s00uzGBoVK1nqE9b65b7cAMAqhOjao=; b=aZV+jNv85+VMugsMd6ME7WSJL5rylVNSoXj1qr6eQfBIZ655cgpEY0ytv8FPvoIJGu Bvlg8IrsmEm/TdOR2codXh6XNcnEG/298DQHmwvMO9gy20saurqr3D2SU/qLjp0nxcLC YNfHE6fHan5LncMoLBfpFvxIAsXnJl6KTSDTbfwMlHYkGpj/ldr/kh6D/7Enan2e4Eiq QtdGOAW+rg7jwwSkzVkf5BA88NUa8afrIhmMl/2eH/fq7eAtgrFvhbBifYuceZxqo7Yj JQD8byoiaWWrRnsp+4OBk86Iz5Y2CgA/3Ihd964yGZM4GGNIqQRzfmRmzvlB1hi2bNbg klUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=eE5upXYz; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n1si5617213edo.310.2020.05.29.07.17.19; Fri, 29 May 2020 07:17:41 -0700 (PDT) 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; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=eE5upXYz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726966AbgE2ONk (ORCPT + 99 others); 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-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