From mboxrd@z Thu Jan 1 00:00:00 1970 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=-7.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 0D920C2B9F4 for ; Thu, 17 Jun 2021 11:34:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EC44B613F1 for ; Thu, 17 Jun 2021 11:34:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231559AbhFQLgO (ORCPT ); Thu, 17 Jun 2021 07:36:14 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:39734 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231250AbhFQLgN (ORCPT ); Thu, 17 Jun 2021 07:36:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623929646; 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=eFNQaz+UBr3+VeZ6q7OSgOqHodPl71Dh+9dEuoGcM+Q=; b=X5h/oeCAI8KRRy4Ex5oWRMnZDuesw1Sm6Gy2/17xW5kGa2gfOFGLqhpOIl2daBPrN8MQSM SipPCYm0e0KmuciNbz36CZSZvD5gPbRvgcbWWh6T3kxwfCKHNApXWmMPz8D2369MV2LP1j TRM8qsXIxBThVUH220dTPLxM7gA4IvM= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-121-myHHp7BzPzCJ6sEaAlyz_A-1; Thu, 17 Jun 2021 07:34:04 -0400 X-MC-Unique: myHHp7BzPzCJ6sEaAlyz_A-1 Received: by mail-ed1-f71.google.com with SMTP id v12-20020aa7dbcc0000b029038fc8e57037so1359203edt.0 for ; Thu, 17 Jun 2021 04:34:04 -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=eFNQaz+UBr3+VeZ6q7OSgOqHodPl71Dh+9dEuoGcM+Q=; b=cBIRhtx0TQZxI8fjRT1UsngaXN6IiY+syIoU6rDGHS7RXyWhV0NakmfSdkM/4j6F2e 4JMhrpjXpBSDdlnlg18h2BAPd0YrnTPvlzFsL6MshWOGeK52Du/F1JMVTyozv3oJSUvB 0mDAoo+JbdFi8ObBDQ2yssJKAmgEI41j71IpTqkb3wvh8Oms17bpM7MdqvDEYxX0vgbf 1tQJbdyQipKUdac/bICariH9v+Rv93q9La9o8bqhzWMSuMYjXJ1ghHGiqobbyW2l/LN6 rOK6Nr2LiMfdJiOxK6tDmFAvd4XCosjJ8Qa/52Mc7nTZIarUwm3qeYkhP0aSk57nahFs n0LA== X-Gm-Message-State: AOAM531Xj017XkgnUaFL3wm518IqY+knRwAlDyDJSmuPkjKQ7B2y0NX5 kWHXbl2MNu9CzvPvngb60aNYL+bEN18Pgp0vd+i2SD8Hrm5YmjM9KjkLXUrPEBjfq4Cen5RlxJJ IqwmlRmm2C1ZmU7hwtRoGRA== X-Received: by 2002:a17:906:ca4a:: with SMTP id jx10mr4731043ejb.200.1623929246063; Thu, 17 Jun 2021 04:27:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw32CbI/7oXViDiR3/KwQ1e7FS2cEfJU4e5y3PkNkTiAFxV1nv9UNltBlc/li58ogeNN1nAkA== X-Received: by 2002:a17:906:ca4a:: with SMTP id jx10mr4730994ejb.200.1623929245836; Thu, 17 Jun 2021 04:27:25 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id s5sm4131010edi.93.2021.06.17.04.27.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Jun 2021 04:27:25 -0700 (PDT) Subject: Re: [PATCH v10 2/5] KVM: stats: Add fd-based API to read binary stats data To: Greg KH , Jing Zhang Cc: KVM , KVMARM , LinuxMIPS , KVMPPC , LinuxS390 , Linuxkselftest , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , Will Deacon , Huacai Chen , Aleksandar Markovic , Thomas Bogendoerfer , Paul Mackerras , Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Sean Christopherson , Vitaly Kuznetsov , Jim Mattson , Peter Shier , Oliver Upton , David Rientjes , Emanuele Giuseppe Esposito , David Matlack , Ricardo Koller , Krish Sadhukhan , Fuad Tabba References: <20210617044146.2667540-1-jingzhangos@google.com> <20210617044146.2667540-3-jingzhangos@google.com> From: Paolo Bonzini Message-ID: Date: Thu, 17 Jun 2021 13:27:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org On 17/06/21 09:24, Greg KH wrote: >> Provides a file descriptor per VM to read VM stats info/data. >> Provides a file descriptor per vCPU to read vCPU stats info/data. > Shouldn't this be two separate patches, one for each thing as these are > two different features being added? They share a lot of code. We could have three patches though: - add common code for binary statistics file descriptor - add VM ioctl to retrieve a statistics file descriptor [including the definition of VM stats descriptors] - add VCPU ioctl to retrieve a statistics file descriptor [again including the definitions of VCPU stats]. Paolo From mboxrd@z Thu Jan 1 00:00:00 1970 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.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 61714C2B9F4 for ; Thu, 17 Jun 2021 11:34:12 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id D9A74613F1 for ; Thu, 17 Jun 2021 11:34:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D9A74613F1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 4933A49F82; Thu, 17 Jun 2021 07:34:11 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@redhat.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UCM6q-Z8Msln; Thu, 17 Jun 2021 07:34:08 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id B11BC4A3A3; Thu, 17 Jun 2021 07:34:08 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 4341149F82 for ; Thu, 17 Jun 2021 07:34:07 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LPhQ4I8nz1lL for ; Thu, 17 Jun 2021 07:34:06 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 5396040821 for ; Thu, 17 Jun 2021 07:34:06 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623929646; 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=eFNQaz+UBr3+VeZ6q7OSgOqHodPl71Dh+9dEuoGcM+Q=; b=X5h/oeCAI8KRRy4Ex5oWRMnZDuesw1Sm6Gy2/17xW5kGa2gfOFGLqhpOIl2daBPrN8MQSM SipPCYm0e0KmuciNbz36CZSZvD5gPbRvgcbWWh6T3kxwfCKHNApXWmMPz8D2369MV2LP1j TRM8qsXIxBThVUH220dTPLxM7gA4IvM= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-601-ruzrMOJPP4uCUmsj7Ozfzw-1; Thu, 17 Jun 2021 07:34:05 -0400 X-MC-Unique: ruzrMOJPP4uCUmsj7Ozfzw-1 Received: by mail-ed1-f71.google.com with SMTP id h11-20020a50ed8b0000b02903947b9ca1f3so1044111edr.7 for ; Thu, 17 Jun 2021 04:34:04 -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=eFNQaz+UBr3+VeZ6q7OSgOqHodPl71Dh+9dEuoGcM+Q=; b=TGr5rQV9Dkuvx2kywj3AORfRputxcqp/XhXoEHLAnCDS1Hu+5BmJ2uAK0Vew4y1/f0 QjsSzcaWi2yfNUUqG+6nkfeWuM3e/3Q1IKYV9M/dcyeG/0ovmCSa9NZb1sGsnD5i64nE mDOb3AEryFzPg81qB2wADN5SAi3EuNHtmGprDYiwdRgdhU3jbNX3PlmmGgCMTLhFKvOT NItDqB7K1aiKBSmh6dE/QtQh7yekap8JjVcwOYtMWK7txG7u5Hk5shjnh6HsqAVcQdIy s10jIrRpNxjtOwCjPhHTRWVs5IDoa9Dr4HBoi3Y5z/N8gE/w4IMC8hkT9wVdW/Zyg3IU YdcA== X-Gm-Message-State: AOAM531Zu3Ii8YS2NcWiAVqvzfQDGkybFw8a1gCpLS9SDQra6+pVdNun r3dcm4VBjq+V4sfvfY0s8mC8wVW864ELACjWqZBRXAqo4SZ7qhqfiww2qMCRnULfSYye4AMaF7D eWaOih93slB9ELMOQ44xIUAci X-Received: by 2002:a17:906:ca4a:: with SMTP id jx10mr4731044ejb.200.1623929246066; Thu, 17 Jun 2021 04:27:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw32CbI/7oXViDiR3/KwQ1e7FS2cEfJU4e5y3PkNkTiAFxV1nv9UNltBlc/li58ogeNN1nAkA== X-Received: by 2002:a17:906:ca4a:: with SMTP id jx10mr4730994ejb.200.1623929245836; Thu, 17 Jun 2021 04:27:25 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id s5sm4131010edi.93.2021.06.17.04.27.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Jun 2021 04:27:25 -0700 (PDT) Subject: Re: [PATCH v10 2/5] KVM: stats: Add fd-based API to read binary stats data To: Greg KH , Jing Zhang References: <20210617044146.2667540-1-jingzhangos@google.com> <20210617044146.2667540-3-jingzhangos@google.com> From: Paolo Bonzini Message-ID: Date: Thu, 17 Jun 2021 13:27:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Cc: KVM , David Hildenbrand , Paul Mackerras , Linuxkselftest , Claudio Imbrenda , Will Deacon , KVMARM , Emanuele Giuseppe Esposito , LinuxS390 , Janosch Frank , Marc Zyngier , Huacai Chen , Christian Borntraeger , Aleksandar Markovic , David Rientjes , KVMPPC , Krish Sadhukhan , David Matlack , Jim Mattson , Thomas Bogendoerfer , Sean Christopherson , Cornelia Huck , Peter Shier , LinuxMIPS , Vitaly Kuznetsov X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On 17/06/21 09:24, Greg KH wrote: >> Provides a file descriptor per VM to read VM stats info/data. >> Provides a file descriptor per vCPU to read vCPU stats info/data. > Shouldn't this be two separate patches, one for each thing as these are > two different features being added? They share a lot of code. We could have three patches though: - add common code for binary statistics file descriptor - add VM ioctl to retrieve a statistics file descriptor [including the definition of VM stats descriptors] - add VCPU ioctl to retrieve a statistics file descriptor [again including the definitions of VCPU stats]. Paolo _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Date: Thu, 17 Jun 2021 11:27:23 +0000 Subject: Re: [PATCH v10 2/5] KVM: stats: Add fd-based API to read binary stats data Message-Id: List-Id: References: <20210617044146.2667540-1-jingzhangos@google.com> <20210617044146.2667540-3-jingzhangos@google.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Greg KH , Jing Zhang Cc: KVM , KVMARM , LinuxMIPS , KVMPPC , LinuxS390 , Linuxkselftest , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , Will Deacon , Huacai Chen , Aleksandar Markovic , Thomas Bogendoerfer , Paul Mackerras , Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Sean Christopherson , Vitaly Kuznetsov , Jim Mattson , Peter Shier , Oliver Upton , David Rientjes , Emanuele Giuseppe Esposito , David Matlack , Ricardo Koller , Krish Sadhukhan , Fuad Tabba On 17/06/21 09:24, Greg KH wrote: >> Provides a file descriptor per VM to read VM stats info/data. >> Provides a file descriptor per vCPU to read vCPU stats info/data. > Shouldn't this be two separate patches, one for each thing as these are > two different features being added? They share a lot of code. We could have three patches though: - add common code for binary statistics file descriptor - add VM ioctl to retrieve a statistics file descriptor [including the definition of VM stats descriptors] - add VCPU ioctl to retrieve a statistics file descriptor [again including the definitions of VCPU stats]. Paolo