linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Hugh Dickins <hughd@google.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Mel Gorman <mgorman@suse.de>, Minchan Kim <minchan@kernel.org>,
	Rik van Riel <riel@redhat.com>, Dave Jones <davej@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: Fri, 1 Jun 2012 21:58:50 -0700	[thread overview]
Message-ID: <CA+55aFytGfGm2mmF-9BwjqiDCtNpz40AkQrmGOqduss2YAiEvQ@mail.gmail.com> (raw)
In-Reply-To: <alpine.LSU.2.00.1206012108430.11308@eggly.anvils>

On Fri, Jun 1, 2012 at 9:40 PM, Hugh Dickins <hughd@google.com> wrote:
>
> Move the lock after the loop, I think you meant.

Well, I wasn't sure if anything inside the loop might need it. I don't
*think* so, but at the same time, what protects "page_order(page)"
(or, indeed PageBuddy()) from being stable while that loop content
uses them?

I don't understand that code at all. It does that crazy iteration over
page, and changes "page" in random ways, and then finishes up with a
totally new "page" value that is some random thing that is *after* the
end_page thing. WHAT?

The code makes no sense. It tests all those pages within the
page-block, but then after it has done all those tests, it does the
final

  set_pageblock_migratetype(..)
  move_freepages_block(..)

using a page that is *beyond* the pageblock (and with the whole
page_order() thing, who knows just how far beyond it?)

It looks entirely too much like random-monkey code to me.

            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>

  reply	other threads:[~2012-06-02  4:59 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-30 16:33 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 [this message]
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
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=CA+55aFytGfGm2mmF-9BwjqiDCtNpz40AkQrmGOqduss2YAiEvQ@mail.gmail.com \
    --to=torvalds@linux-foundation.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=minchan@kernel.org \
    --cc=riel@redhat.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