Re: [PATCH v3 03/28] x86/sgx: Add 'struct sgx_epc_lru_lists' to encapsulate lru list(s)

From: Haitao Huang
Date: Mon Jul 31 2023 - 16:35:48 EST


On Mon, 24 Jul 2023 18:31:58 -0500, Huang, Kai <kai.huang@xxxxxxxxx> wrote:

...
> Although briefly mentioned in the first patch, it would be better to put
> more
> background about the "reclaimable" and "non-reclaimable" thing here,
> focusing on
> _why_ we need multiple LRUs (presumably you mean two lists: reclaimable
> and non-
> reclaimable).
>
Sure I can add a little more background to introduce the
reclaimable/unreclaimable concept. But why we need multiple LRUs would be
self-evident in later patches, not sure I will add details here.

In this case people will need to go to that patch to get some idea first. It
doesn't seem hurt if you can explain why you need multiple LRUs here first.

Will add.

...

I didn't get the CHECK in my testing. Not sure why.

Anyway, I guess the comment can be useful if it is to explain why we need to use
spinlock or whatever lock. But

/* Must acquire this lock to access */

doesn't explain why at all, thus doesn't look helpful to me.

I guess you either need a better comment, or just remove it (it's obvious that a
lot of kernel code doesn't have a comment around spinlock_t).


I'll remove the comments.
Thanks
Haitao