Re: [PATCH v3 3/7] mm/lru: replace pgdat lru_lock with lruvec lock
From: Alex Shi
Date: Tue Nov 19 2019 - 05:14:42 EST
>
>>>> As your concern for a 'new' caller, since __split_huge_page is a static helper here, no distub for anyothers.
>>> Even though it's static, there may be other callers within the same file.
>>> Or somebody may decide to make it non-static in the future. I think it's
>>> actually clearer to keep the irqflags as a separate parameter.
>>>
>>
>> But it's no one else using this function now. and no one get disturb, right? It's non sense to consider a 'possibility' issue.
>
> It is not nonsense to consider the complexity of the mm! Your patch makes
> it harder to understand unnecessarily. Please be considerate of the other
> programmers who must build on what you have created.
>
I believe the 'flags' parameter are using __split_huge_page is just for irqsave/restore of lru_lock, so move it into lruvec should be reduce the parameter jumping in caller/callee.
But in another side, the flags opitimze isn't close related with lru_lock change, and better to be split out.
So thanks for your comments, I will remove this part for this patchset.
Thanks!
Alex