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=-5.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,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 943BBC4363D for ; Wed, 30 Sep 2020 22:02:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3282E206CA for ; Wed, 30 Sep 2020 22:02:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730849AbgI3WCg (ORCPT ); Wed, 30 Sep 2020 18:02:36 -0400 Received: from mga07.intel.com ([134.134.136.100]:51030 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730090AbgI3WCg (ORCPT ); Wed, 30 Sep 2020 18:02:36 -0400 IronPort-SDR: bA40y3DqDaSNbSSXNYPNxzuWhAxggrNw0zIeshL4s7oIxsqtyh0CLfKSF9Eg7hFw7V23rCo/VS 7LYQyCwZzppg== X-IronPort-AV: E=McAfee;i="6000,8403,9760"; a="226694196" X-IronPort-AV: E=Sophos;i="5.77,322,1596524400"; d="scan'208";a="226694196" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Sep 2020 15:02:31 -0700 IronPort-SDR: xuyJf6LtHI2Ysc2PdEz/AO58WxBoFukTuk8q88uhEeSkrbVn9ZrMVELP+I43eiSNF9G3I8qyP0 aqEj77uSqUzA== X-IronPort-AV: E=Sophos;i="5.77,322,1596524400"; d="scan'208";a="457829098" Received: from jekeller-mobl1.amr.corp.intel.com (HELO [10.212.35.112]) ([10.212.35.112]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Sep 2020 15:02:31 -0700 Subject: Re: [iproute2-next v1] devlink: display elapsed time during flash update To: Shannon Nelson , Jakub Kicinski Cc: netdev@vger.kernel.org References: <20200929215651.3538844-1-jacob.e.keller@intel.com> <1f8a0423-97ef-29c4-4d77-4b91d23a9e7c@intel.com> <20200930143659.7fee35d4@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <7a9ff898-bdae-9dab-12a9-30d825b6b67d@intel.com> From: Jacob Keller Organization: Intel Corporation Message-ID: Date: Wed, 30 Sep 2020 15:02:27 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 9/30/2020 2:55 PM, Shannon Nelson wrote: > On 9/30/20 2:43 PM, Jacob Keller wrote: >> On 9/30/2020 2:36 PM, Jakub Kicinski wrote: >>> On Wed, 30 Sep 2020 14:20:43 -0700 Jacob Keller wrote: >>>>> Thanks, Jake.  In general this seems to work pretty well.  One thing, >>>>> tho'... >>>>> >>>>> Our fw download is slow (I won't go into the reasons here) so we're >>>>> clicking through the Download x% over maybe 100+ seconds.  Since we send >>>>> an update every 3% or so, we end up seeing the ( 0m 3s ) pop up and stay >>>>> there the whole time, looking a little odd: >>>>> >>>>>     ./iproute2-5.8.0/devlink/devlink dev flash pci/0000:b5:00.0 file >>>>> ionic/dsc_fw_1.15.0-150.tar >>>>>     Preparing to flash >>>>>     Downloading  37% ( 0m 3s ) >>>>>   ... >>>>>     Downloading  59% ( 0m 3s ) >>>>>   ... >>>>>     Downloading  83% ( 0m 3s ) >>> I'm not sure how to interpret this - are you saying that the timer >>> doesn't tick up or that the FW happens to complete the operation right >>> around the 3sec mark? >>> >> >> The elapsed time is calculated from the last status message we receive. >> In Shannon's case, the done/total % status messages come approximately >> slow enough that the elapsed time message keeps popping up. Since it's >> measuring from the last time we got a status message, it looks weird >> because it resets to 3 seconds over and over and over. >> >>>>> And at the end we see: >>>>> >>>>>     Preparing to flash >>>>>     Downloading 100% ( 0m 3s ) >>>>>     Installing ( 0m 43s : 25m 0s ) >>>>>     Selecting ( 0m 5s : 0m 30s ) >>>>>     Flash done >>>>> >>>>> I can have the driver do updates more often in order to stay under the 3 >>>>> second limit and hide this, but it looks a bit funky, especially at the >>>>> end where I know that 100% took a lot longer than 3 seconds. >>>>> >>>> I think we have two options here: >>>> >>>> 1) never display an elapsed time when we have done/total information >>>> >>>> or >>>> >>>> 2) treat elapsed time as a measure since the last status message >>>> changed, refactoring this so that it shows the total time spent on that >>>> status message. >>>> >>>> Thoughts on this? I think I'm leaning towards (2) at the moment myself. >>>> This might lead to displaying the timing info on many % calculations >>>> though... Hmm >>> Is the time information useful after stage is complete? I'd just wipe >>> it before moving on to the next message. >>> >> My point was about changing when we calculated elapsed time from to be >> "since the status message changed" rather than "since the last time the >> driver sent any status even if the message remains the same". > > This would be better, and is a bit like what I was imagining early on, > but at this point I'm wondering if the display of the elapsed time is > actually useful, or simply making it messier. > >> >> I think clearing the timing message is a good improvement either way, so >> I'll do that too. > Yes. > I think if we always clear the elapsed time on a new message it will feel a lot cleaner overall. Thanks, Jake > sln > >