Re: [PATCH v17 20/21] mm/pgdat: remove pgdat lru_lock

Alexander Duyck
2020-08-03T22:43:12Z

On Sat, Jul 25, 2020 at 6:00 AM Alex Shi <alex.shi@linux.alibaba.com> wrote:
>
> Now pgdat.lru_lock was replaced by lruvec lock. It's not used anymore.
>
> Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> Cc: Hugh Dickins <hughd@google.com>
> Cc: Johannes Weiner <hannes@cmpxchg.org>
> Cc: linux-mm@kvack.org
> Cc: linux-kernel@vger.kernel.org
> Cc: cgroups@vger.kernel.org

I really think this would be better just squashed into patch 18
instead of as a standalone patch since you were moving all of the
locking anyway so it would be more likely to trigger build errors if
somebody didn't move a lock somewhere that was referencing this.

That said this change is harmless at this point.

Reviewed-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>

> ---
> include/linux/mmzone.h | 1 -
> mm/page_alloc.c | 1 -
> 2 files changed, 2 deletions(-)
>
> diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
> index 30b961a9a749..8af956aa13cf 100644
> --- a/include/linux/mmzone.h
> +++ b/include/linux/mmzone.h
> @@ -735,7 +735,6 @@ struct deferred_split {
>
> /* Write-intensive fields used by page reclaim */
> ZONE_PADDING(_pad1_)
> - spinlock_t lru_lock;
>
> #ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT
> /*
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index e028b87ce294..4d7df42b32d6 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -6721,7 +6721,6 @@ static void __meminit pgdat_init_internals(struct pglist_data *pgdat)
> init_waitqueue_head(&pgdat->pfmemalloc_wait);
>
> pgdat_page_ext_init(pgdat);
> - spin_lock_init(&pgdat->lru_lock);
> lruvec_init(&pgdat->__lruvec);
> }
>
> --
> 1.8.3.1
>