Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3070635rdh; Mon, 27 Nov 2023 06:03:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IEWs49KIr5kuVzf19JcHJ2rNddZlMXn3yEyNmbe/Opy6zxkPwWaOTZ99eAgNwbCNVfTLXs1 X-Received: by 2002:a17:90a:b00a:b0:280:18bd:ffe7 with SMTP id x10-20020a17090ab00a00b0028018bdffe7mr11664679pjq.48.1701093823852; Mon, 27 Nov 2023 06:03:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701093823; cv=none; d=google.com; s=arc-20160816; b=dtI8onQvcj4Ixn2HkF07O0GjZtb3agwrenIprmRkAS7EXzeRVwTBHtxLUV246iCiUI qBMn2rX/DLH1bFFEDXX2uzirNbc7tzz6HYC7dmkD46jIp202SFw1U7CkQurkDLUTTrOK VbjF9YJ0yAePO9yIfEC+lPJg1IOOR851gt41fTpSkhoKJt0ngAv6UeJStFidGrQK963i l32oj44B3CTVA9ZbtpWKA2twnXxAEtMTjcqzY+JwTZCaWHPFakIy/BCNic/JgJHp76X3 QvZy5IAqeRfdthicfb4p3dWcL3TNPe1gbx8O8rJqxwv7TOfgiE994qLaDqU1ZZneZUut dRbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=lf40PTCxBv5iAG3/8E0RyfPSb8+F6NNBbJiqZ7gQ3ak=; fh=fKiukx8uZVmutDK9qbK7fiFeMLx3D5lVCyHjN+Y2K1E=; b=nxlyryejnmsNcciUAPxS9XtHQCS8/Ae1XwyFVLm/qESEfzogp9+4foha3J00YIaRxf fsg32ghQFW8tuPk4al92L5kN7iD0hmmcnKx9n2hCaUDzbOnEzshpjyiZ++Ov2B7CiX54 xDtgMu0jkBvDbCRpFryqFLCFzsbYDrRw5bx+SAYMq0Mj9vtwyc0oDx8H3cnK2hj6VMzZ ixAzdAFUm/rZhnJspHm3RvVQpMpMy2S2Hl1oJ6NyBC5NEoFvPkTdqdftWC9+VwVNp8Js r3hnKC61fqRLrmkS6eFlJSEURK9POh3JQ3Uc0xyqsqFwZGerKelSxT/KlX2WXNTIvAo/ ZDng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id f64-20020a17090a704600b0027d37d5dff9si9761809pjk.56.2023.11.27.06.03.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:03:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id CFB63805E460; Mon, 27 Nov 2023 06:03:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233572AbjK0ODX (ORCPT + 99 others); Mon, 27 Nov 2023 09:03:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233564AbjK0OBV (ORCPT ); Mon, 27 Nov 2023 09:01:21 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE5F92D4E for ; Mon, 27 Nov 2023 05:57:58 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id 647A567373; Mon, 27 Nov 2023 14:57:55 +0100 (CET) Date: Mon, 27 Nov 2023 14:57:55 +0100 From: Christoph Hellwig To: Daniel Wagner Cc: Keith Busch , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Christoph Hellwig , Sagi Grimberg , Hannes Reinecke Subject: Re: [RFC v1] nvme: add cse, ds, ms, nsze and nuse to sysfs Message-ID: <20231127135755.GB23928@lst.de> References: <20231127103208.25748-1-dwagner@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 27 Nov 2023 06:03:40 -0800 (PST) On Mon, Nov 27, 2023 at 01:07:32PM +0100, Daniel Wagner wrote: > libnvme itself is also cashing this value and exposes it via the > nvme_ns_get_lba_util() getter. I'd say libnvme shouldn't cache it > either. Instead the function should just issue the ns command to report > the current nuse value. > > I'll drop the nuse sysfs entry. > > Unfortunately, 'nvme list' is using the 'nuse' field for showing the > currently used space. I was hoping to get 'nvme list' working without > issuing any commands. I'd be ok with implementing nuse in a way where we issue an identify command to read it, but rate limit the calls to something reasonable. I think the kernel can do that much better than userspace because it can keep that state a lot better.