Re: [PATCH v5 15/18] x86/sgx: Prepare for multiple LRUs

2023-10-05 Thread Huang, Kai
On Thu, 2023-10-05 at 14:33 -0500, Haitao Huang wrote: > On Thu, 05 Oct 2023 07:30:46 -0500, Huang, Kai wrote: > > > On Fri, 2023-09-22 at 20:06 -0700, Haitao Huang wrote: > > > +static inline struct sgx_epc_lru_lists *sgx_lru_lists(struct > > > sgx_epc_page *epc_page) > > > +{ > > > + return &

Re: [PATCH v5 15/18] x86/sgx: Prepare for multiple LRUs

2023-10-05 Thread Haitao Huang
On Thu, 05 Oct 2023 07:30:46 -0500, Huang, Kai wrote: On Fri, 2023-09-22 at 20:06 -0700, Haitao Huang wrote: +static inline struct sgx_epc_lru_lists *sgx_lru_lists(struct sgx_epc_page *epc_page) +{ + return &sgx_global_lru; +} + +static inline bool sgx_can_reclaim(void) +{ + retu

Re: [PATCH v5 15/18] x86/sgx: Prepare for multiple LRUs

2023-10-05 Thread Huang, Kai
On Fri, 2023-09-22 at 20:06 -0700, Haitao Huang wrote: > +static inline struct sgx_epc_lru_lists *sgx_lru_lists(struct sgx_epc_page > *epc_page) > +{ > + return &sgx_global_lru; > +} > + > +static inline bool sgx_can_reclaim(void) > +{ > + return !list_empty(&sgx_global_lru.reclaimable); >