On 27/08/2024 11:13 pm, Huang, Kai wrote:
+static inline bool sgx_can_reclaim_global(void) +{ + /* + * Now all EPC pages are still tracked in the @sgx_global_lru, so only + * check @sgx_global_lru. + * + * When EPC pages are tracked in the actual per-cgroup LRUs, + * replace with sgx_cgroup_lru_empty(misc_cg_root()). + */ + return !list_empty(&sgx_global_lru.reclaimable); +}Firstly, sgx_cgroup_lru_empty() is only introduced in the next patch, so it's wrong to mention it in the comment in _this_ patch. It's weird to add the above comment here in this patch anyway, since ...
With this comment moved to patch "x86/sgx: Revise global reclamation for EPC cgroups",
Reviewed-by: Kai Huang <[email protected]>

