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 4F8CAC6379F for ; Sun, 15 Jan 2023 02:45:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 66C008E0002; Sat, 14 Jan 2023 21:45:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 61ACF8E0001; Sat, 14 Jan 2023 21:45:05 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 446D38E0002; Sat, 14 Jan 2023 21:45:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 344FB8E0001 for ; Sat, 14 Jan 2023 21:45:05 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 00606402C2 for ; Sun, 15 Jan 2023 02:45:04 +0000 (UTC) X-FDA: 80355491328.19.E37A94F Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by imf10.hostedemail.com (Postfix) with ESMTP id B3F4CC0005 for ; Sun, 15 Jan 2023 02:45:00 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=NevuG5SD; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf10.hostedemail.com: domain of quic_sudaraja@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_sudaraja@quicinc.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673750700; 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:in-reply-to: references:dkim-signature; bh=b/7W6uvtDBqyNKbl/X23uJvMXkRi/XBo7XYADyaQVD4=; b=pZfOx1UTf7yRMJmU1XPBrGrefakrDothc3n3+Ad4xCA+i47YFAREEf7rO1JaMfHsnT5N1V DSMAU0dS8x568maTUC43DJTsIpvL05bS/aU69oE33i9zBWSzJd5x0aCDWpMpLWYRwEf+bo rU4I8EO3I2gqS8BtGz7RVSRhqfaHUC4= ARC-Authentication-Results: i=2; imf10.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=NevuG5SD; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf10.hostedemail.com: domain of quic_sudaraja@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_sudaraja@quicinc.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1673750700; a=rsa-sha256; cv=pass; b=EcN0IdKci8BzakBRZuQd3HDzJIRiANAeaOgyw/2k+XkGVkk7nQYO7uWxqfaObk3viCY99u CNPWsbQzTydbNVob38zbgeLko0zS7AYJcK00LXtGg1NGk3P9RI8gT8fiyEBzrwPUlHoZq/ Vj3u/vX99NUZ0+wHDz3gWNVCBfCnrKo= Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30F2gSr2017954; Sun, 15 Jan 2023 02:44:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : content-type : mime-version; s=qcppdkim1; bh=b/7W6uvtDBqyNKbl/X23uJvMXkRi/XBo7XYADyaQVD4=; b=NevuG5SDZv+bxejPQU6MD2eGwB4HL+5n2lp3ofhljzhhlXycDfOTJLr5tGXKE22EpP+3 qFvN3JwRa9+/EVGgJe9/lHM9oVhXgILhiDGpDpBuRiS1eTkojTKLps18EAEY+ghex525 r+acedLPQq60geRuvonsaK442+JEJZ1dv0fe576dbt92gVZO3ipuYSVcxcdploF4no39 lBBsIcqSx6JOi4Lu+SUPovZH5VpsRDLPJ/J98AWfz/iSZmoH2uiHZX18sRwwBDFkKBbI OCZ8w4LmRGgAewvXE0b9sL4bcXxwCYHKvsShZW5n6tBEoaTlwajfe2tKcQFQ1f9xgmms SA== Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2101.outbound.protection.outlook.com [104.47.70.101]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3n3m089d5u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 15 Jan 2023 02:44:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZUHamIORRBI2dBRxePT54AiqwUtsQs/M0eZOGp4nZH8vXfzry56FoTIYxvIJMStfds76DHbXcwaetUlxrz5qfzrbw0m7m8c/4esaeaoIV3nPNP3iwmlCySwdn211GbiQTmqkwJfye07h5n/2ZxstftqbR+CixdO5nYhBVCISImDIwq4MbZaNb6vag+pdbWoA/acmOdaTpikxdOaYn3aN+bd3JNGnd/saSsDK3Q7Zx3on6Y43mCU/CR+WzbqB5VIVMto7pEGdcrMkJ0msNJDt9j1mMLy30eEFi78fk9rkb+py/rvDwfM+A0Dv8Tm6PfkQpFeYAi9dZM6jqJVAQQMSIA== 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=b/7W6uvtDBqyNKbl/X23uJvMXkRi/XBo7XYADyaQVD4=; b=FBlBlxnUWhJjhcKmferAcwd6oqjWFg3wcxb8O8YQ5Q1ivyZFWA3irllhjrzQFOIYxo8Qn1nr9nCWn9e/mDCviKMM/O/Qr4aOz538h1Mhkiy4qlMfssw07gEfgbVXMBIo80FdmbG4DC6x8eV1ryU5yHzWGJcSXD2hRDT6SYrnfnSiQBgra0p3TdZGhE87HgPqpC9YaL33RXKjvqUo6X3KRO8WOh1KuVHoGr2vE8wWLO5n3HMPmpyHWhK33/zRke6+JjTKFokEQ/P7XR44rs6oVrOuTtUqJeezsAHedJQmFGvUqNMh8TQ8cuolbQwhzFm2XvjhmyJ1JlnlSeecSY0J5w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=quicinc.com; dmarc=pass action=none header.from=quicinc.com; dkim=pass header.d=quicinc.com; arc=none Received: from DS0PR02MB9078.namprd02.prod.outlook.com (2603:10b6:8:132::21) by PH0PR02MB7224.namprd02.prod.outlook.com (2603:10b6:510:17::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Sun, 15 Jan 2023 02:44:42 +0000 Received: from DS0PR02MB9078.namprd02.prod.outlook.com ([fe80::f81e:1dd9:3648:d648]) by DS0PR02MB9078.namprd02.prod.outlook.com ([fe80::f81e:1dd9:3648:d648%9]) with mapi id 15.20.5986.023; Sun, 15 Jan 2023 02:44:42 +0000 From: "Sudarshan Rajagopalan (QUIC)" To: 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)" Subject: [RFC] memory pressure detection in VMs using PSI mechanism for dynamically inflating/deflating VM memory Thread-Topic: [RFC] memory pressure detection in VMs using PSI mechanism for dynamically inflating/deflating VM memory Thread-Index: Adkoi1BzWzm1GGusST+Ljnpi5rNVDA== Date: Sun, 15 Jan 2023 02:44:41 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DS0PR02MB9078:EE_|PH0PR02MB7224:EE_ x-ms-office365-filtering-correlation-id: f387d305-b3f6-4963-f13f-08daf6a2741f x-ld-processed: 98e9ba89-e1a1-4e38-9007-8bdabc25de1d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: G1+72hBGEzozIpSBY2cysAFMYXTef3HLJzWhdw26IVz/c5Nf3ort8WhFJhzkj/VGRxfoffVWBVARftS0DnLPzlWJJ4V0ps+3StUeBV+3MqH8DdPdAsKJjn8O7I8ix0s+Uw1YHtnbqDa06Fsi4RrViPGRGjL0bKdK04za/kJ0P6Bn9uysH+MG906gvYJProPEtz9XC5AOYJaVqp49dA9JLxKevy49ezF9raMW2ZWQuo7mR+bUP41RnPb9HK8nIw7ogUzjw176iIBEAUCVlSNdRU/R9I/yEKDJGgxnTolcO9nHvheifYS8q75FQeE7+QcoyAyxxgHH9zfQC/q8/hXWYXyzyf7APncCV7dQ+ktCCn5iPqFwgFQRH1hkJ2a1tO/vbFMYpQO/sbFVI7MMul7vWZboaq2FlaAluIs0caIsQ8jBNjg6fv69V9FspUoReKzqyQGGHEuVXdjZwFqhwjB7zwXLLH1lt0qG8Pc0KAcFEISBHbttesHOj/bxJa92jwr9/PeZejMbK3RQdHF5X/k2EtQfdNqDN49ZVPUMbtNPqCMQqP58Ej+nqre1r0sjqp1tIQsVUK+DDI6/cC9kZ355vrIsVkplqx7rxzSmscfA9B0NRb5Y9Ohrn15pA9dGcBijI77ghjCZN6nNfEsQRw9aBFHP7yPIKgg6MeCCxPCUyG1RktedAac7oEJ4Bk5XfQDMaS9hTQVyRw6OuYckdQ53iSZt3ljPvAxwSbEYJWpfICI= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR02MB9078.namprd02.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(376002)(39860400002)(136003)(366004)(396003)(451199015)(6506007)(38100700002)(122000001)(107886003)(921005)(2906002)(86362001)(478600001)(33656002)(7416002)(8676002)(71200400001)(7696005)(9686003)(26005)(316002)(186003)(5660300002)(8936002)(83380400001)(55016003)(38070700005)(76116006)(41300700001)(52536014)(54906003)(4326008)(66446008)(66556008)(66946007)(110136005)(66476007)(64756008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Hf9iQHOOnmXtMbiP50/7+rzrDeSehJ3AgNGRI9oISqp2xTQWMJAXf9zBnYM4?= =?us-ascii?Q?AGDiZhx4wULhQYh9vucseQ7JgGSw9lz7sXmtr0GRS9F/A9I5A+YTaVgLUqbM?= =?us-ascii?Q?VfB5mFgHxcCwOxywu2bBicIm4OKpW2BqQc10L66hTWalNnAvE+43FE2voodQ?= =?us-ascii?Q?VyaVimCljcMlWl5My5S81GTywRkkDPytPDfypVXL4DLNBYPYGqhKB/RHQzYI?= =?us-ascii?Q?8ga0H7HmAU/Go6n15he8ldDArEy23JbnNC2aID9N4P1Ba8fKm457/MJ6Id6z?= =?us-ascii?Q?A4EAaAYie2qUsur8WuEC3ZOu2Mhgb+MtnLzVkDDR5ib12Yc0d5ZnMfTRIb7M?= =?us-ascii?Q?v8TacpS9NGtOQzoj0qOgLpFCU+eKh+8lr5UrNzfXwsPeb6qgRKYonCErZlyD?= =?us-ascii?Q?QNucST31tM5Byj/zscYBl1yON8gWg0o1l53xU6MZ9mNJ0GiLApNdTA6FK/yF?= =?us-ascii?Q?awQNSvF2uNL1ZcqF1yqhRscIrdLXguB4w0j09te0b2wFOkiilyU+7SqT9v5R?= =?us-ascii?Q?LeITYunhQ/Z0TckJKPV86L0USwlmnbuQhTnGnUBn7V1mdrXEOc9wQ1NUG/xd?= =?us-ascii?Q?4cuy22Rv6yiOTVbBvLOySzG8TmxUPdP52CUssiPjJC1VnEuksg3+ZJC2XkdH?= =?us-ascii?Q?3w7HcEvEADBwwgX9ngkhH9PgHzS4XqI/enLi8S6Kfapg3Fp/araRfIyXKAY1?= =?us-ascii?Q?RbbMGlR99fj/4TtrLhtRf4uwolsF3eRk4worX/C656FA/6sZ6X0s/eFtAzNY?= =?us-ascii?Q?tW8I50Nk/1wuOIRE4NwR474HV95OrJ/99U92AyeKKm5aL5ogX7QSs9Fo0fbi?= =?us-ascii?Q?0mY22vgC0NcjiaaJ0HV6aXJhUlNXj++W4lioZtuWX73gwseXDrfBWuY0OfZz?= =?us-ascii?Q?W+oNePz6Y9MI5KH2I1JP6EibrzjTZJNlOHLFwK6jGNhHju8PYsJ50B6ZAmm9?= =?us-ascii?Q?1R8qjrzwnSdSbzry1K1YbCEBL2L+jost0NQSquCXrUqdDi6EXMndojLWbk3O?= =?us-ascii?Q?OMWIT13A7qnfCIMpZUtV2c4L6YCwuiwBwm4nyK7bJZCN0Py7Zb5Tcpt1pCA9?= =?us-ascii?Q?Tgka+yY4NhuccZg1hYwFwLRkZSwmBg4TSDBNxyFqA+PtHzweNC2B6qPVfCnc?= =?us-ascii?Q?SsgrnH83Be4P3GeNA8MPU0eeKQj6Kk2pKf99EiSsm6trsCvHGOH/EwCIrjiW?= =?us-ascii?Q?qG9WETaxPWcc9/bCipK0JfmHMOwQ/GcYzmhuXKKMTjIraC6e8dqdYLKqj2rO?= =?us-ascii?Q?Ap4W+xZTM29qurYoHuw+nI88H5OH9/0CvhlIs/7WWayWOLXQ18PFvhL8xOAz?= =?us-ascii?Q?XEDNaaxvbo81tiGWfyzPk79sruhIe+TEmkuQqfBN4bOyZgr/5YTT77tI859z?= =?us-ascii?Q?pWice2OjS9/qYgmv7k8g1e0W7/NHmf8yQ7aI0kI1pxHrv8QaXPwKKa4WftTs?= =?us-ascii?Q?pGgg3mSefTJ4gSBLtaUg5vaPKF4TrxHe5vO1fqX99fcm2Mok4h7A/cB+0fJd?= =?us-ascii?Q?V/PP0fJjhYQ0UsIvlIWt52cWv7gjyWBsft7SJgx0JIe6Nr56/cZtO8cXW8GR?= =?us-ascii?Q?IEsU6mms0I9LcITQdFxjgEZgUwpbDQOWz2e73idg?= Content-Type: multipart/alternative; boundary="_000_DS0PR02MB90787835F5B9CB9771A20329C4C09DS0PR02MB9078namp_" MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?us-ascii?Q?LLHNERfrb1q/YH9xmWNmk4NPb7w0N6sgD9eKbzzGItcmkDBhUATpaAEEicBQ?= =?us-ascii?Q?m6oSWkNNhhJKs9SfnBymjCn/1wbm/gjERwg7bp9vZdctmWHrAC+7QohnBtq7?= =?us-ascii?Q?+jv1QjjwakPVQxaqFmSLInkKSYVnUVNcRk7GtEMSgTwa9RxP5g3LOhgJUMEg?= =?us-ascii?Q?kwq4IyW2B7wrmCXubGc4lEQRlOVYSTWeJHOdr5E2SpqUDSSlQ/7b6HRFNmHD?= =?us-ascii?Q?u4VxlygRqq68UylI0ff3zdvYyos4+Y9Qpnej3zrc2QQAeRMNBdpATKFCvreS?= =?us-ascii?Q?vRDDcaIYPugbGwChns73pwE3SR0LXwpMzBIqLZNGGfGQ3YBv8zYzQkB35hxa?= =?us-ascii?Q?AlFob9ONhf6Ao2uhtpiOugHoAnk5MaWshsQw3pjENCXJQ2SUVwEhubL+qcAx?= =?us-ascii?Q?Y6qEB9+y6LzIls+n0W8SrMVJrRw/aW3HQJylOmsjxMTQXxS8gbeDTrHwTipC?= =?us-ascii?Q?Bowaaz/CZueuuCneZrAAoefBUgJ7000LA2FvwOa282m0xkbuaokFgvJrwwzu?= =?us-ascii?Q?jFoFOiPMaQQM8Xs+WuYp7WtIV64cbcsfjegqqOo2+fV4iCJh3azIkGUosREc?= =?us-ascii?Q?JSNi/xCBMJgiQNrXvswj2SQ47Y/dBnjc7NmJUvURBHlzvsHUai6Qol2YNBeF?= =?us-ascii?Q?X6G9GGoAj1/ycMBFUi6UtD69fF3U9ImTfxdtj8LIwWUBP6ewQs+CHANltoQ1?= =?us-ascii?Q?Xrt6X0pIZX7zjo2XrPGWwi7/p8up+UYxc22CPdWh16u3JKqmxxE+Xv99Xr/Q?= =?us-ascii?Q?YbUl1Avmxky3eFMsmyM9y777RQHEJaCC6xNwvv54XSYrfoInt+qAj6SGittN?= =?us-ascii?Q?GmcpnqKbYuK2HfhohZEa2TH8hpCrpuGqdN+H75F/Yi4rLx4/J2aFfYenS7ue?= =?us-ascii?Q?DdkWrCQOSvBDRxm9DYEaM6kxX/F3E0Arj7Pgo+bGGGfHPyVxjG3wsfXomd/R?= =?us-ascii?Q?1Ux+0wdZ771vha72kV4jkV/XzWyGjTVGE7i5BV61b1XMWFsoTM14whr7HA9E?= =?us-ascii?Q?+TIjd/06iTH3bXjtAVY11aeP/Dkhft3g0s0CLqXBpTCQ6AbQvm1sdd+GCVBY?= =?us-ascii?Q?itaezm04NsPydg7qnSFf6P7ctBxFSQ=3D=3D?= X-OriginatorOrg: quicinc.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DS0PR02MB9078.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f387d305-b3f6-4963-f13f-08daf6a2741f X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2023 02:44:41.9419 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 98e9ba89-e1a1-4e38-9007-8bdabc25de1d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: T55L2i6EvRaUwYksfvsZ3TPXt2arKG5FnCQyZ5iUGcnNuKKQYXoN8ov7T8ivbxNcDD6JpsWm7wrVgRkyDXwILA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR02MB7224 X-Proofpoint-GUID: SIB-PTaVUoznZaPkKQKi0RzEYxrFqxQC X-Proofpoint-ORIG-GUID: SIB-PTaVUoznZaPkKQKi0RzEYxrFqxQC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-14_10,2023-01-13_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 phishscore=0 mlxlogscore=632 malwarescore=0 spamscore=0 impostorscore=0 priorityscore=1501 clxscore=1011 adultscore=0 lowpriorityscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301150018 X-Rspamd-Queue-Id: B3F4CC0005 X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: 7rq8qoppwy7fakqe13rykzhdrd1mgx9c X-HE-Tag: 1673750700-328853 X-HE-Meta: U2FsdGVkX1/TAdILq24FkhjBn/iGCaSC4UC5CVkn7IzajAVCQO3gf2QKP6r9vCexirfxtBOyxxj3XuJH8z/H4sZRvz7FduPVLg3piP/ZahcXhE0FqUb03xx4cK7PaNFUjdt+qUfVsyE1yPdHIuOsNCldolVf9Y2kOzSP3rPsUMRbfntYqLaINvHIvIyAU9OmsltfUG8ql7TQ1hGY391VJIJjtSMG2RTGvIQkse8ICkLccLr/9X2ihJZdAzfDsnP/gSILNnL8wMucOMA3Ehcy18BBqoqejabZpgXNmrcoZGz48RkzjfZ/B2Pv5ermxpFkwhsW2h1r5o6Jeuac/bMumxgsuSsoX1QH8DSeJNi2sT9H4iTn+Q5qLzm9tnp1zQWTwQ/OwlCJQ5sPvwGZumm4ba20IcvaeAeBm1pfNjPuHxGFErLnPPrjIIigNj1+qTu9WjCMyyxyro3AkRIA/pMCYymbGeKCweHYuqpYe0PhAi1i1/Hv/HH0KXyVAHn5CbulkOWW7JVk4UZ/hRZFSOZ4VfWnfGw81+vL6h8iZPhSecd5hAGHd1RFnL6FlCzXHW3POf/2VLHHMwPxnyoLIVCKhbV9KjJecI6AdK2NzAHjQ9ZcHjIvaLtwqQRFBdORkPVcj//M48zUQMS9pXisLfNtspruFNiMmilKvolEXlhunMCliwL55PLeIUqERgCKdluRwzCG0pq5vwP0HB15PAUEp2uDJlbvhsVjT12z3H1HergXXEN33OzIR7Ohp8tvwOZGq7eUCUUrbXVBXUJzxgB92s7ZzPoGP7WqOOCasXK5zwnorJelDM86Otavm+AR/PUcFbkEquBnCRgQ7VdfqXPTbElwc2S8BmCuIpre+upVpR6AsqMTg2fBppYHzlsJQNliaIblbbKDTURMwpWl30yMHQf6H9QUez+C6rMqC9xFbCZmXfO5RckIiUNzTzLMqhBzEzOeShnPyW5eF7PN6bP Nn+mvWLd s4S5c4Qq47EtKVN6Q8L20nlXvORihSMGRr42LesxmkbEN0JF3g66II5vasnl1omzttQxdsVkIHIe1ZRo= 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: --_000_DS0PR02MB90787835F5B9CB9771A20329C4C09DS0PR02MB9078namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello all, We're from the Linux memory team here at Qualcomm. We are currently devisin= g a VM memory resizing feature where we dynamically inflate or deflate the = Linux VM based on ongoing memory demands in the VM. We wanted to propose fe= w details about this userspace daemon in form of RFC and wanted to know the= upstream's opinion. Here are few details - 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/r= emove memory. The VM (aka Secondary VM, SVM) will request for memory from t= he host which is Primary VM, PVM via the backend hypervisor which takes car= e of cross-VM communication. 2. This will be guest driver. This daemon will use PSI mechanism to monitor= memory pressure to keep track of memory demands in the system. It will reg= ister to few memory pressure events and make an educated guess on when dema= nd for memory in system is increasing. 3. Currently, min PSI window size is 500ms, so PSI monitor sampling period = will be 50ms. In order to get quick response time from PSI, we've reduced t= he min window size to 50ms so that as small as 5ms increase in memory press= ure can be reported to userspace by PSI. /* PSI trigger definitions */ -#define WINDOW_MIN_US 500000 /* Min window size is 500ms */ +#define WINDOW_MIN_US 50000 /* Min window size is 50ms */ 4. Detecting increase in memory demand - when a certain usecase starts in V= M that does memory allocations, it will stall causing PSI mechanism to gene= rate a memory pressure event to userspace. To simply put, when pressure inc= reases certain set threshold, it can make educated guess that a memory requ= iring usecase has ran and VM system needs memory to be added. 5. Detecting decrease in memory pressure - the reverse part where we give b= ack memory to PVM when memory is no longer needed is bit tricky. We look fo= r pressure decay and see if PSI averages (avg10, avg60, avg300) go down, an= d along with other memory stats (such as free memory etc) we make an educat= ed guess that usecase has ended and memory has been free'ed by the usecase,= and this memory can be given back to PVM when its no longer needed. 6. I'm skimming much on the logic and intelligence but the daemon relies on= PSI mechanism to know when memory demand is going up and down, and communi= cates with virtio-mem driver for hot-plugging/unplugging memory. We also fa= ctor in the latency involved with roundtrips between SVM<->PVM so we size t= he memory chuck that needs to be plugged-in accordingly. 7. The whole purpose of daemon using PSI mechanism is to make this si guest= driven rather than host driven, which currently is the case mostly with vi= rtio-mem users. The memory pressure and usage monitoring happens inside the= SVM and the SVM makes the decisions to request for memory from PVM. This a= voids any intervention such as admin in PVM to monitor and control the knob= s. We have also set max limit of how much SVMs can grow interms of memory, = so that a rouge VM would not abuse this scheme. This daemon is currently in just Beta stage now and we have basic functiona= lity running. We are yet to add more flesh to this scheme to make sure any = potential risks or security concerns are taken care as well. We would happy to know your opinions on such a scheme. Thanks and Regards, Sudarshan --_000_DS0PR02MB90787835F5B9CB9771A20329C4C09DS0PR02MB9078namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello all,

 

We’re from the Linux memory team here at Qualc= omm. We are currently devising a VM memory resizing feature where we dynami= cally inflate or deflate the Linux VM based on ongoing memory demands in th= e VM. We wanted to propose few details about this userspace daemon in form of RFC and wanted to know the upstream’= ;s opinion. Here are few details –

 

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 re= quest for memory from the host which is Primary VM, PVM via the backend hypervisor which takes care of cross-VM= communication.

 

2. This will be guest driver. This daemon will use P= SI mechanism to monitor memory pressure to keep track of memory demands in = the system. It will register to few memory pressure events and make an educ= ated guess on when demand for memory in system is increasing.

 

3. Currently, min PSI window size is 500ms, so PSI m= onitor sampling period will be 50ms. In order to get quick response time fr= om PSI, we’ve reduced the min window size to 50ms so that as small as= 5ms increase in memory pressure can be reported to userspace by PSI.

/* PSI trigger definitions */

-#define WINDOW_MIN_US 500000   /* Min win= dow size is 500ms */

+#define WINDOW_MIN_US 50000    /* Mi= n window size is 50ms */

 

4. Detecting increase in memory demand – when = a certain usecase starts in VM that does memory allocations, it will stall = causing PSI mechanism to generate a memory pressure event to userspace. To = simply put, when pressure increases certain set threshold, it can make educated guess that a memory requiring usecase = has ran and VM system needs memory to be added.

 

5. Detecting decrease in memory pressure – the= reverse part where we give back memory to PVM when memory is no longer nee= ded is bit tricky. We look for pressure decay and see if PSI averages (avg1= 0, avg60, avg300) go down, and along with other memory stats (such as free memory etc) we make an educated guess tha= t usecase has ended and memory has been free’ed by the usecase, and t= his memory can be given back to PVM when its no longer needed.

 

6. I’m skimming much on the logic and intellig= ence but the daemon relies on PSI mechanism to know when memory demand is g= oing up and down, and communicates with virtio-mem driver for hot-plugging/= unplugging memory. We also factor in the latency involved with roundtrips between SVM<->PVM so we size the me= mory chuck that needs to be plugged-in accordingly.

 

7. The whole purpose of daemon using PSI mechanism i= s to make this si guest driven rather than host driven, which currently is = the case mostly with virtio-mem users. The memory pressure and usage monito= ring happens inside the SVM and the SVM makes the decisions to request for memory from PVM. This avoids any in= tervention such as admin in PVM to monitor and control the knobs. We have a= lso set max limit of how much SVMs can grow interms of memory, so that a ro= uge VM would not abuse this scheme.

 

This daemon is currently in just Beta stage now and = we have basic functionality running. We are yet to add more flesh to this s= cheme to make sure any potential risks or security concerns are taken care = as well.

 

We would happy to know your opinions on such a schem= e.

 

Thanks and Regards,

Sudarshan

--_000_DS0PR02MB90787835F5B9CB9771A20329C4C09DS0PR02MB9078namp_--