Re: [PATCH v3 3/7] mm/lru: replace pgdat lru_lock with lruvec lock

From: Alex Shi
Date: Tue Nov 19 2019 - 05:10:26 EST




在 2019/11/19 上午10:10, Daniel Jordan 写道:
>> - if (pgdat)
>> - spin_unlock_irqrestore(&pgdat->lru_lock, flags);
>> +
>> release_pages(pvec->pages, pvec->nr);
>> pagevec_reinit(pvec);
>> }
> Why can't you keep the locking pattern where we only drop and reacquire if the
> lruvec changes? It'd save a lot of locks and unlocks if most pages were from
> the same memcg and node, or the memory controller were unused.
>

Good catching! This issue will be fixed in the next patch which introduce relock_ function.

Thanks!