Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2503692rdh; Sun, 26 Nov 2023 08:32:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IGkltYUN57MemKkckp79pvEO6qiCtBysf4cGJiO/JVXBNGeJ2YTspEDEOxjY6r9KbEXzcF0 X-Received: by 2002:a05:6808:dde:b0:3b8:5df8:be90 with SMTP id g30-20020a0568080dde00b003b85df8be90mr4842534oic.53.1701016353475; Sun, 26 Nov 2023 08:32:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701016353; cv=none; d=google.com; s=arc-20160816; b=ZEiBbDnc0qwPTI011gAJJJik5tIalpBAoDQPeY+aZ5Z+TsRtSbluwWtMES7okd+Vxa af2FeLdXEjwDga/i3OaAFvH80M8auBGDT8QMNujOUbMvU5fePBmvUXGExBEA5uZ7sSFM DVkog1h5sQf2dcighfEzTn2RqCmzf6UPnHeWDNZda8iMViVf90HSP+Fk/f/G/7H1qnBi hPSjr2+X9MKRQKKDDs8RewxbOHJHAGysyxNO8MSBRjN+jnLcEBsSTN1JFZ4yb6B6t9ju a30IQVyCVLh5TiK2HYQJeX1DfI9UUaL2H0VCFGjEoo2xlq4/VT9xnfq5Fr9t5USq6fb1 Bm6w== 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=0NTqIuZ8BXk5yT6vweEB29SEDr0Y15U9efNRsybmfL8=; fh=q8ECXeXtdi6mRF1FjsCAucbd4hOHw0iqGeABCmo8hck=; b=Pa3OJonV+fB+vsNa4gOmiDIFhAyB9AVoP34d8u92nzgX6BvQl/p116+HhWgbbV6+Nv knjiF+CwQwN+GjffYJis7/W0SRRhIEK3h7Y8IrA/YG7yNFzaieOQVREQsqoFuWV/1rVk M530d+4fofBIhJl6zaEa7I6MnkZD5gIskAtvlTpFMl5e+40GhCu++lRRdSXLBSIF25xZ Uv2ueA7nKhWmNxos0INewJWGuPdI8Ls2cKQeVf1O63qeSUjn+QrIV+1LBir3WP4DftBJ Y0hr+bmFR3zL0Hf80QaBGApTvAccRLd/BLp8GKQIE5YFe+tPUWxbZqJrvn8RYasN8NYJ H1tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Af+UlocV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id n18-20020a634d52000000b0055fd1bfb109si7593378pgl.679.2023.11.26.08.32.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 08:32:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Af+UlocV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 143F88080E17; Sun, 26 Nov 2023 08:32:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229562AbjKZQcQ (ORCPT + 99 others); Sun, 26 Nov 2023 11:32:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjKZQcP (ORCPT ); Sun, 26 Nov 2023 11:32:15 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC20FE3; Sun, 26 Nov 2023 08:32:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701016341; x=1732552341; h=to:cc:subject:references:date:mime-version: content-transfer-encoding:from:message-id:in-reply-to; bh=C1szmEvCxxp64F0iuaAQ1E2knC5KLnUYXFCFe3nV1KE=; b=Af+UlocVkTSShDLcOqH+0uPkMMSYGUT7uX1irolSvU5z9rp6qUjSh3Ae 4yRFA1Yy/tfC2BsN4cK8xmdfWmmbwJeIzy8jVH1OoJ+sQH7jjVR+JG909 I2zt80PmbKi8orFeCdGoneMAfRMEic5RLjvV08dgkZPmjv+qcUhXETwsQ t1ehA+QUQ61tGWQPtR3SaQB7fU33VqqwI8ZtGCn00gW+T58hepUOf1mZ1 x4fcz5zGmTp/mYIghGQXhkTCAXFfQwT/R9ixJMITyXNulM19XgfzITaf3 DM0kpI2SRtEwrhFa5dqpSSXNkCjoTIO75t6dHRPJFpHUktlq+2mbgwM4+ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10906"; a="377624607" X-IronPort-AV: E=Sophos;i="6.04,229,1695711600"; d="scan'208";a="377624607" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2023 08:32:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,229,1695711600"; d="scan'208";a="9407085" Received: from hhuan26-mobl.amr.corp.intel.com ([10.124.112.56]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 26 Nov 2023 08:32:16 -0800 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: "tj@kernel.org" , "jarkko@kernel.org" , "x86@kernel.org" , "dave.hansen@linux.intel.com" , "cgroups@vger.kernel.org" , "hpa@zytor.com" , "mingo@redhat.com" , "linux-kernel@vger.kernel.org" , "mkoutny@suse.com" , "tglx@linutronix.de" , "linux-sgx@vger.kernel.org" , "Mehta, Sohil" , "bp@alien8.de" , "Huang, Kai" , "Haitao Huang" Cc: "mikko.ylinen@linux.intel.com" , "seanjc@google.com" , "Zhang, Bo" , "kristen@linux.intel.com" , "yangjie@microsoft.com" , "sean.j.christopherson@intel.com" , "Li, Zhiquan1" , "anakrish@microsoft.com" Subject: Re: [PATCH v6 04/12] x86/sgx: Implement basic EPC misc cgroup functionality References: <20231030182013.40086-1-haitao.huang@linux.intel.com> <20231030182013.40086-5-haitao.huang@linux.intel.com> <34a337b96a5a917612c4ec4eff2b5a378c21879b.camel@intel.com> Date: Mon, 27 Nov 2023 00:32:14 +0800 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Haitao Huang" Organization: Intel Message-ID: In-Reply-To: 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,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Sun, 26 Nov 2023 08:32:31 -0800 (PST) On Mon, 27 Nov 2023 00:01:56 +0800, Haitao Huang wrote: >>> > > > > Then here we can have something like: >>> > > > > >>> > > > > void sgx_reclaim_pages(struct sgx_epc_cg *epc_cg) >>> > > > > { >>> > > > > struct sgx_epc_lru_list *lru = epc_cg ? &epc_cg->lru : >>> > > > > &sgx_global_lru; >>> > > > > >>> > > > > sgx_reclaim_pages_lru(lru); >>> > > > > } >>> > > > > >>> > > > > Makes sense? >>> > > > > > > The reason we 'isolate' first then do real 'reclaim' is that the actual > reclaim is expensive and especially for eblock, etrack, etc. Sorry this is out of context. It was meant to be in the other response for patch 9/12. Also FYI I'm traveling for a vacation and email access may be sporadic. BR Haitao