From: David Hildenbrand <david@redhat.com>
To: Wei Yang <richard.weiyang@gmail.com>, linux-mm@kvack.org
Cc: akpm@linux-foundation.org, mhocko@suse.com, osalvador@suse.de
Subject: Re: [PATCH v2] mm, page_isolation: remove drain_all_pages() in set_migratetype_isolate()
Date: Tue, 18 Dec 2018 22:14:25 +0100 [thread overview]
Message-ID: <58509504-4c30-3385-6eda-72c2abad60e7@redhat.com> (raw)
In-Reply-To: <20181218204656.4297-1-richard.weiyang@gmail.com>
On 18.12.18 21:46, Wei Yang wrote:
> 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()
>
> Current logic is: isolate and drain pcp list for each pageblock and
> drain pcp list again. This is not necessary and we could just drain pcp
> list once after isolate this whole range.
>
> The reason is start_isolate_page_range() will set the migrate type of
> a range to MIGRATE_ISOLATE. After doing so, this range will never be
> allocated from Buddy, neither to a real user nor to pcp list.
>
> Since drain_all_pages() is zone based, by reduce times of
> drain_all_pages() also reduce some contention on this particular zone.
>
> Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Yes, as far as I can see, when a MIGRATE_ISOLATE page gets freed, it
will not go onto the pcp list again.
However, start_isolate_page_range() is also called via
alloc_contig_range(). Are you sure we can effectively drop the
drain_all_pages() for that call path?
>
> ---
> v2: adjust changelog with MIGRATE_ISOLATE effects for the isolated range
> ---
> 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;
> }
>
>
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2018-12-18 21:14 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-14 2:39 [PATCH] " 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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=58509504-4c30-3385-6eda-72c2abad60e7@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=osalvador@suse.de \
--cc=richard.weiyang@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox