Re: [PATCH v18 15/32] mm/lru: move lock into lru_note_cost

From: Alex Shi
Date: Mon Sep 21 2020 - 23:41:17 EST




在 2020/9/22 上午6:03, Hugh Dickins 写道:
>> Acked-by: Hugh Dickins <hughd@xxxxxxxxxx>
>>
>> In your lruv19 github tree, you have merged 14/32 into this one: thanks.
> Grr, I've only just started, and already missed some of my notes.
>
> I wanted to point out that this patch does introduce an extra unlock+lock
> in shrink_inactive_list(), even in a !CONFIG_MEMCG build. I think you've
> done the right thing for now, keeping it simple, and maybe nobody will
> notice the extra overhead; but I expect us to replace lru_note_cost()
> by lru_note_cost_unlock_irq() later on, expecting the caller to do the
> initial lock_irq().
>
> lru_note_cost_page() looks redundant to me, but you're right not to
> delete it here, unless Johannes asks you to add that in: that's his
> business, and it may be dependent on the XXX at its callsite.
>

Thanks for comments! And got your point. so I will leave this patch alone.

Thanks!