lkml.org 
[lkml]   [2022]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v2 1/2] x86/sgx: Add accounting for tracking overcommit
    From
    Date
    On Fri, 2022-01-07 at 10:46 -0800, Dave Hansen wrote:
    > On 1/7/22 10:16, Kristen Carlson Accardi wrote:
    > > The overcommit percentage value is 150, which limits the total
    > > number of
    > > shared memory pages that may be consumed by all enclaves as backing
    > > pages
    > > to 1.5X of EPC pages on the system.
    >
    > Hi Kristen,
    >
    > Could you give some background on how this value was chosen and how
    > it
    > might impact userspace?

    Yes,
    The value of 1.5x the number of EPC pages was chosen because it will
    handle the most common case of a few enclaves that don't need much
    overcommit without any impact to user space. In the less commone case
    where there are many enclaves or a few large enclaves which need a lot
    of overcommit due to large EPC memory requirements, the reclaimer may
    fail to allocate a backing page for swapping if the limit has been
    reached. In this case the page will not be able to be reclaimed and the
    system will not be able to allocate any new EPC pages. Any ioctl or
    call to add new EPC pages will get -ENOMEM, so for example, new
    enclaves will fail to load, and new EPC pages will not be able to be
    added.

    Does that make sense?

    Kristen


    \
     
     \ /
      Last update: 2022-01-07 20:16    [W:2.169 / U:0.700 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site