Re: [PATCH RFC] x86/sgx: Convert sgx_reclaim_pages() to sgx_reclaim_page()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 26, 2019 at 06:27:32PM -0700, Sean Christopherson wrote:
> On Mon, Aug 26, 2019 at 09:33:23AM +0300, Jarkko Sakkinen wrote:
> > Convert sgx_reclaim_pages() to sgx_reclaim_page(), which reclaims only a
> > signle page and returns it back to the caller instead of freeing it.
> > 
> > A simpler flow will allow also simplify sgx_alloc_page() flow and make it
> > constant time. With this change it is easer to pin backing storage before
> 
> Nit: it doesn't run in constant time, its upper bound is simply lower.

Not diving into this discussion but point taken :-)

> > the pages are blocked, which stabilizes the EBLOCK/EWB/ETRACK flow: only an
> > EPCM conflict could cause a EWB to fail.
> > 
> > Because sgx_alloc_page() operations run in parallel on different threads
> > ETRACK's will still group multiple EBLOCK operations. ksgxswapd can be
> > improved in future with multi-threading (e.g.a work queue).
> 
> I won't be able to give this a thorough review for a few days due to other
> tasks.  We should definitely do some rudimentary performance testing given
> the potential impact.

This is enough of review for me at this point. Hold on for the 2nd
version. I'll rework ksgxswapd for that and generally take this small
step further. Even if this would not turn out to be a success story I
think it is definitely worth of investigating so that we *know* that we
are doing right things right.

/Jarkko



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux