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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46945C04A6A for ; Tue, 1 Aug 2023 21:20:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6B8A72800F9; Tue, 1 Aug 2023 17:20:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 669522800C8; Tue, 1 Aug 2023 17:20:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 531052800F9; Tue, 1 Aug 2023 17:20:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 4332E2800C8 for ; Tue, 1 Aug 2023 17:20:19 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 0CD55B24C7 for ; Tue, 1 Aug 2023 21:20:19 +0000 (UTC) X-FDA: 81076804158.20.1F76574 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by imf03.hostedemail.com (Postfix) with ESMTP id A1C4420021 for ; Tue, 1 Aug 2023 21:20:16 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=Rz1CZ6Su; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf03.hostedemail.com: domain of quic_sudaraja@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_sudaraja@quicinc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690924816; h=from:from:sender: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:dkim-signature; bh=06FF4IOyXvcgEdQyC3mIxkaA4a6M/S3jL0iZP3Xs0zQ=; b=bWNW9nzgdjY3a+beG53I/l5yfA3CwWURq8hMYjD+g2FemLi6udlCkqH2mfbzCVdhy7Z1Vi grnVtUJ437orCH7gwUhPMmbpJ0DjPJW+vUEtluNvl+4ElCOSy5ClBhYgF1OUn08TdrOxpE sYPijiWfSIxch6vZJe+6wZw33jXSLb4= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=Rz1CZ6Su; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf03.hostedemail.com: domain of quic_sudaraja@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_sudaraja@quicinc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690924816; a=rsa-sha256; cv=none; b=WLaJo1CHgQnXOvpq/qYx6J6/Wude+TD9yt10OymGjQqf0SVIcqroXt17yKr4a3AJbw9eqD eJicjkfBKE6ov8rKVGau45WRApKvGKrzFBh/rCaaQUW6cGuOh7eajUVZURPCXHyUxnSiDr y2WngMQdZJ2/YsyRhLcvKfzHIu5Z7yg= 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 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: A1C4420021 X-Stat-Signature: nxf8x7bpfi981ok8s6izh3fcrpahbin7 X-Rspam-User: X-HE-Tag: 1690924816-809725 X-HE-Meta: U2FsdGVkX1/sIs2nMydjPCgVLpKSCx7TDKX8zvdVfmwGbv9z/5lgip4HhQ1NZodzPJeBl8qRXYZMovZcPwfjRlhr3/z4R+K2bd9Oq/V21OJN+q0jHxqwWI3uzO23LEk1y4RXnFcNdfZV1MC/BJNiDcp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cfN7/q+459A8YgFJ4u/nAqLg+bEYmx6UrVi1YwbjbQXUCs3Xnf4nPsKqDqWvCTxy+VXW/wGPrzKBGmYSN+15yys2juhvpfcxVMZw+ssLUiCdBQsVXoN7bGjGvIyOe/3S7NTpbzgddX2wmstw5h/xhc4g= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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