lkml.org 
[lkml]   [2022]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 10/18] x86/sgx: Add option to ignore age of page during EPC reclaim
    On Fri, Dec 02, 2022 at 10:36:46AM -0800, Kristen Carlson Accardi wrote:
    > From: Sean Christopherson <sean.j.christopherson@intel.com>
    >
    > Add a flag to sgx_reclaim_pages() to instruct it to ignore the age of
    > page, i.e. reclaim the page even if it's young. The EPC cgroup will use
    > the flag to enforce its limits by draining the reclaimable lists before
    > resorting to other measures, e.g. forcefully reclaimable "unreclaimable"
    > pages by killing enclaves.
    >
    > Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
    > Signed-off-by: Kristen Carlson Accardi <kristen@linux.intel.com>
    > Cc: Sean Christopherson <seanjc@google.com>
    > ---
    > arch/x86/kernel/cpu/sgx/main.c | 46 +++++++++++++++++++++-------------
    > 1 file changed, 29 insertions(+), 17 deletions(-)
    >
    > diff --git a/arch/x86/kernel/cpu/sgx/main.c b/arch/x86/kernel/cpu/sgx/main.c
    > index a4a65eadfb79..db96483e2e74 100644
    > --- a/arch/x86/kernel/cpu/sgx/main.c
    > +++ b/arch/x86/kernel/cpu/sgx/main.c
    > @@ -31,6 +31,10 @@ static DEFINE_XARRAY(sgx_epc_address_space);
    > * with sgx_global_lru.lock acquired.
    > */
    > static struct sgx_epc_lru_lists sgx_global_lru;

    Please, separate these by an empty line.

    > +static inline struct sgx_epc_lru_lists *sgx_lru_lists(struct sgx_epc_page *epc_page)
    > +{
    > + return &sgx_global_lru;
    > +}

    Should be named by the thing it returns, not by the type.

    BR, Jarkko

    \
     
     \ /
      Last update: 2022-12-08 10:38    [W:5.100 / U:0.748 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site