Re: [PATCH v16 15/22] mm/compaction: do page isolation first in compaction

2020-07-18 Thread Alex Shi
在 2020/7/18 上午12:09, Alexander Duyck 写道: >>> I wonder if it wouldn't make sense to combine these two atomic ops >>> with tests and the put_page into a single inline function? Then it >>> could be possible to just do one check and if succeeds you do the >>> block of code below, otherwise you just

Re: [PATCH v16 15/22] mm/compaction: do page isolation first in compaction

2020-07-17 Thread Alexander Duyck
On Thu, Jul 16, 2020 at 10:10 PM Alex Shi wrote: > > > >> @@ -950,6 +951,21 @@ static bool too_many_isolated(pg_data_t *pgdat) > >> if (!(cc->gfp_mask & __GFP_FS) && page_mapping(page)) > >> goto isolate_fail; > >> > >> + /* > >> +

Re: [PATCH v16 15/22] mm/compaction: do page isolation first in compaction

2020-07-16 Thread Alex Shi
>> @@ -950,6 +951,21 @@ static bool too_many_isolated(pg_data_t *pgdat) >> if (!(cc->gfp_mask & __GFP_FS) && page_mapping(page)) >> goto isolate_fail; >> >> + /* >> +* Be careful not to clear PageLRU until after we're >> +

Re: [PATCH v16 15/22] mm/compaction: do page isolation first in compaction

2020-07-16 Thread Alexander Duyck
On Fri, Jul 10, 2020 at 5:59 PM Alex Shi wrote: > > Johannes Weiner has suggested: > "So here is a crazy idea that may be worth exploring: > > Right now, pgdat->lru_lock protects both PageLRU *and* the lruvec's > linked list. > > Can we make PageLRU atomic and use it to stabilize the lru_lock > in

[PATCH v16 15/22] mm/compaction: do page isolation first in compaction

2020-07-10 Thread Alex Shi
Johannes Weiner has suggested: "So here is a crazy idea that may be worth exploring: Right now, pgdat->lru_lock protects both PageLRU *and* the lruvec's linked list. Can we make PageLRU atomic and use it to stabilize the lru_lock instead, and then use the lru_lock only serialize list operations?