Re: [PATCH v17 17/21] mm/lru: replace pgdat lru_lock with lruvec lock

2020-08-06 Thread Alex Shi
Hi Johannes, Michal, >From page to its lruvec, a few memory access under lock cause extra cost. Would you like to save the per memcg lruvec pointer to page->private? Thanks Alex 在 2020/7/25 下午8:59, Alex Shi 写道: > /** > * mem_cgroup_page_lruvec - return lruvec for isolating/putting an LRU pa

Re: [PATCH v17 17/21] mm/lru: replace pgdat lru_lock with lruvec lock

2020-07-28 Thread Alex Shi
rewrite the commit log. >From 5e9340444632d69cf10c8db521577d0637819c5f Mon Sep 17 00:00:00 2001 From: Alex Shi Date: Tue, 26 May 2020 17:27:52 +0800 Subject: [PATCH v17 17/23] mm/lru: replace pgdat lru_lock with lruvec lock This patch moves per node lru_lock into lruvec, thus bring a lru_lock fo

Re: [PATCH v17 17/21] mm/lru: replace pgdat lru_lock with lruvec lock

2020-07-28 Thread Alex Shi
在 2020/7/29 上午9:27, Alexander Duyck 写道: > On Tue, Jul 28, 2020 at 6:00 PM Alex Shi wrote: >> >> >> >> 在 2020/7/28 下午10:54, Alexander Duyck 写道: >>> On Tue, Jul 28, 2020 at 4:20 AM Alex Shi wrote: 在 2020/7/28 上午7:34, Alexander Duyck 写道: >> @@ -1876,6 +1876,12 @@ static un

Re: [PATCH v17 17/21] mm/lru: replace pgdat lru_lock with lruvec lock

2020-07-28 Thread Alexander Duyck
On Tue, Jul 28, 2020 at 6:00 PM Alex Shi wrote: > > > > 在 2020/7/28 下午10:54, Alexander Duyck 写道: > > On Tue, Jul 28, 2020 at 4:20 AM Alex Shi wrote: > >> > >> > >> > >> 在 2020/7/28 上午7:34, Alexander Duyck 写道: > @@ -1876,6 +1876,12 @@ static unsigned noinline_for_stack > move_pages_to_l

Re: [PATCH v17 17/21] mm/lru: replace pgdat lru_lock with lruvec lock

2020-07-28 Thread Alex Shi
在 2020/7/28 下午10:54, Alexander Duyck 写道: > On Tue, Jul 28, 2020 at 4:20 AM Alex Shi wrote: >> >> >> >> 在 2020/7/28 上午7:34, Alexander Duyck 写道: @@ -1876,6 +1876,12 @@ static unsigned noinline_for_stack move_pages_to_lru(struct lruvec *lruvec, *

Re: [PATCH v17 17/21] mm/lru: replace pgdat lru_lock with lruvec lock

2020-07-28 Thread Alex Shi
在 2020/7/28 下午11:55, Alexander Duyck 写道: >> /* >> @@ -511,11 +511,11 @@ static bool compact_lock_irqsave(spinlock_t *lock, >> unsigned long *flags, >> * scheduled) >> */ >> static bool compact_unlock_should_abort(spinlock_t *lock, >> - unsigned long flags, bool *

Re: [PATCH v17 17/21] mm/lru: replace pgdat lru_lock with lruvec lock

2020-07-28 Thread Alexander Duyck
On Tue, Jul 28, 2020 at 8:40 AM Alex Shi wrote: > > > > 在 2020/7/28 上午7:34, Alexander Duyck 写道: > > It might make more sense to look at modifying > > compact_unlock_should_abort and compact_lock_irqsave (which always > > returns true so should probably be a void) to address the deficiencies > > th

Re: [PATCH v17 17/21] mm/lru: replace pgdat lru_lock with lruvec lock

2020-07-28 Thread Alex Shi
在 2020/7/28 上午7:34, Alexander Duyck 写道: > It might make more sense to look at modifying > compact_unlock_should_abort and compact_lock_irqsave (which always > returns true so should probably be a void) to address the deficiencies > they have that make them unusable for you. One of possible reus

Re: [PATCH v17 17/21] mm/lru: replace pgdat lru_lock with lruvec lock

2020-07-28 Thread Alexander Duyck
On Tue, Jul 28, 2020 at 4:20 AM Alex Shi wrote: > > > > 在 2020/7/28 上午7:34, Alexander Duyck 写道: > >> @@ -1876,6 +1876,12 @@ static unsigned noinline_for_stack > >> move_pages_to_lru(struct lruvec *lruvec, > >> * > >> list_add(&page->lru,) >

Re: [PATCH v17 17/21] mm/lru: replace pgdat lru_lock with lruvec lock

2020-07-28 Thread Alex Shi
在 2020/7/28 上午7:34, Alexander Duyck 写道: >> @@ -1876,6 +1876,12 @@ static unsigned noinline_for_stack >> move_pages_to_lru(struct lruvec *lruvec, >> * >> list_add(&page->lru,) >> * list_add(&page->lru,) //corrupt >>

Re: [PATCH v17 17/21] mm/lru: replace pgdat lru_lock with lruvec lock

2020-07-28 Thread Alex Shi
在 2020/7/28 上午7:34, Alexander Duyck 写道: >> @@ -847,11 +847,21 @@ static bool too_many_isolated(pg_data_t *pgdat) >> * contention, to give chance to IRQs. Abort completely if >> * a fatal signal is pending. >> */ >> - if (!(low_pfn

Re: [PATCH v17 17/21] mm/lru: replace pgdat lru_lock with lruvec lock

2020-07-27 Thread Alexander Duyck
On Sat, Jul 25, 2020 at 6:01 AM Alex Shi wrote: > > This patch moves per node lru_lock into lruvec, thus bring a lru_lock for > each of memcg per node. So on a large machine, each of memcg don't > have to suffer from per node pgdat->lru_lock competition. They could go > fast with their self lru_lo

[PATCH v17 17/21] mm/lru: replace pgdat lru_lock with lruvec lock

2020-07-25 Thread Alex Shi
This patch moves per node lru_lock into lruvec, thus bring a lru_lock for each of memcg per node. So on a large machine, each of memcg don't have to suffer from per node pgdat->lru_lock competition. They could go fast with their self lru_lock. After move memcg charge before lru inserting, page iso