Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp309905rdg; Thu, 12 Oct 2023 06:28:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF66hZsnaMLhhC/89y45DeDX0weQuhHvPgOVoWLp1qynydUYvoQMaIIxNyb4XGAtZQb/naA X-Received: by 2002:a05:6358:4406:b0:13a:a85b:a4dc with SMTP id z6-20020a056358440600b0013aa85ba4dcmr30249530rwc.29.1697117300994; Thu, 12 Oct 2023 06:28:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697117300; cv=none; d=google.com; s=arc-20160816; b=m/tujZ1qRjS8DQUgHcRuQ1kGgS8XZxSoxCEWiryt/fTxFgSOvjEyUk3HbkFuvikXuP EzsGKde1Cau+hWILvziCIwyI6+V4iVdeX6uZx54j2UhoQtlYiSW3mbqyJF/Dtv1uRrqZ G6spUfSPqhiTnqNiT3G4Dm9sbT2+azdrzhQa6e8IDKkrPELSZAMweVJTAmouv8dcOKf+ TsxB2Pp7GupmSKe6bQVUsftGdU3+IVsA3BGAQPJJ0ptF/uC/zJ8bZnMDi7FYMqjAYjVK YJC9YIl7o9XzY584HkWcqIYl5DRr6/BkQs/rmeJ9UlHQixRQFrMbzI3fVl4DTdgm0Bul ktgw== 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=s2qwMJibK3sKmQIqv+QNaeVxp64HpKgxPUJGGyXLga0=; fh=BrG4V6GIh432FGJbIp5V6sKlECnZ0t8xonlPv3nXmcU=; b=AaSFKej3o3phTJB2PtWeMexbmiVl7L3Qc8iCeMH4k+C7WfE/ROUsnUP0BsfQ6lW0cu SpvtfUmCNXubtQtA4SwTihNWxfnhqvXOmOUY3I5d2UK+VswlubMbYsGc0ooQe7mXt8m2 d+p+CIuGdLtKNCEc2dCEE5Oehgv41TpEPUeWa3zUcsZcIKlxXOxYqBNx0Yn+hByWeOaz vN7Xwg+MNIvKWQUFUXL/216nhGKPSWIleHaX94PNxaw7yKMuKGRIy/CxfKpYd/kje0sh 1YvhqItstYoEhyAGBKwkSrcifZlPo2qmcBUGpWabSNH5hJ16MnO1Yv5z2+AHZuyinvQX qjcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Yn0JRNdd; 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 u13-20020a056a00098d00b006901a3cc55csi15599139pfg.180.2023.10.12.06.28.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 06:28:20 -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=Yn0JRNdd; 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 8F3FC8112A8A; Thu, 12 Oct 2023 06:28:18 -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 S1378354AbjJLN2J (ORCPT + 99 others); Thu, 12 Oct 2023 09:28:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343952AbjJLN2I (ORCPT ); Thu, 12 Oct 2023 09:28:08 -0400 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5813CF; Thu, 12 Oct 2023 06:28:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697117287; x=1728653287; h=to:cc:subject:references:date:mime-version: content-transfer-encoding:from:message-id:in-reply-to; bh=Gy2okrDMRW3GgiY3/crBu9Q7pncM9KlkB5/NL5Quijg=; b=Yn0JRNdd++zjwRyPCUWgitTdkYMA8iYhHwh8VR4paQm5ypD1k8s4AWc3 MVc/wS1//p7hTOMDKVHAZbBIRSj9jtoLYNnXdRnLkwhukohiF9lVLaPXe tIF+UxaEx3KNBI0HU779It8pq5zzE78WwgZIiHsnhnfMRY5tLIcGfZtFc OvpR5mq9rwMM+yd0XRdX+4Svu35ER/lgBPruXrOoQRLOWmCosIOyDi9+3 +0jIuJcesMFhU/8/ZU9k2d605WM9JsUj6zbQIWFThULnsPDC66OdmFkJt AoDmsDsRg+vplPUJg2DduWf+DS7+Sgc3cwhfUx4LC6nV2e+QWiYD/AlJC g==; X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="3521942" X-IronPort-AV: E=Sophos;i="6.03,219,1694761200"; d="scan'208";a="3521942" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2023 06:27:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="927987468" X-IronPort-AV: E=Sophos;i="6.03,219,1694761200"; d="scan'208";a="927987468" Received: from hhuan26-mobl.amr.corp.intel.com ([10.92.96.100]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 12 Oct 2023 06:27:39 -0700 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: "Christopherson,, Sean" , "Huang, Kai" Cc: "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: <20230923030657.16148-1-haitao.huang@linux.intel.com> <20230923030657.16148-13-haitao.huang@linux.intel.com> <1b265d0c9dfe17de2782962ed26a99cc9d330138.camel@intel.com> <06142144151da06772a9f0cc195a3c8ffcbc07b7.camel@intel.com> <1f7a740f3acff8a04ec95be39864fb3e32d2d96c.camel@intel.com> <631f34613bcc8b5aa41cf519fa9d76bcd57a7650.camel@intel.com> Date: Thu, 12 Oct 2023 08:27:37 -0500 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Haitao Huang" Organization: Intel Message-ID: In-Reply-To: <631f34613bcc8b5aa41cf519fa9d76bcd57a7650.camel@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]); Thu, 12 Oct 2023 06:28:18 -0700 (PDT) On Tue, 10 Oct 2023 19:51:17 -0500, Huang, Kai wrote: [...] > (btw, even you track VA/SECS pages in unreclaimable list, given they > both have > 'enclave' as the owner, do you still need SGX_EPC_OWNER_ENCL and > SGX_EPC_OWNER_PAGE ?) Let me think about it, there might be also a way just track encl objects not unreclaimable pages. I still not get why we need kill the VM not just remove just enough pages. Is it due to the static allocation not able to reclaim? If we always remove all vEPC pages/kill VM, then we should not need track individual vepc pages. Thanks Haitao