From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751505AbeANJ22 (ORCPT + 1 other); Sun, 14 Jan 2018 04:28:28 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:38346 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751085AbeANJ20 (ORCPT ); Sun, 14 Jan 2018 04:28:26 -0500 X-Google-Smtp-Source: ACJfBovKqi3j4Td24lN1NA2Fz+9DY14xiK/jqCMPvVgsr1KPTHnWtir8TfQ1itNJgY2OPqSScYeQBQ== Subject: Re: [PATCH] nvme-pci: calculate iod and avg_seg_size just before use them To: Keith Busch , Jianchao Wang Cc: axboe@fb.com, hch@lst.de, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org References: <1515647379-1877-1-git-send-email-jianchao.w.wang@oracle.com> <20180111154857.GA2602@localhost.localdomain> From: Sagi Grimberg Message-ID: Date: Sun, 14 Jan 2018 11:28:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180111154857.GA2602@localhost.localdomain> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: >> The calculation of iod and avg_seg_size maybe meaningless if >> nvme_pci_use_sgls returns before uses them. So calculate >> just before use them. > > The compiler will do the right thing here, but I see what you mean. I > think Christoph has some SGL improvements coming, though, that will > obviate this. I think that if its not coming for 4.16, it should be easy enough to take it in. FWIW, Reviewed-by: Sagi Grimberg