lkml.org 
[lkml]   [2022]   [Jan]   [14]   [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 Tue, 2022-01-11 at 09:39 -0800, Dave Hansen wrote:
> On 1/11/22 08:33, Haitao Huang wrote:
> > On Tue, 11 Jan 2022 09:43:35 -0600, Dave Hansen <
> > dave.hansen@intel.com>
> > wrote:
> > > On 1/11/22 06:20, Haitao Huang wrote:
> > > > If the system has a ton of RAM but limited EPC, I think it
> > > > makes
> > > > sense to allow more EPC swapping, can we do min(0.5*RAM,
> > > > 2*EPC)?
> > > > I suppose if the system is used for heavy enclave load, user
> > > > would be
> > > > willing to at least use half of RAM.
> > >
> > > If I have 100GB of RAM and 100MB of EPC, can I really
> > > *meaningfully*
> > > run 50GB of enclaves? In that case, if everything was swapped
> > > out
> > > evenly, I would only have a 499/500 chance that a given page
> > > reference
> > > would fault.
> >
> > The formula will cap swapping at 2*EPC so only 200MB swapped out.
> > So
> > the miss is at most 1/3.
> > The original hard coded cap 1.5*EPC may still consume too much RAM
> > if
> > RAM<1.5*EPC.
>
> Oh, sorry, I read that backwards.
>
> Basing it on the amount of RAM is a bit nasty. You might either
> really
> overly restrict the amount of allowed EPC, or you have to handle
> hotplug.

My opinion is that we should keep the current algorithm for now as it
is pretty straightforward, and cgroups will eventually allow for more
control.


\
 
 \ /
  Last update: 2022-01-14 18:46    [W:0.046 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site