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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8ABC7C04A94 for ; Tue, 1 Aug 2023 21:20:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231532AbjHAVUf (ORCPT ); Tue, 1 Aug 2023 17:20:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230481AbjHAVUb (ORCPT ); Tue, 1 Aug 2023 17:20:31 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F59EFF; Tue, 1 Aug 2023 14:20:30 -0700 (PDT) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 371LAtVt017173; Tue, 1 Aug 2023 21:20:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : from : to : cc : references : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=06FF4IOyXvcgEdQyC3mIxkaA4a6M/S3jL0iZP3Xs0zQ=; b=Rz1CZ6SuBmFRKkOaXFVDrLiYy/Hd6qsaBwTZVWxSO7OUxoN7Av8IKYqobCpfeEqNNLqm D8V32/2C7NulDywKR73gwxt8gyCN2eHSCKUG1AKZqAKW5o0a1PM5nHH+ziRbIONuFESe FvsMYNX5aB9v9hO/Wc5p8rlu8OGcLG/VZ+Xv07AzXT5OVGPPCzV2g1PRmWDZKTJnnMDv bhGb63IbJ0TFgu0Jn/Fn6/9il2b1H0V0JYCL8DLi1SGqpXt6VCNKAjbt3hu8xtMnJ+4e Q3eR5GyYFA3WEwaT10UBxYHLMncOAWrkWCmvwgjx6OhtIWNff6CkUow5nESb67Vq2quB 6Q== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3s760c0gkp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 01 Aug 2023 21:20:07 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 371LK6IF015115 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 1 Aug 2023 21:20:06 GMT Received: from [10.110.58.131] (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Tue, 1 Aug 2023 14:20:03 -0700 Message-ID: Date: Tue, 1 Aug 2023 14:20:00 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.1.1 Subject: Re: [RFC] memory pressure detection in VMs using PSI mechanism for dynamically inflating/deflating VM memory Content-Language: en-US From: Sudarshan Rajagopalan To: "T.J. Alumbaugh" , David Hildenbrand , Johannes Weiner , Suren Baghdasaryan , Mike Rapoport , Oscar Salvador , Anshuman Khandual , "mark.rutland@arm.com" , "will@kernel.org" , "virtualization@lists.linux-foundation.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-arm-msm@vger.kernel.org" CC: "Trilok Soni (QUIC)" , "Sukadev Bhattiprolu (QUIC)" , "Srivatsa Vaddagiri (QUIC)" , "Patrick Daly (QUIC)" References: <50f979aa-37a6-db4b-465d-1dc0a27c2dfc@quicinc.com> In-Reply-To: <50f979aa-37a6-db4b-465d-1dc0a27c2dfc@quicinc.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 5Pd5W_i9tOsA8EbyrFrvN-TimLFMiZRf X-Proofpoint-ORIG-GUID: 5Pd5W_i9tOsA8EbyrFrvN-TimLFMiZRf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-01_19,2023-08-01_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 suspectscore=0 mlxlogscore=915 adultscore=0 mlxscore=0 phishscore=0 bulkscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308010190 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/23/2023 3:47 PM, Sudarshan Rajagopalan wrote: > > On 1/23/2023 1:26 PM, T.J. Alumbaugh wrote: >> Hi Sudarshan, >> >> I had questions about the setup and another about the use of PSI. > Thanks for your comments Alumbaugh. >>> 1. This will be a native userspace daemon that will be running only >>> in the Linux VM which will use virtio-mem driver that uses memory >>> hotplug to add/remove memory. The VM (aka Secondary VM, SVM) will >>> request for memory from the host which is Primary VM, PVM via the >>> backend hypervisor which takes care of cross-VM communication. >>> >> In regards to the "PVM/SVM" nomenclature, is the implied setup one of >> fault tolerance (i.e. the secondary is there to take over in case of >> failure of the primary VM)? Generally speaking, are the PVM and SVM >> part of a defined system running some workload? The context seems to >> be that the situation is more intricate than "two virtual machines >> running on a host", but I'm not clear how it is different from that >> general notion. > > Here the Primary VM (PVM) is actually the host and we run a VM from > this host. We simply call this newly launched VM as Secondary VM > (SVM). Sorry for the confusion here. The secondary VM runs in a secure > environment. > >> >>> 5. Detecting decrease in memory pressure b