Re: [PATCH 06/10] list_lru: Pass dst_memcg argument to memcg_drain_list_lru_node()

From: Kirill Tkhai
Date: Mon Mar 26 2018 - 11:30:39 EST


On 24.03.2018 22:32, Vladimir Davydov wrote:
> On Wed, Mar 21, 2018 at 04:22:10PM +0300, Kirill Tkhai wrote:
>> This is just refactoring to allow next patches to have
>> dst_memcg pointer in memcg_drain_list_lru_node().
>>
>> Signed-off-by: Kirill Tkhai <ktkhai@xxxxxxxxxxxxx>
>> ---
>> include/linux/list_lru.h | 2 +-
>> mm/list_lru.c | 11 ++++++-----
>> mm/memcontrol.c | 2 +-
>> 3 files changed, 8 insertions(+), 7 deletions(-)
>>
>> diff --git a/include/linux/list_lru.h b/include/linux/list_lru.h
>> index ce1d010cd3fa..50cf8c61c609 100644
>> --- a/include/linux/list_lru.h
>> +++ b/include/linux/list_lru.h
>> @@ -66,7 +66,7 @@ int __list_lru_init(struct list_lru *lru, bool memcg_aware,
>> #define list_lru_init_memcg(lru) __list_lru_init((lru), true, NULL)
>>
>> int memcg_update_all_list_lrus(int num_memcgs);
>> -void memcg_drain_all_list_lrus(int src_idx, int dst_idx);
>> +void memcg_drain_all_list_lrus(int src_idx, struct mem_cgroup *dst_memcg);
>
> Please, for consistency pass the source cgroup as a pointer as well.

Ok