From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: "linux-mm@kvack.org" <linux-mm@kvack.org>
Cc: npiggin@suse.de, Christoph Lameter <clameter@sgi.com>,
Andrew Morton <akpm@linux-foundation.org>,
GOTO <y-goto@jp.fujitsu.com>
Subject: Warning on memory offline (and possible in usual migration?)
Date: Mon, 14 Apr 2008 14:58:06 +0900 [thread overview]
Message-ID: <20080414145806.c921c927.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In 2.6.25-rc8-mm2.
I saw below warning at memory offlining. please help.
(ia64/NUMA box with ext3 file system. Almost all memory are free memory.)
==
localhost.localdomain login: ------------[ cut here ]------------
WARNING: at fs/buffer.c:720 __set_page_dirty+0x330/0x360()
Modules linked in: ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables bridge ipv6 ipmi_watchdog mptctl ipmi_devintf ipmi_si ipmi_msghandler vfat fat dm_multipath parport_pc lp parport sg tg3 e100 mii button shpchp dm_snapshot dm_zero dm_mirror dm_log dm_mod usb_storage mptspi mptscsih scsi_transport_spi mptbase sd_mod scsi_mod ext3 jbd ehci_hcd ohci_hcd uhci_hcd [last unloaded: ipmi_watchdog]
Call Trace:
[<a000000100015220>] show_stack+0x80/0xa0
sp=e000012027b9fae0 bsp=e000012027b99398
[<a000000100015270>] dump_stack+0x30/0x60
sp=e000012027b9fcb0 bsp=e000012027b99380
[<a000000100089ed0>] warn_on_slowpath+0x90/0xe0
sp=e000012027b9fcb0 bsp=e000012027b99358
[<a0000001001f8b10>] __set_page_dirty+0x330/0x360
sp=e000012027b9fda0 bsp=e000012027b99328
[<a0000001001ffb90>] __set_page_dirty_buffers+0xd0/0x280
sp=e000012027b9fda0 bsp=e000012027b992f8
[<a00000010012fec0>] set_page_dirty+0xc0/0x260
sp=e000012027b9fda0 bsp=e000012027b992d0
[<a000000100195670>] migrate_page_copy+0x5d0/0x5e0
sp=e000012027b9fda0 bsp=e000012027b992a8
[<a000000100197840>] buffer_migrate_page+0x2e0/0x3c0
sp=e000012027b9fda0 bsp=e000012027b99260
[<a000000100195eb0>] migrate_pages+0x770/0xe00
sp=e000012027b9fda0 bsp=e000012027b991a8
[<a000000100191250>] offline_pages+0x6f0/0xa20
sp=e000012027b9fdf0 bsp=e000012027b99118
[<a00000010006b1f0>] remove_memory+0x30/0x60
sp=e000012027b9fe20 bsp=e000012027b990f0
[<a000000100482c50>] memory_block_change_state+0x390/0x400
sp=e000012027b9fe20 bsp=e000012027b990a0
[<a000000100483720>] store_mem_state+0x1e0/0x200
sp=e000012027b9fe20 bsp=e000012027b99068
[<a0000001004718a0>] sysdev_store+0x60/0xa0
sp=e000012027b9fe20 bsp=e000012027b99030
[<a000000100246100>] sysfs_write_file+0x220/0x300
sp=e000012027b9fe20 bsp=e000012027b98fd0
[<a00000010019e2e0>] vfs_write+0x1a0/0x320
sp=e000012027b9fe20 bsp=e000012027b98f80
[<a00000010019edf0>] sys_write+0x70/0xe0
sp=e000012027b9fe20 bsp=e000012027b98f08
[<a00000010000a570>] ia64_trace_syscall+0xd0/0x110
sp=e000012027b9fe30 bsp=e000012027b98f08
[<a000000000010720>] __start_ivt_text+0xffffffff00010720/0x400
sp=e000012027ba0000 bsp=e000012027b98f08
==
This comes from fs/buffer.c
==
static int __set_page_dirty(struct page *page,
struct address_space *mapping, int warn)
{
if (unlikely(!mapping))
return !TestSetPageDirty(page);
if (TestSetPageDirty(page))
return 0;
write_lock_irq(&mapping->tree_lock);
if (page->mapping) { /* Race with truncate? */
WARN_ON_ONCE(warn && !PageUptodate(page)); ---------(*)
if (mapping_cap_account_dirty(mapping)) {
__inc_zone_page_state(page, NR_FILE_DIRTY);
__inc_bdi_stat(mapping->backing_dev_info,
BDI_RECLAIMABLE);
task_io_account_write(PAGE_CACHE_SIZE);
}
radix_tree_tag_set(&mapping->page_tree,
page_index(page), PAGECACHE_TAG_DIRTY);
}
write_unlock_irq(&mapping->tree_lock);
__mark_inode_dirty(mapping->host, I_DIRTY_PAGES);
return 1;
}
==
Then, "page" is not Uptodate when it reaches (*).
But, migrate_page() call path is
==
buffer_migrate_page()
-> lock all buffers on old pages.
-> move buffers to newpage.
-> migrate_page_copy(page, newpage)
-> set_page_dirty().
-> unlock all buffers().
==
static void migrate_page_copy(struct page *newpage, struct page *page)
{
copy_highpage(newpage, page);
<snip>
if (PageUptodate(page))
SetPageUptodate(newpage);
<snip>
if (PageDirty(page)) {
clear_page_dirty_for_io(page);
set_page_dirty(newpage);------------------------(**)
}
==
Then, Uptodate() is copied before set_page_dirty().
So, "page" is not Uptodate and Dirty when it reaches (**)
"newpage" has buffers but not dirty and Uptodate().
>From patch comment, http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=787d2214c19bcc9b6ac48af0ce098277a801eded
"It is a bug to set a page dirty if it is not uptodate unless it has
buffers."
__set_page_dirty() should be following ?
=
if (TestSetPageDirty(page))
return 0;
if (PagePrivate(page))
return 0;
if (page->mapping) {
...
}
=
Thanks,
-Kame
--
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 reply other threads:[~2008-04-14 5:58 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-14 5:58 KAMEZAWA Hiroyuki [this message]
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
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=20080414145806.c921c927.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.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