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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61558C4332F for ; Mon, 14 Nov 2022 22:38:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236809AbiKNWiO (ORCPT ); Mon, 14 Nov 2022 17:38:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233300AbiKNWiM (ORCPT ); Mon, 14 Nov 2022 17:38:12 -0500 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C52517AB2; Mon, 14 Nov 2022 14:38:11 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id p12so11459938plq.4; Mon, 14 Nov 2022 14:38:11 -0800 (PST) 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:message-id :reply-to; bh=JaW/R8iCCS/1A9BRN+LwDCOTY1xF4tsj+qzK35G6lZo=; b=Du8ZgVPp1AWEAef+8v0/Eoa/chpMPJcieUAPGH8sq0fGNMyoeliA2PAtXVrauYlDze l7TMbcvmc0PivKE+xSYRMj9EgfCxVDwWln8ZmZjTZQ+5gQIMomP8cQnLLnpb95htQAqj FjfXo6JxllvkuUdDkm+lGbsWLqdWI85x5JU7eVDIt+A19yqGA0T0U/x9PhZmkX6ly6HS M89z53VsSzEN1gIiVQNvWb9nV56EEl+oyUu+3s4mPsM3twqjZHepWNcwKJC0mHH0ifax wrrUwqxlVTpfQhTpIulQnO1RDPDRCle7oJMCeYrXSibwot30ousvSP+0Jk1rgln0LUHD y0wA== 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:message-id:reply-to; bh=JaW/R8iCCS/1A9BRN+LwDCOTY1xF4tsj+qzK35G6lZo=; b=H7WfudgKgZxpdNXnBa3DrId98Q5t2aSZeIzLQAGnn8KAjR8eqBnSZr7gsHK+r3QLMy CEK0bWNThAbEWGn2ySAqAiIrzXfgvUCNVaHo0bJHwSxAK2knjFehoAOp+ejWYnZ9bmpT JdQzg8BLjhs8CMyKr1ibBuXfaU0sBWsx/TVtRiGO7ZYfxRX+gyiLpC2nhszFRgM/W3BF UCym5KZG5bXj1O9kOjDErNMBgrvOTd1OkHO41NsuxcjT7815Ygb39qWIbpVsb8Va9D1r QTU5MrLOYHtdPgWiHBP5Iuu1qXcujnEkiSkWf77ty1SgEq8rrHao58MdRRrAG9lkolkK y4lQ== X-Gm-Message-State: ANoB5pnKX6FTr1oa5Qana9BT1ETx1Rh9tiPwqg7qwIRXp/V2fISOjrnx oH++07pYRZRPIryYJItIMLI= X-Google-Smtp-Source: AA0mqf45mjyLWSp3OLd3HxD0VWWQ807WLHhoje31zIpehijz58V7J05xH0InkmKmt5vo/0NokAcf+Q== X-Received: by 2002:a17:90b:3d10:b0:212:ed36:fc74 with SMTP id pt16-20020a17090b3d1000b00212ed36fc74mr15995820pjb.172.1668465490674; Mon, 14 Nov 2022 14:38:10 -0800 (PST) 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 f15-20020a62380f000000b0056c360af4e3sm7235733pfa.9.2022.11.14.14.38.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Nov 2022 14:38:10 -0800 (PST) Sender: Tejun Heo Date: Mon, 14 Nov 2022 12:38:09 -1000 From: Tejun Heo To: Kristen Carlson Accardi Cc: jarkko@kernel.org, dave.hansen@linux.kernel.org, linux-kernel@vger.kernel.org, linux-sgx@vger.kernel.org, cgroups@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , zhiquan1.li@intel.com, Sean Christopherson Subject: Re: [PATCH 25/26] x86/sgx: Add support for misc cgroup controller Message-ID: References: <20221111183532.3676646-1-kristen@linux.intel.com> <20221111183532.3676646-26-kristen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221111183532.3676646-26-kristen@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 11, 2022 at 10:35:30AM -0800, Kristen Carlson Accardi wrote: > Implement support for cgroup control of SGX Enclave Page Cache (EPC) > memory using the misc cgroup controller. EPC memory is independent > from normal system memory, e.g. must be reserved at boot from RAM and > cannot be converted between EPC and normal memory while the system is > running. EPC is managed by the SGX subsystem and is not accounted by > the memory controller. > > Much like normal system memory, EPC memory can be overcommitted via > virtual memory techniques and pages can be swapped out of the EPC to > their backing store (normal system memory, e.g. shmem). The SGX EPC > subsystem is analogous to the memory subsytem and the SGX EPC controller > is in turn analogous to the memory controller; it implements limit and > protection models for EPC memory. > > The misc controller provides a mechanism to set a hard limit of EPC > usage via the "sgx_epc" resource in "misc.max". The total EPC memory > available on the system is reported via the "sgx_epc" resource in > "misc.capacity". > > This patch was modified from its original version to use the misc cgroup > controller instead of a custom controller. > > Signed-off-by: Sean Christopherson > Signed-off-by: Kristen Carlson Accardi > Cc: Sean Christopherson This looks fine from cgroup POV. Thanks. -- tejun