2) For on-demand synchronous reclamation, sgx_cgroup_try_charge() needs
to invoke the per-cgroup reclamation until the cgroup usage become
"become" -> "becomes"
+/*
+ * Return the next descendant in a preorder walk, given a root, @root and a
+ * cgroup, @cg, to start the walk from. Return @root if no descendant left for
+ * this walk, Otherwise, return next descendant and has its refcnt incremented.
"," -> "." before the "Otherwise".
"has its refcnt ..." -> "have its refcnt ...",
Or, "return ... with its refcnt ..." (which is better I guess).
+ */
+static struct sgx_cgroup *sgx_cgroup_next_descendant_pre(struct sgx_cgroup *root,
+ struct sgx_cgroup *cg)
+{
Reviewed-by: Kai Huang <kai.huang@xxxxxxxxx>