From: Minchan Kim <minchan@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Hugh Dickins <hughd@google.com>, Dave Jones <davej@redhat.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Mel Gorman <mgorman@suse.de>, Rik van Riel <riel@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Cong Wang <amwang@redhat.com>,
Markus Trippelsdorf <markus@trippelsdorf.de>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: WARNING: at mm/page-writeback.c:1990 __set_page_dirty_nobuffers+0x13a/0x170()
Date: Mon, 04 Jun 2012 10:21:56 +0900 [thread overview]
Message-ID: <4FCC0DB4.30106@kernel.org> (raw)
In-Reply-To: <CA+55aFz--XDSOConDoM2SO0Jpd78Dg4GsGP+Z0F+__JWz+6JoQ@mail.gmail.com>
On 06/04/2012 08:13 AM, Linus Torvalds wrote:
> On Sun, Jun 3, 2012 at 3:17 PM, Hugh Dickins <hughd@google.com> wrote:
>>
>> But another strike against that commit: I tried fixing it up to use
>> start_page instead of page at the end, with the worrying but safer
>> locking I suggested at first, with a count of how many times it went
>> there, and how many times it succeeded.
>
> You can't use start_page anyway, it might not be a valid page. There's
> a reson it does that "pfn_valid_within()", methinks.
Right. I missed that. I think we can use the page passed to rescue_unmovable_pageblock.
We make sure it's valid in isolate_freepages. So how about this?
barrios@bbox:~/linux-2.6$ git diff
diff --git a/mm/compaction.c b/mm/compaction.c
index 4ac338a..7459ab5 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -368,11 +368,11 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc,
static bool rescue_unmovable_pageblock(struct page *page)
{
unsigned long pfn, start_pfn, end_pfn;
- struct page *start_page, *end_page;
+ struct page *start_page, *end_page, *cursor_page;
pfn = page_to_pfn(page);
start_pfn = pfn & ~(pageblock_nr_pages - 1);
- end_pfn = start_pfn + pageblock_nr_pages;
+ end_pfn = start_pfn + pageblock_nr_pages - 1;
start_page = pfn_to_page(start_pfn);
end_page = pfn_to_page(end_pfn);
@@ -381,19 +381,19 @@ static bool rescue_unmovable_pageblock(struct page *page)
if (page_zone(start_page) != page_zone(end_page))
return false;
- for (page = start_page, pfn = start_pfn; page < end_page; pfn++,
- page++) {
+ for (cursor_page = start_page, pfn = start_pfn; cursor_page <= end_page; pfn++,
+ cursor_page++) {
if (!pfn_valid_within(pfn))
continue;
- if (PageBuddy(page)) {
- int order = page_order(page);
+ if (PageBuddy(cursor_page)) {
+ int order = page_order(cursor_page);
pfn += (1 << order) - 1;
- page += (1 << order) - 1;
+ cursor_page += (1 << order) - 1;
continue;
- } else if (page_count(page) == 0 || PageLRU(page))
+ } else if (page_count(cursor_page) == 0 || PageLRU(cursor_page))
continue;
return false;
>
> Anyway, my current plan is to apply your "mm: fix warning in
> __set_page_dirty_nobuffers" patch - even if it's just a harmless
> WARN_ON_ONCE(), and revert 5ceb9ce6fe94. Sounds like Dave hit normally
> hit his problem much before two hours, and it must be even longer now.
>
> Ack on that plan?
No objection.
The patch wasn't a bug fix and even test workload was very theoretical.
>
> Linus
>
> --
> 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/ .
> Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
>
--
Kind regards,
Minchan Kim
next prev parent reply other threads:[~2012-06-04 1:21 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-30 16:33 WARNING: at mm/page-writeback.c:1990 __set_page_dirty_nobuffers+0x13a/0x170() Dave Jones
2012-05-31 0:57 ` Dave Jones
2012-06-01 2:31 ` Dave Jones
2012-06-01 2:43 ` Linus Torvalds
2012-06-01 13:43 ` Dave Jones
2012-06-01 8:44 ` Hugh Dickins
2012-06-01 8:51 ` KOSAKI Motohiro
2012-06-01 9:08 ` Hugh Dickins
2012-06-01 9:12 ` KOSAKI Motohiro
2012-06-01 14:09 ` Dave Jones
2012-06-01 14:14 ` Dave Jones
2012-06-01 16:12 ` Dave Jones
2012-06-01 17:16 ` Dave Jones
2012-06-01 22:17 ` Hugh Dickins
2012-06-02 1:45 ` Linus Torvalds
2012-06-02 4:40 ` Hugh Dickins
2012-06-02 4:58 ` Linus Torvalds
2012-06-02 7:20 ` Hugh Dickins
2012-06-02 7:17 ` Markus Trippelsdorf
2012-06-02 7:22 ` Hugh Dickins
2012-06-02 7:27 ` [PATCH] mm: fix warning in __set_page_dirty_nobuffers Hugh Dickins
2012-06-03 18:15 ` WARNING: at mm/page-writeback.c:1990 __set_page_dirty_nobuffers+0x13a/0x170() Dave Jones
2012-06-03 18:23 ` Linus Torvalds
2012-06-03 18:31 ` Dave Jones
2012-06-03 20:53 ` Dave Jones
2012-06-03 21:59 ` Linus Torvalds
2012-06-03 22:13 ` Dave Jones
2012-06-03 22:29 ` Hugh Dickins
2012-06-03 22:17 ` Hugh Dickins
2012-06-03 23:13 ` Linus Torvalds
2012-06-04 0:46 ` KOSAKI Motohiro
2012-06-04 1:18 ` Hugh Dickins
2012-06-04 1:21 ` Minchan Kim [this message]
2012-06-04 1:26 ` KOSAKI Motohiro
2012-06-04 2:30 ` Minchan Kim
2012-06-04 1:10 ` Minchan Kim
2012-06-04 1:41 ` Hugh Dickins
2012-06-04 1:47 ` KOSAKI Motohiro
2012-06-04 2:28 ` Minchan Kim
2012-06-04 4:21 ` KOSAKI Motohiro
2012-06-04 13:37 ` Bartlomiej Zolnierkiewicz
2012-06-01 16:16 ` Markus Trippelsdorf
2012-06-01 16:28 ` Linus Torvalds
2012-06-01 16:39 ` Markus Trippelsdorf
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=4FCC0DB4.30106@kernel.org \
--to=minchan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=amwang@redhat.com \
--cc=b.zolnierkie@samsung.com \
--cc=davej@redhat.com \
--cc=hughd@google.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=m.szyprowski@samsung.com \
--cc=markus@trippelsdorf.de \
--cc=mgorman@suse.de \
--cc=riel@redhat.com \
--cc=torvalds@linux-foundation.org \
/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).