From: Andrew Morton <akpm@linux-foundation.org>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: clameter@sgi.com, linux-mm@kvack.org, npiggin@suse.de,
y-goto@jp.fujitsu.com
Subject: Re: Warning on memory offline (and possible in usual migration?)
Date: Wed, 16 Apr 2008 11:36:42 -0700 [thread overview]
Message-ID: <20080416113642.8ffd5684.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080416200036.2ea9b5c2.kamezawa.hiroyu@jp.fujitsu.com>
On Wed, 16 Apr 2008 20:00:36 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> On Mon, 14 Apr 2008 10:46:47 -0700 (PDT)
> Christoph Lameter <clameter@sgi.com> wrote:
>
> > On Mon, 14 Apr 2008, KAMEZAWA Hiroyuki wrote:
> >
> > > Then, "page" is not Uptodate when it reaches (*).
> >
> > The page will be marked uptodate before we reach ** so its okay in
> > general. If a page is not uptodate then we should not be getting here.
> >
> > An !uptodate page is not migratable. Maybe we need to add better checking?
> >
> >
> With tons of printk, I think I found when it happens.
>
> Assume I use ia64/PAGE_SIZE=16k and ext3's blocksize=4k.
> A page has 4 buffer_heads.
>
> Assume that a page is not Uptodate before issuing write_begin()
>
> At the end of writing to ext3, the kernel reaches here.
> ==
> static int __block_commit_write(struct inode *inode, struct page *page,
> unsigned from, unsigned to)
> {
> int patrial=0;
>
> if (!All_buffers_to_this_page_is_uptodate)
> partial = 1
> if (!partial)
> SetPageUptodate(page)
> }
> ==
> To set a page as Uptodate, all buffers must be uptodate.
>
> But *all* buffers to this page is not necessary to be uptodate, here.
> Then, the page can be not-up-to-date after commit-write.
>
> At page offlining, all buffers on the page seems to be marked as Uptodate
> (by printk) but the page itself isn't. This seems strange.
>
> But I don't found who set Uptodate to the buffers.
> And why page isn't up-to-date while all buffers are marked as up-to-date.
That would imply that someone brought a buffer uptodate and didn't mark the
page uptodate. That can happen if a read reads the buffer from disk or
memsets all of it. Or if a write memsets all of it, or does
copy_from_user() into all of it.
> still chasing.
umm..
If you had some code which does
pread(fd, buf, 1, 0);
pread(fd, buf, 1, 4096);
pread(fd, buf, 1, 8192);
pread(fd, buf, 1, 12288);
then I'd expect that each read would read a single buffer so we end up with
four uptodate buffers, but nobody brings the entire page uptodate.
readahead will hide this most of the time by reading entire pages, but if
for some reason readahead has collapsed the window to zero then it could
happen.
I'd expect that you could reproduce this by disabling readahead with
fadvise(POSIX_FADV_RANDOM) and then issuing the above four reads.
--
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:[~2008-04-16 18:36 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-14 5:58 KAMEZAWA Hiroyuki
2008-04-14 17:46 ` Christoph Lameter
2008-04-15 10:13 ` KAMEZAWA Hiroyuki
2008-04-15 19:31 ` Christoph Lameter
2008-04-16 0:23 ` KAMEZAWA Hiroyuki
2008-04-16 2:23 ` KAMEZAWA Hiroyuki
2008-04-16 3:10 ` KAMEZAWA Hiroyuki
2008-04-16 5:22 ` KAMEZAWA Hiroyuki
2008-04-16 18:04 ` Christoph Lameter
2008-04-16 11:00 ` KAMEZAWA Hiroyuki
2008-04-16 18:36 ` Andrew Morton [this message]
2008-04-17 0:19 ` KAMEZAWA Hiroyuki
2008-04-17 6:38 ` Warning on memory offline (possible in migration ?) KAMEZAWA Hiroyuki
2008-04-17 6:43 ` Andrew Morton
2008-04-17 6:55 ` KAMEZAWA Hiroyuki
2008-04-22 4:41 ` Warning on memory offline (and possible in usual migration?) Nick Piggin
2008-04-22 4:52 ` Nick Piggin
2008-04-22 7:56 ` KAMEZAWA Hiroyuki
2008-04-22 9:43 ` Nick Piggin
2008-04-22 9:57 ` KAMEZAWA Hiroyuki
2008-04-22 19:16 ` Christoph Lameter
2008-04-23 0:48 ` Nick Piggin
2008-04-23 1:37 ` KAMEZAWA Hiroyuki
2008-04-23 2:41 ` KAMEZAWA Hiroyuki
2008-04-23 2:53 ` Nick Piggin
2008-04-23 3:44 ` KAMEZAWA Hiroyuki
2008-04-23 15:28 ` Nick Piggin
2008-04-24 1:34 ` KAMEZAWA Hiroyuki
2008-04-23 17:50 ` Christoph Lameter
2008-04-24 1:36 ` KAMEZAWA Hiroyuki
2008-04-24 19:11 ` Christoph Lameter
2008-04-25 0:11 ` KAMEZAWA Hiroyuki
2008-04-23 17:47 ` Christoph Lameter
2008-04-24 2:13 ` Nick Piggin
2008-04-29 7:20 ` KAMEZAWA Hiroyuki
2008-04-30 6:56 ` Nick Piggin
2008-04-30 7:04 ` KAMEZAWA Hiroyuki
2008-04-30 7:12 ` Andrew Morton
2008-04-30 7:22 ` KAMEZAWA Hiroyuki
2008-04-30 7:26 ` Nick Piggin
2008-04-30 17:59 ` Christoph Lameter
2008-04-30 18:01 ` Christoph Lameter
2008-05-01 1:44 ` Nick Piggin
2008-05-01 19:25 ` Christoph Lameter
2008-05-02 0:44 ` Nick Piggin
2008-05-02 1:07 ` Christoph Lameter
2008-05-02 1:23 ` Nick Piggin
2008-05-02 1:37 ` Christoph Lameter
2008-05-02 21:16 ` Christoph Lameter
2008-05-05 4:27 ` Nick Piggin
2008-05-05 17:28 ` Christoph Lameter
2008-05-06 8:52 ` Nick Piggin
2008-05-06 17:49 ` Christoph Lameter
2008-04-30 23:29 ` kamezawa.hiroyu
2008-05-01 0:34 ` Badari Pulavarty
2008-05-01 8:36 ` kamezawa.hiroyu
2008-04-22 4:50 ` Nick Piggin
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=20080416113642.8ffd5684.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
--cc=y-goto@jp.fujitsu.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