Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2163574ioo; Mon, 23 May 2022 11:35:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2LuqLUONZVybDHndXY2DObbx/vzKP8YYvwOQBKFmIQiSdtRgEaU+8kQas7e6tuEt5ti8N X-Received: by 2002:a05:6a00:1516:b0:518:bcdd:6a33 with SMTP id q22-20020a056a00151600b00518bcdd6a33mr1823672pfu.27.1653330956091; Mon, 23 May 2022 11:35:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653330956; cv=none; d=google.com; s=arc-20160816; b=DrOW/r5glS8bc0hW1o0xoyMsZcS8YgmTmjFfOVdbxbdrdspbAZqtB8xkSontRy4q/+ 2KAUc7eXRx02rzaWDWlw3hhVPdEhYOQhavECcQKyg8m9ksentduaE50ast5SNMyEB58F +iH0xhocrHoFWhfDzi6VWiHgIzKTrDLGoTjsJRVaWy47HNlIWcIfr81N5ERuZz2SgUsg S9SCzYjCEZv841QUio+fMjsHRKHJ0OqHJATbshnfVWPOsSkU/btcadgeduGGApYqMYUu I4/al3X2vGUg7pPIj4HPmoFdZHiVIzjvVuX+DVE4J1kzVGapG3tMXlUeQ/hn7yF/Py7V lnIg== 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; bh=YcM2V9lJrQoILVWR8hE1O3AxcExnhJbF35MwvFVRNF0=; b=YMPnWIJRIfNYtS8lQwNmFLXl4nasaPMKNl+lHUVk+nSGVEA+UnB0CyN5P2EzZ3SSTy bcCSTHI7/JeEBHXc4Wovcs+ZSiznRhw74vKBoPPhBo8syt2zZns7ewHBuU4cLbZhAnsH T0nJZLM5BlAMmlaqR40kAEsAYuzJLFNXGS0YKR6iAOmShfLm5i8yJQ2rZ+VJW9podAk3 LbmYJMaoG9YR9MyKQacnwhzYzpkGqtOHUk43/Ty0BGzFxUhobmSTjASGX1lxvm9CpXfd Kd2reY6ggdtQK4AKDEXWbi0YpCNmicUR3YeS7yaw70HpJ7kYsigw7Fn/PMsHWagVIpKT x+/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 200-20020a6300d1000000b003fa8e745a88si1820577pga.147.2022.05.23.11.35.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 11:35:56 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B9EF214FC81; Mon, 23 May 2022 11:35:52 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240049AbiEWSey (ORCPT + 99 others); Mon, 23 May 2022 14:34:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240753AbiEWSeh (ORCPT ); Mon, 23 May 2022 14:34:37 -0400 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 722AF6CF69; Mon, 23 May 2022 11:12:30 -0700 (PDT) Received: by mail-pl1-f180.google.com with SMTP id q18so13802279pln.12; Mon, 23 May 2022 11:12:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=YcM2V9lJrQoILVWR8hE1O3AxcExnhJbF35MwvFVRNF0=; b=HVcTY5h0SXw5cM3/Ek/o0D5DVjf/WsJlpNVHctMRLPp8t+zDxV01ifHwl3D7cQHWeR zPpMiQGWGXkPCIQsy9ukBrpPfwcl2quH0andP5ZFcqzOaOZD64NMyl1X3nlx3ykj60iH +2mfx5eUW3gRjuaW18Gv5x9Kghrbgf9EetwN4m9CYGg5ebw0ZQLDgE08a7sWv5L4Kyux aSsiJukb8UnAzzUaaV0cL96KzvORKdve6cPhbTPda6ChALkUDN4IFb+ViESD9+feri6u wEHOqAovvpmsnnucdxtXmYYre95Pmu3YGITH8Ke8rRMjTeFiig/FI8OQvWVgsQFB+Ath NzDA== X-Gm-Message-State: AOAM532aeeTe0pdigX1wfrhBeL6O7hRa4JXauLVguew4Gvlg+Y9Z1QWC G4FCX5XjoQTZKNxnvXsy8HI= X-Received: by 2002:a17:90a:8807:b0:1df:78c7:c215 with SMTP id s7-20020a17090a880700b001df78c7c215mr247975pjn.234.1653329485047; Mon, 23 May 2022 11:11:25 -0700 (PDT) Received: from garbanzo (136-24-173-63.cab.webpass.net. [136.24.173.63]) by smtp.gmail.com with ESMTPSA id x3-20020a654143000000b003c14af50610sm5025690pgp.40.2022.05.23.11.11.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 11:11:24 -0700 (PDT) Date: Mon, 23 May 2022 11:11:22 -0700 From: Luis Chamberlain To: Pankaj Raghav Cc: axboe@kernel.dk, hch@lst.de, snitzer@redhat.com, damien.lemoal@opensource.wdc.com, hare@suse.de, Johannes.Thumshirn@wdc.com, linux-nvme@lists.infradead.org, dm-devel@redhat.com, dsterba@suse.com, jiangbo.365@bytedance.com, linux-kernel@vger.kernel.org, gost.dev@samsung.com, linux-block@vger.kernel.org, jaegeuk@kernel.org, Damien Le Moal Subject: Re: [PATCH v5 6/7] null_blk: use zone_size_sects_shift for power of 2 zoned devices Message-ID: <20220523181122.3vjizmsx7a2mpf6z@garbanzo> References: <20220523161601.58078-1-p.raghav@samsung.com> <20220523161601.58078-7-p.raghav@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220523161601.58078-7-p.raghav@samsung.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Mon, May 23, 2022 at 06:16:00PM +0200, Pankaj Raghav wrote: > Instead of doing is_power_of_2 and ilog2 operation for every IO, cache > the zone_size_sects_shift variable and use it for power of 2 zoned > devices. > > This variable will be set to zero for non power of 2 zoned devices. > > Suggested-by: Damien Le Moal > Signed-off-by: Pankaj Raghav Reviewed-by: Luis Chamberlain Luis