Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp6694516rwb; Tue, 9 Aug 2022 22:25:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Z+AAngZqAwMWi8HJJ2UyiKJcSxiboFf+Fc+eFcRQ0d+oeAozU5uOpK0H+xlU4HmlCqcp6 X-Received: by 2002:a17:907:1c87:b0:6f0:29ea:cc01 with SMTP id nb7-20020a1709071c8700b006f029eacc01mr19032231ejc.671.1660109150642; Tue, 09 Aug 2022 22:25:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1660109150; cv=pass; d=google.com; s=arc-20160816; b=RxM14NxYBt91vSI2N7rO9vx1QSsWyMJjIpXR+a935iyvu/X3jhYrudfEx7aZdKfylB 7os0MdaXcrkifsMChTgq3ra1hFIUGDU+bn4GTBWDd/in/gDNV/aDMZuM/eCTbsOa7JWW iA14QVBna/ORiozuBJaHFfH38Vf7aYE5My43EeWL2o3hdluJez//3vj1LTjPAuWm/9eV 8eYk/rgojRb6hVwZCc1xqCMN1bVQ9Kat4h+YPxEkANsdpkAdZ6ByJWOemoygQqu0o8Bg wKne4BH4T9hf62sAWodGMPlUFJYQRl/ADeYq9hd7YDJtS3/ml9htp4iKTXGr7gLkcR1Y COOg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:subject:user-agent:date :message-id:dkim-signature; bh=jQMGEkiW/U7Slt824lop1o211KnP0rSRk2I62lroTZ0=; b=wonbO9WoY9Lx4ci9rONOXulsM36IYS2OqE27+7rpiSICZ45agOpHe5HFhZifb1U21z jpSwYsEfn8tvQq+KsNhR5/qQe3OXxDCsi0ZNeJNOO+JDojIqidE651uZuQW4KmUOYjNH id3vhciJSl5EcXh9ffw6Udie5O9fhogPihbxxqHzNQLVcOK3Y5iX9uwcCNDjqipuAerd xU1fG5buMo/N6HDNHun5ZVD6i+f2tj7NUl8I2dGMRh00jpjLlZnFGq6yNgfUqCmv22Ht j4FQE/i82v8As+KwETuPsUizjKtu3vXgKh38szsoFOpTOcxogdmLXdEGqJMcBNhvpwX5 UkiA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector2 header.b=pBD9vaTc; arc=pass (i=1 spf=pass spfdomain=virtuozzo.com dkim=pass dkdomain=virtuozzo.com dmarc=pass fromdomain=virtuozzo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y26-20020a50e61a000000b00440dec9a0b1si4796694edm.311.2022.08.09.22.25.24; Tue, 09 Aug 2022 22:25:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector2 header.b=pBD9vaTc; arc=pass (i=1 spf=pass spfdomain=virtuozzo.com dkim=pass dkdomain=virtuozzo.com dmarc=pass fromdomain=virtuozzo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230263AbiHJFO0 (ORCPT + 99 others); Wed, 10 Aug 2022 01:14:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229649AbiHJFOQ (ORCPT ); Wed, 10 Aug 2022 01:14:16 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2135.outbound.protection.outlook.com [40.107.20.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D82E683F1F; Tue, 9 Aug 2022 22:14:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kdvffwoB5bKeKf/CqujEQBofXRXZCR2O/EsECqddIAkYf13RbVHly1xmLdFoJsLcHk+7eSYlXnoNvHxQHRykBP1qFZ2C0AoOtJBjOpWRd9Ikx4YuMVAlUkVi4dhGKgSdjnZyveKWCG8orIkNfXtIGBj98nyMDW9mrk9s+1amnLbXtPbtBLEIkpHCE5zAJRPx77fkFiWiHIFfPWzP8RusFYBM+6yVaIZl9EDEr5acga9JLTJkuhNt3MeXAIz2epwMGpDID34GFMp5I/SRNTNxBmj7TD6Zcc7JdKkMRzuMszYF9zXBLT8jPAvUhMbSPQmzY2/O0U3Of/vbPuj0d7QUEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jQMGEkiW/U7Slt824lop1o211KnP0rSRk2I62lroTZ0=; b=HgfQinSknePCQ8kj49QklpaaT5pbBTe6jwI4Qhr35MIGYNyVxsQCnt0T6qaSpa0pqSS4QhkzXAh76yvoyavcEG5PUeFV+l4q0wI0qgx9vfH5c2TW7S/HpG/V6QcLmArvRnWjyOouik9UETGKEmwAol7Te6GWikA7DsQOn7jr3aqOh6fIiGpvwEZaTE9/G1TvYxtmSJH7aoS/iD2sWJV7fIuqLXlthEsSe0DKDPIMx/9cffRS65RbX4Up1UV0HD8HhGnD6I9PVcOG/owCJa7J8h84G39XdmunV5p5qyTJpalzZrTQytegXiFrrOpgXGBBxvq4bHcTBv60MtJ89t1a2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jQMGEkiW/U7Slt824lop1o211KnP0rSRk2I62lroTZ0=; b=pBD9vaTc3UuWjXgQqEZiEQFYy69DSRGOr0tHBRnTmK3G9YMJVcJ6O6B3k5OZd0HJ54K4B6aUp6AIiTA5KD6DQC0jGJOu7iHJXFU+Xl7yzDVTuGjiU2oNziEOJNtfU+tx8VbNDRIY26pJ/emdW6qoVXazzwAY4qd5uWCirsb2aR5yMq16gaCpWB1AKoyIOXs7KlNi+eGL6yOLBD2rDBE3WchTMclrt/Vp369Q/8GHGM67kI00Ebp8+FJOB3a8DqShCB8WyGkJ0/TUoip+cpv2i0GOC90HSNdkfOYn/WsbCwn8WdfMTzSNi/UXOxI5jeW1Ueg/l+wwAhMlOj9rygO/iQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=virtuozzo.com; Received: from VE1PR08MB4765.eurprd08.prod.outlook.com (2603:10a6:802:a5::16) by GV1PR08MB7897.eurprd08.prod.outlook.com (2603:10a6:150:5c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.15; Wed, 10 Aug 2022 05:14:12 +0000 Received: from VE1PR08MB4765.eurprd08.prod.outlook.com ([fe80::cce4:bfef:99c9:9841]) by VE1PR08MB4765.eurprd08.prod.outlook.com ([fe80::cce4:bfef:99c9:9841%5]) with mapi id 15.20.5504.021; Wed, 10 Aug 2022 05:14:12 +0000 Message-ID: <9653d74f-ffff-6a25-8c99-5565bcab4d5c@virtuozzo.com> Date: Wed, 10 Aug 2022 08:14:06 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.1.1 Subject: Re: [PATCH v1 1/2] Enable balloon drivers to report inflated memory To: Muchun Song Cc: Jonathan Corbet , Andrew Morton , kernel@openvz.org, David Hildenbrand , Wei Liu , Nadav Amit , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org References: <7bfac48d-2e50-641b-6523-662ea4df0240@virtuozzo.com> <20220809094933.2203087-1-alexander.atanasov@virtuozzo.com> <5EFFFB23-9F73-4F07-B6FF-3BD05976D427@linux.dev> From: Alexander Atanasov In-Reply-To: <5EFFFB23-9F73-4F07-B6FF-3BD05976D427@linux.dev> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: ZR0P278CA0055.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:21::6) To VE1PR08MB4765.eurprd08.prod.outlook.com (2603:10a6:802:a5::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f3243a91-71d2-420c-b062-08da7a8f2958 X-MS-TrafficTypeDiagnostic: GV1PR08MB7897:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MEUuywiZLf3OXqPrbPLaVHNM16YN8pnQ3ct3YajiOE63n6Lz7a4FSU/BizwNLMhd4sbVJOU54T9dJgPhoA+BrxGzH2cRPT5Iyif7rFW+Q0SPGRYDeCuz+DhpbiZY8j/CJBlP23M7IEsEE3Vy6SbAzlR/2Ie7k2OVvljR36oap1JkRtI+4r0CRCuH9E3rd/w/2GnR4Vd2ywcitd/zuaSz70pdYW56QJMZPQI/ZDHXaPPWe0mE7p9i98ynJFQ9I+5YvbpH4x1ba8K1lCoLbRPzpFt2N1yuj31gA9Be2OfNgcRwH+1+Jib85imBMZRYj7FHpXSKDw5+wAGs9aof8pPJSa8v/DryRnsUeArfUhFammleOMBesZuq3ERh5lFAMzl/bqtb8VobFZSYheeVjvjw+svfqcehmIESXt+Juzf6Lp9h18rca0tqNmr5oy5EigPIwy1A/T/S8DOZwZ5a/epFmv7Cg++11Q1zkTUXG6E/YHbl0LKAmuvwCRWqH2FcKGOM5iIvGmJsW1BX6itHxrQuu0WAskSqmnDTETNJozURW3Kk8DclS3Obxbnc062JyBY6Acb8G91/69z5jRkSk+jpJUgUB3LkDDaguQAO6BOSGW50LNPZasPU+TKFj4Ojar71GyiSi8TQDw1lOl0AFGaG0OYcevkmTV5JW4Q4CvbA0MsBoJZGSQIlfoi6HtFiBAWLEBU87H6h4oduk+n/ceZEc7n3ODD3jXWaObG+re47oQJStxC4X/G4mLw9VZxDHZUBcs0am7DSnhYtdDUW7zRVzfVJkZ8SoP3tBBtO1UuXUJqvDv4Tz8laMDCL6OSEfxNYEk/6ZOvC74ZOEQsQRkL/iNkM09SFMEBtdYPZNeKwCO8= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR08MB4765.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(346002)(396003)(366004)(376002)(136003)(39850400004)(478600001)(6486002)(54906003)(41300700001)(26005)(36756003)(31696002)(86362001)(52116002)(53546011)(2616005)(83380400001)(6506007)(6666004)(31686004)(6512007)(186003)(4744005)(8676002)(6916009)(66946007)(66476007)(66556008)(316002)(5660300002)(4326008)(8936002)(38350700002)(44832011)(2906002)(38100700002)(7416002)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cWJqV1pYOG1ub0g5cXFQdWxqRTBqc2MwNExnZ1BiTXJTL3RNREZzb0FBSWpM?= =?utf-8?B?VkcxODVWWkt6U2MxNnhtaXVMQ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f-8?B?YVA3Umxkckl1RXVyYUhyeTFKc3dGZHpyRysyTWlHeXZZSUJRVkJlSU4vMFBO?= =?utf-8?B?OG1CWURkaE9MWUhuQ2o5STlFUnBmSDVRTnc2ZHBKNkdKYS9mbEhuU0lHKzNx?= =?utf-8?B?N29kdVA5UWZYay9sbEduT3NKdlN3NGt3QW5JNnIvWkZCcmwrblI3SmgrV09i?= =?utf-8?B?Z09LTUhYTXdaWGs5RWJXOXNGUWRXMTB0eFVSQ0cwdWgxdVFrclBIRmF6emd6?= =?utf-8?B?bk5ZWlU0Q3A2RDlDcVZmN0tEVng0dEhNek9QdFZwZTBDVWhrcVFtR0tib2Ro?= =?utf-8?Q?swVvevqkR/Ksv5rVTF4mLH0=3D?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f3243a91-71d2-420c-b062-08da7a8f2958 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4765.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2022 05:14:12.0342 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Ph6BU8a645m8XvQy6gAS81WgkK+WG3QQk1W09vfmkZ14tkXYGeeG694ahylP/DF2GL8Ks/A0kLHDBHgamTNrLsdXzoE/hiTkCbasOK7qHm5KSYOcKIgqL8Fcb3uWiDx4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB7897 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On 10.08.22 6:05, Muchun Song wrote: > > >> On Aug 9, 2022, at 17:49, Alexander Atanasov wrote: >> >> Display reported in /proc/meminfo as: > > Hi, > > I am not sure if this is a right place (meminfo) to put this statistic in since > it is the accounting from a specific driver. IIUC, this driver is only installed > in a VM, then this accounting will always be zero if this driver is not installed. > Is this possible to put it in a driver-specific sysfs file (maybe it is better)? > Just some thoughts from me. Yes, it is only used if run under hypervisor but it is under a config option for that reason. There are several balloon drivers that will use it, not only one driver - virtio, VMWare, HyperV, XEN and possibly others. I made one as an example. Initially i worked on a patches for debugfs but discussion lead to put it into a centralized place. -- Regards, Alexander Atanasov