Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1722329ybk; Mon, 11 May 2020 02:40:35 -0700 (PDT) X-Google-Smtp-Source: APiQypIFsjQZOWOPz0rdj2xBwQV16LtqHxE3G0YDXsJeVS8OhnPinraE5Tf7kGun0JW/y5hiEjQd X-Received: by 2002:a17:906:86d6:: with SMTP id j22mr5343656ejy.1.1589190035195; Mon, 11 May 2020 02:40:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589190035; cv=none; d=google.com; s=arc-20160816; b=JYC6y+n0uzs4cFnd66oS75ygTyEFhYpslRxmYSmXiWYxJETs8q/6Uajo8sxMqUdS6i W2TdQcPNaGH9WF0LY0KRVSuwJZBmPmEYIYFEkRcQv8qzi3aAs31BUiegD2wEB2QUMAYL l9xfIJCN0U0s4Kcd4j9sED1W4mDqFzIgM0qrOSR3UU3R+hPBlFybc1txatgs2iMQlpgX fg8BTGdjXme6lkqSwmi+69BX/KByjmHwhf9NeeeFh9uMrXduq6kLUp8kVq0xruV13AeN hoN4rN/5hULPGDLXXI2RTPu3CSedTPgU37YE6lSLlZ6fcqPnc7fnIBf9iTeRroyP9aPv Ybng== 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=9/z8oJy0DrW82NKQzFo0pYOXFvWx+Vn3ieQ420AJ3lc=; b=bBmz37vd8qiBna8qWqNck6LlTWdQZXkk+C5GUUsZxpeLKorVCoqz4frNs/r+ix5n8C IUh4nGqMtcjCDXc9AH2LBP2zOneZHcdQIEGuduyvnd5ZSBDdn6AUWflWEppgykmDPIvl 62yMXNY5i76zRnZTUXQaq2nrh1wnclm5IdAwVc4rNqoIDnm9AYZ6wNzTrybpXrodkHaZ oN5wBIFkSnQNx+uZM6DHpUJvl0YrWmIZXzjyhcHGluLb24jiJyocS8DvpiM43xXviZ47 P1bwpIq0dFdmBhtrNElbv9oOmV/NcdPnb7sPQrUe9FuhYoK6NLtBCqx02tWVUe+KLrmW vLHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Or824gsh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i11si3626730edr.14.2020.05.11.02.40.11; Mon, 11 May 2020 02:40:35 -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=@redhat.com header.s=mimecast20190719 header.b=Or824gsh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729482AbgEKJhK (ORCPT + 99 others); Mon, 11 May 2020 05:37:10 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:21744 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729459AbgEKJhJ (ORCPT ); Mon, 11 May 2020 05:37:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589189828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9/z8oJy0DrW82NKQzFo0pYOXFvWx+Vn3ieQ420AJ3lc=; b=Or824gshAxJh9WOS+X/WmIVuhaACN/xsBpOMow3E7W7/tNv3v5zydn5wBdNRVYnKgMGqZd hIRYGEyJpBX3pyvj0YrEdtX07AhYX1+AuEUmgX4kjIaQKr6/Viugg2zG5STQwWBQA2NORY y0JlmGkDpG9l4Oc4H8vCPart9d87y9U= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-380-x5Nmtl54NsWQZnneZiV0WA-1; Mon, 11 May 2020 05:37:05 -0400 X-MC-Unique: x5Nmtl54NsWQZnneZiV0WA-1 Received: by mail-wr1-f69.google.com with SMTP id h12so4974576wrr.19 for ; Mon, 11 May 2020 02:37:05 -0700 (PDT) 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=9/z8oJy0DrW82NKQzFo0pYOXFvWx+Vn3ieQ420AJ3lc=; b=Hl1jGuS0jcszVkZrJO7WH6+lXfzY+ATvvXITD7cIstzNDzlAmWhUTw3WVYOog3mD0W LZGBPJjpSbZAHYMSvPMYegSZ45CK67ZM9r2gj7tdHa9G1/GeLXr4Jdc88UmOwwL/CRfN V78PUVaX3PqTqw8pOW3gTtim4+AMs3eIaZ/xZtZTODa6PfQC2/DvoXK7yrI4EZS8M7SF t8212+DAfxsjIYbfid44dBMrhiwN7JcBHgoR2neo2rHOVunx+hEQwRUNpNv6q0CC6quZ EdQzpnVlum95dsRWANKEM8VlvFEe0x5UVCKtHfKXs+eIZthJ4pfgu0i6rSAVDztSz21L x2tQ== X-Gm-Message-State: AGi0PuZ/artx+fFUlHh99l0bQcWZd011MKCYZBjCNv+4DWTK8Hq7ytQd ubLtaBbZpqJyW1kZ2qZyfHTyH91mRGgGq678ZZqwxa5KnoM+6ziVdWzEKjw9+vknMbuLN6BlKvW WirbBgUL7xcm08WnGwpdZPzam X-Received: by 2002:adf:9447:: with SMTP id 65mr18006254wrq.331.1589189824501; Mon, 11 May 2020 02:37:04 -0700 (PDT) X-Received: by 2002:adf:9447:: with SMTP id 65mr18006221wrq.331.1589189824311; Mon, 11 May 2020 02:37:04 -0700 (PDT) Received: from localhost.localdomain ([194.230.155.159]) by smtp.gmail.com with ESMTPSA id r14sm1636537wmb.2.2020.05.11.02.37.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 May 2020 02:37:03 -0700 (PDT) Subject: Re: [PATCH v2 0/5] Statsfs: a new ram-based file sytem for Linux kernel statistics To: Paolo Bonzini , Jonathan Adams Cc: kvm list , Christian Borntraeger , David Hildenbrand , Cornelia Huck , Vitaly Kuznetsov , Jim Mattson , Alexander Viro , Emanuele Giuseppe Esposito , LKML , linux-mips@vger.kernel.org, kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-fsdevel@vger.kernel.org, David Rientjes References: <20200504110344.17560-1-eesposit@redhat.com> <29982969-92f6-b6d0-aeae-22edb401e3ac@redhat.com> From: Emanuele Giuseppe Esposito Message-ID: <20c45f7b-3daa-c300-a8e7-0fd26664080b@redhat.com> Date: Mon, 11 May 2020 11:37:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <29982969-92f6-b6d0-aeae-22edb401e3ac@redhat.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/8/20 11:44 AM, Paolo Bonzini wrote: > So in general I'd say the sources/values model holds up. We certainly > want to: > > - switch immediately to callbacks instead of the type constants (so that > core statsfs code only does signed/unsigned) > > - add a field to distinguish cumulative and floating properties (and use > it to determine the default file mode) > > - add a new argument to statsfs_create_source and statsfs_create_values > that makes it not create directories and files respectively > > - add a new API to look for a statsfs_value recursively in all the > subordinate sources, and pass the source/value pair to a callback > function; and reimplement recursive aggregation and clear in terms of > this function. Ok I will apply this, thank you for all the suggestions. I will post the v3 patchset in the next few weeks. In the meanwhile, I wrote the documentation you asked (even though it's going to change in v3), you can find it here: https://github.com/esposem/linux/commit/dfa92f270f1aed73d5f3b7f12640b2a1635c711f Thank you, Emanuele