linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm, page_isolation: remove drain_all_pages() in set_migratetype_isolate()
@ 2018-12-14  2:39 Wei Yang
  2018-12-14  3:57 ` Andrew Morton
                   ` (2 more replies)
  0 siblings, 3 replies; 38+ messages in thread
From: Wei Yang @ 2018-12-14  2:39 UTC (permalink / raw)
  To: linux-mm; +Cc: akpm, mhocko, osalvador, david, Wei Yang

Below is a brief call flow for __offline_pages() and
alloc_contig_range():

  __offline_pages()/alloc_contig_range()
      start_isolate_page_range()
          set_migratetype_isolate()
              drain_all_pages()
      drain_all_pages()

Since set_migratetype_isolate() is only used in
start_isolate_page_range(), which is just used in __offline_pages() and
alloc_contig_range(). And both of them call drain_all_pages() if every
check looks good. This means it is not necessary call drain_all_pages()
in each iteration of set_migratetype_isolate().

By doing so, the logic seems a little bit clearer.
set_migratetype_isolate() handles pages in Buddy, while
drain_all_pages() takes care of pages in pcp.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
---
 mm/page_isolation.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index 43e085608846..f44c0e333bed 100644
--- a/mm/page_isolation.c
+++ b/mm/page_isolation.c
@@ -83,8 +83,6 @@ static int set_migratetype_isolate(struct page *page, int migratetype,
 	}
 
 	spin_unlock_irqrestore(&zone->lock, flags);
-	if (!ret)
-		drain_all_pages(zone);
 	return ret;
 }
 
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2019-01-08  9:10 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-14  2:39 [PATCH] mm, page_isolation: remove drain_all_pages() in set_migratetype_isolate() Wei Yang
2018-12-14  3:57 ` Andrew Morton
2018-12-14  7:01   ` Wei Yang
2018-12-14 15:17   ` Wei Yang
2018-12-17 12:21     ` Michal Hocko
2018-12-18 20:48       ` Wei Yang
2018-12-17 12:25 ` Michal Hocko
2018-12-17 15:08   ` Wei Yang
2018-12-17 15:48     ` Michal Hocko
2018-12-18 14:44       ` Wei Yang
2018-12-18 20:46 ` [PATCH v2] " Wei Yang
2018-12-18 21:14   ` David Hildenbrand
2018-12-18 21:49     ` Wei Yang
2018-12-18 22:18       ` David Hildenbrand
2018-12-18 23:29   ` Oscar Salvador
2018-12-19  9:51   ` Michal Hocko
2018-12-19  9:57     ` Oscar Salvador
2018-12-19 13:53       ` Wei Yang
2018-12-19 14:13         ` Michal Hocko
2018-12-19 14:33           ` Wei Yang
2018-12-19 14:39             ` Michal Hocko
2018-12-20 15:58               ` Wei Yang
2018-12-20 16:23                 ` Michal Hocko
2018-12-21  3:37                   ` Wei Yang
2018-12-19 13:29     ` Wei Yang
2018-12-19 13:40       ` Michal Hocko
2018-12-19 13:56         ` Wei Yang
2018-12-19 14:12           ` Michal Hocko
2018-12-19 14:41             ` Wei Yang
2018-12-19 10:05   ` Michal Hocko
2018-12-21 17:02   ` [PATCH v3] mm: remove extra drain pages on pcp list Wei Yang
2018-12-21 17:02     ` Wei Yang
2019-01-03 13:56     ` Michal Hocko
2019-01-05 23:27       ` Wei Yang
2019-01-05 23:31     ` [PATCH v4] " Wei Yang
2019-01-05 23:31       ` Wei Yang
2019-01-07 11:34       ` David Hildenbrand
2019-01-08  9:10       ` Oscar Salvador

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).