From: Minchan Kim <minchan@kernel.org>
To: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Cc: Aaditya Kumar <aaditya.kumar.30@gmail.com>,
Mel Gorman <mel@csn.ul.ie>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: Accounting problem of MIGRATE_ISOLATED freed page
Date: Thu, 21 Jun 2012 10:55:33 +0900 [thread overview]
Message-ID: <4FE27F15.8050102@kernel.org> (raw)
In-Reply-To: <CAHGf_=pjoiHQ9vxXXe-GtbkYRzhxdDhu3pf6pwDsCe5pBQE8Nw@mail.gmail.com>
On 06/21/2012 10:39 AM, KOSAKI Motohiro wrote:
>>> number of isolate page block is almost always 0. then if we have such counter,
>>> we almost always can avoid zone->lock. Just idea.
>>
>> Yeb. I thought about it but unfortunately we can't have a counter for MIGRATE_ISOLATE.
>> Because we have to tweak in page free path for pages which are going to free later after we
>> mark pageblock type to MIGRATE_ISOLATE.
>
> I mean,
>
> if (nr_isolate_pageblock != 0)
> free_pages -= nr_isolated_free_pages(); // your counting logic
>
> return __zone_watermark_ok(z, alloc_order, mark,
> classzone_idx, alloc_flags, free_pages);
>
>
> I don't think this logic affect your race. zone_watermark_ok() is already
> racy. then new little race is no big matter.
It seems my explanation wasn't enough. :(
I already understand your intention but we can't make nr_isolate_pageblock.
Because we should count two type of free pages.
1. Already freed page so they are already in buddy list.
Of course, we can count it with return value of move_freepages_block(zone, page, MIGRATE_ISOLATE) easily.
2. Will be FREEed page by do_migrate_range.
It's a _PROBLEM_. For it, we should tweak free path. No?
If All of pages are PageLRU when hot-plug happens(ie, 2), nr_isolate_pagblock is zero and
zone_watermk_ok_safe can't do his role.
--
Kind regards,
Minchan Kim
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-06-21 1:55 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-20 6:12 Accounting problem of MIGRATE_ISOLATED freed page Minchan Kim
2012-06-20 6:32 ` KOSAKI Motohiro
2012-06-20 7:53 ` Minchan Kim
2012-06-20 12:44 ` Hillf Danton
2012-06-20 23:58 ` Minchan Kim
2012-06-20 20:19 ` KOSAKI Motohiro
2012-06-21 0:01 ` Minchan Kim
2012-06-21 1:39 ` KOSAKI Motohiro
2012-06-21 1:55 ` Minchan Kim [this message]
2012-06-21 2:45 ` KOSAKI Motohiro
2012-06-21 4:55 ` Minchan Kim
2012-06-21 10:52 ` Kamezawa Hiroyuki
2012-06-21 17:22 ` KOSAKI Motohiro
2012-06-22 1:05 ` Minchan Kim
2012-06-22 6:45 ` Minchan Kim
2012-06-23 2:56 ` KOSAKI Motohiro
2012-06-25 1:10 ` Minchan Kim
2012-06-23 2:59 ` KOSAKI Motohiro
2012-06-25 1:19 ` Minchan Kim
2012-06-23 4:38 ` Kamezawa Hiroyuki
2012-06-25 1:01 ` Minchan Kim
2012-06-25 4:18 ` Minchan Kim
2012-06-22 7:22 ` KOSAKI Motohiro
2012-06-22 7:56 ` Aaditya Kumar
2012-06-22 8:13 ` KOSAKI Motohiro
2012-06-21 11:02 ` Aaditya Kumar
2012-06-22 1:20 ` Minchan Kim
2012-06-22 2:08 ` Aaditya Kumar
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=4FE27F15.8050102@kernel.org \
--to=minchan@kernel.org \
--cc=aaditya.kumar.30@gmail.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
/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;
as well as URLs for NNTP newsgroup(s).