Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1286646rwb; Thu, 22 Sep 2022 12:47:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7+ijz7Ot2l6dlIrRfWZDAwmo52sb7Xb30cf/efKPwIKgDMTBaI0g7PEUx0jw3DzafZb7ey X-Received: by 2002:a17:90a:fc96:b0:203:86f:5a86 with SMTP id ci22-20020a17090afc9600b00203086f5a86mr5456785pjb.108.1663876052018; Thu, 22 Sep 2022 12:47:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663876052; cv=none; d=google.com; s=arc-20160816; b=KlaxBGMciPJYLC6Sz5wEkrkRmzoHiIFywLvpoaSp6tQGfhDgCBi6UbTGztdY4c6LaF vn0aWnhfbafbSdm8ECgi7CIC5UomzF8Cg+q3fF6r477js6UeeXjmccpFg09+rX95wXcZ +c74j6yaz/wsIL+iHW3kCob13dPL/zjaONgcNdORTNNYw428Hv0oZN/H5EAxDO0sujAH D7uirGS9b387CVuE7FcltgUIrzhAstGkG3Oxlx/1a/gAFNiQq09dorZWQLrQK16TNgX7 pxgtuLm61lhnXu/XVD+mI+OQEc/uH2XfPlMFOe/q5CFY/9bYeLAJW1TAKaSeVamJN9zA 38Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=DvLvACHlAehE0+/VISWaqhZ6RLsIF/LLtwXH5V+If6Y=; b=u5XF181djsVfYayLJ2/NyxyBI6KL/Bhz74Ps07/rUDmswnnqy3CeM9Mt0MGG5K5Q8p 3zyF7792Z+pHH+DeuwMgmVyax0rWuwsO4TlUAwhYhYVeKeVj5rS8iifL4WFcbDXWxkgu yET4ZyrfDkEl+QCJ4qGzTT3PhEi9hhmSDLAnn2aL9FYxm5M8VErcQp3e4St+TboxoCYO +8ArYkU34CJC9CjQZsFm+GQiP33LY/wIoBmre57cKU8P3D2dS8QLSQ9arj1O9mNHmNHw mvn1qQpMDsVfhcvGrnOufl93lL7XKGQgLITUt8cr5xSL/Rcln8Xky8lEUCxrUnQgUzOm v/sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=I3mXtIhf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 27-20020a63155b000000b0041b7be8ef1csi6997069pgv.219.2022.09.22.12.47.18; Thu, 22 Sep 2022 12:47:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=I3mXtIhf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232273AbiIVTIJ (ORCPT + 99 others); Thu, 22 Sep 2022 15:08:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232294AbiIVTIF (ORCPT ); Thu, 22 Sep 2022 15:08:05 -0400 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38040100A81; Thu, 22 Sep 2022 12:08:03 -0700 (PDT) Received: by mail-pg1-x52e.google.com with SMTP id 78so10053856pgb.13; Thu, 22 Sep 2022 12:08:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date; bh=DvLvACHlAehE0+/VISWaqhZ6RLsIF/LLtwXH5V+If6Y=; b=I3mXtIhfq/vSa3NTg9CoLzXQ4wtZVzpkQp4NFGSLsGHabPDFNmdDQhjyHZNrA1OgTk pWJaRnAyD3Ifad+db9xlYczOmpeVFRVLSh2dfe6AKDry63Lg+WCDmv2K3GfmPfEv2beM XTNX3BXFx8VAYtLQpp5zpoPNdxyvFG41hNXWU/9IKYPzIG7jUdXAseS6TR+C1indYYr7 wEoZwGA7DkPFttTQ0hTeIAKJrzIrBrJEffyEU3na7PJUGkFqejc80iapPhMRAwyA8R9l xOBt/YBpqs9lfKSx0R3TmKlOGxft9wmmx7QupyLi+TNkgWF6HCbtudeBA4PnZlK3OxgF s3tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date; bh=DvLvACHlAehE0+/VISWaqhZ6RLsIF/LLtwXH5V+If6Y=; b=28UZ1UTc+SQBywy0g24VgNqZi8zRE+UKynZ8xN6ri0WTEVRPKA+p4utSuiW+GuAi+1 z8YY3/NICvum7x3D78gUNYAXVI3pNsPzEyd2azwcAlhRjALrFcsssrot6Ls9S8dxb8Av GdkOMPIQtPe8kRYDXXQiK2Wnpr0aZOptZRfBKeYcfaEFpYuMjB4YTVfOS5md8xQFxZlS YM4xL+t5UBi1xAip9saRikt7orpvI+yIVh9HLLXZGWokf4Q4NYDLgyNfhVkfBFolav2B 8w5IAkyUz0EiW//iAjom4CXZWWQ+Hz/+YXnjFSg5RnrsxJFX0UjlM6n4oa/1m7S2eK4W +qYA== X-Gm-Message-State: ACrzQf0Mpr6LC7K0QuoCtVJVQz/xPhQXHxyU/jTMJ2t5+/5K8iJ2Y6ow lSgMXcRYtdhKyM0oHK1S3K0= X-Received: by 2002:a05:6a00:1c98:b0:540:d461:f9d8 with SMTP id y24-20020a056a001c9800b00540d461f9d8mr5137009pfw.29.1663873683096; Thu, 22 Sep 2022 12:08:03 -0700 (PDT) Received: from localhost (2603-800c-1a02-1bae-a7fa-157f-969a-4cde.res6.spectrum.com. [2603:800c:1a02:1bae:a7fa:157f:969a:4cde]) by smtp.gmail.com with ESMTPSA id w190-20020a6282c7000000b0053b723a74f7sm4818105pfd.90.2022.09.22.12.08.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 12:08:02 -0700 (PDT) Sender: Tejun Heo Date: Thu, 22 Sep 2022 09:08:01 -1000 From: Tejun Heo To: Kristen Carlson Accardi Cc: linux-kernel@vger.kernel.org, linux-sgx@vger.kernel.org, cgroups@vger.kernel.org, Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song Subject: Re: [RFC PATCH 00/20] Add Cgroup support for SGX EPC memory Message-ID: References: <20220922171057.1236139-1-kristen@linux.intel.com> <4b8605533e5deade739249bfb341ab9c06d56a1e.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4b8605533e5deade739249bfb341ab9c06d56a1e.camel@linux.intel.com> X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Thu, Sep 22, 2022 at 11:59:14AM -0700, Kristen Carlson Accardi wrote: > Thanks for your question. The SGX EPC memory is a global shared > resource that can be over committed. The SGX EPC controller should be > used similarly to the normal memory controller. Normally when there is > pressure on EPC memory, the reclaimer thread will write out pages from > EPC memory to a backing RAM that is allocated per enclave. It is > possible currently for even a single enclave to force all the other > enclaves to have their epc pages written to backing RAM by allocating > all the available system EPC memory. This can cause performance issues > for the enclaves when they have to fault to load pages page in. Can you please give more concrete examples? I'd love to hear how the SGX EPC memory is typically used in what amounts and what's the performance implications when they get reclaimed and so on. ie. Please describe a realistic usage scenario of contention with sufficient details on how the system is set up, what the applications are using the SGX EPC memory for and how much, how the contention on memory affects the users and so on. Thank you. -- tejun