Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3876369rdg; Wed, 18 Oct 2023 08:26:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFxsKjyDKaDuRkcnfY3eXjYAaJfea7OQpN7CaxmRELXi7hTm6vTjj3ZTeF16oNQLzMXRvML X-Received: by 2002:a17:90a:d808:b0:27d:7ebe:2ee with SMTP id a8-20020a17090ad80800b0027d7ebe02eemr5229765pjv.39.1697642794992; Wed, 18 Oct 2023 08:26:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697642794; cv=none; d=google.com; s=arc-20160816; b=uVxP6vyuke8V9qem9S0FuhpiKJ5QfzAN1/tzIdRc+c8ohW2xf6JvwCjnWjXJ+OlSaD DEzs1tkhEAljaWcrBO5gP56u5rLNAse2IcvNh1k0JzIxDJfFtLJuRrULpSdrOiOt5o2A 0YR7RSITC/bJ7FeHp7eJuyeNFPM/mEYCSUZUrMPLh+3LI1ZNhwhvjn+6acMKoynzXY4d PJVDicjYE+beLMByj7MtsSCfFXK4d3209R4vGHZC4y75VnE4CgqoH4UoAU32nUMaF/um RXOrDaiOKj+WZfBV17xfkA2QrxssSrwxMfXXe+OqesfsiqPRqwlSDsqSqSLlOIa0B9Cn Asmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:message-id:organization :from:content-transfer-encoding:mime-version:date:references:subject :cc:to:dkim-signature; bh=P12KG+xrJkJbjxBYOXIylaMerAOSgHOs8hEdXuz/Yo4=; fh=C1Npj5tREJJA2IbYvJnDQMHy6o7E3Kp2+8sn/l/43zU=; b=AfgIeEbZONAwH3imxurjE5mdPLOlXkh9PThXDKvvbPc9m6POjnqibmWyZRmk8Xf4ME nyXFMM9vCN1N2sK9roITXYqpokwXg6GFbVVFAHlPvnBAvsAHNARxb5XULO4Gp4qj4FFH 5AVfpTGvJ5YcGzp3OID36skVJKnDEuIj3BcV1LbCudaG02u2w+ol+14GwKzeqMi/VUrh xSI5A0L0pi4mq0ckEWwDAb2sw9reWVzTSQvqY8ijiKaQ1bw1CD1z/8Lyq9Bt0zpzZUtm uM3L8jsRQoNf3ptQQX6huVmzig/vx/f1t6o6196HHMr+bYntBs+5WTZiiO8nSkZIzR6j jcSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="TA0KoY+/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id o18-20020a17090aac1200b00277387bc11dsi14470pjq.188.2023.10.18.08.26.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 08:26:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="TA0KoY+/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id B210880E0A51; Wed, 18 Oct 2023 08:26:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231792AbjJRP0X (ORCPT + 99 others); Wed, 18 Oct 2023 11:26:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230444AbjJRP0V (ORCPT ); Wed, 18 Oct 2023 11:26:21 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53E8EFA; Wed, 18 Oct 2023 08:26:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697642780; x=1729178780; h=to:cc:subject:references:date:mime-version: content-transfer-encoding:from:message-id:in-reply-to; bh=F6u+KBYcn7BYk4Z2evWe0eujHOmh6t8u43JwYuaW7sM=; b=TA0KoY+/vNeLGlzTqI+ZFfs7fuo5Yyppr7jVf7aG72+PEbgHK58gP1BD 2C3AsAmW0Sd/uW8ZVJ+9iJiGdD6jtn1GkcXZnsaP6/KN2aZJOXK6N8zIn FNU6pNdBdnE8whVJrj0P5JOZTD3gD2xF63hw9nPOo00pz2ZWbOBUPSZKy u6rJ2ltQ61IB/AK/Ukr8RjsaKeH45KWsy060SubbJzt5Vh9UfyDqalOX5 fTExhlJ1wZwg/Fo9jK92ADep4VNq+1yQLPsmJI8QH+iJJSmQwsJUdY8Wj XxDsBSCM8PUFJ9qas+rMmtESlyF9F1chuxl4ATsGA1zaHR2YJiW9Itq/t g==; X-IronPort-AV: E=McAfee;i="6600,9927,10867"; a="366293753" X-IronPort-AV: E=Sophos;i="6.03,235,1694761200"; d="scan'208";a="366293753" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2023 08:26:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10867"; a="756625348" X-IronPort-AV: E=Sophos;i="6.03,235,1694761200"; d="scan'208";a="756625348" Received: from hhuan26-mobl.amr.corp.intel.com ([10.92.17.92]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 18 Oct 2023 08:26:16 -0700 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: =?iso-8859-15?Q?Michal_Koutn=FD?= , "Dave Hansen" Cc: "Christopherson,, Sean" , "Huang, Kai" , "Zhang, Bo" , "linux-sgx@vger.kernel.org" , "cgroups@vger.kernel.org" , "yangjie@microsoft.com" , "dave.hansen@linux.intel.com" , "Li, Zhiquan1" , "linux-kernel@vger.kernel.org" , "mingo@redhat.com" , "tglx@linutronix.de" , "tj@kernel.org" , "anakrish@microsoft.com" , "jarkko@kernel.org" , "hpa@zytor.com" , "mikko.ylinen@linux.intel.com" , "Mehta, Sohil" , "bp@alien8.de" , "x86@kernel.org" , "kristen@linux.intel.com" Subject: Re: [PATCH v5 12/18] x86/sgx: Add EPC OOM path to forcefully reclaim EPC References: <1f7a740f3acff8a04ec95be39864fb3e32d2d96c.camel@intel.com> <631f34613bcc8b5aa41cf519fa9d76bcd57a7650.camel@intel.com> <35a7fde056037a40b3b4b170e2ecd45bf8c4ba9f.camel@intel.com> <915907d56861ef4aa7f9f68e0eb8d136a60bee39.camel@intel.com> <6lrq4xmk42zteq6thpyah7jy25rmvkp7mqxtll6sl7z62m7n4m@vrbbedtgxeq4> <11413ca0-a8a9-4f73-8006-2e1231dbb390@intel.com> Date: Wed, 18 Oct 2023 10:26:15 -0500 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Haitao Huang" Organization: Intel Message-ID: In-Reply-To: <11413ca0-a8a9-4f73-8006-2e1231dbb390@intel.com> User-Agent: Opera Mail/1.0 (Win32) X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 18 Oct 2023 08:26:32 -0700 (PDT) On Wed, 18 Oct 2023 08:55:12 -0500, Dave Hansen wrote: > On 10/17/23 21:37, Haitao Huang wrote: >> Yes we can introduce misc.reclaim to give user a knob to forcefully >> reducing usage if that is really needed in real usage. The semantics >> would make force-kill VMs explicit to user. > > Do any other controllers do something like this? It seems odd. Maybe not in sense of killing something. My understanding memory.reclaim does not necessarily invoke the OOM killer. But what I really intend to say is we can have a separate knob for user to express the need for reducing the current usage explicitly and keep "misc.max' non-preemptive semantics intact. When we implement that new knob, then we can define what kind of reclaim for that. Depending on vEPC implementation, it may or may not involve killing VMs. But at least that semantics will be explicit for user. Thanks Haitao