Re: sgx_reclaimer_write() refinement

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

 



On Fri, Aug 23, 2019 at 10:15:46PM +0300, Jarkko Sakkinen wrote:
> On Fri, Aug 23, 2019 at 10:08:09PM +0300, Jarkko Sakkinen wrote:
> > It would greatly reduce the complexity of the flow. Would be much easier
> > to do fallback code paths. We have three trial EWB approach, which
> > should prevent already unnecesaary ETRACK's and IPI's.
> 
> I recall that I used a cluster ages ago to do minimize ETRACK's and
> IPI's. I implemented three trial EWB during the Spring 2018 when the
> reclaimer code was heavily refined but failed to notice that it rendered
> cluster's meaningless...

One potential caveat here: EBLOCK's could never sequence before ETRACK
with a single thread.

However, the existing code does work in parallel already i.e. there can
be multiple sgx_alloc_page() calls on different going on. This change
would make sgx_alloc_page() success or fail (in the rare case of no
pages to swap) always in constant time and these would group naturally
behind ETRACK's.

What I would do for the reclaimer thread would be to convert it from a
kthread to a multi-threaded work queue (albeit even current single
threaded approach might work reasonably well as it goes in parallel with
the sgx_alloc_page() calls).

/Jarkko



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

  Powered by Linux