linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [3.0-rc1] delayed insertion allocation failing...
@ 2011-05-30 14:24 Daniel J Blueman
  2011-05-30 19:11 ` Chris Mason
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel J Blueman @ 2011-05-30 14:24 UTC (permalink / raw)
  To: Miao Xie; +Cc: Linux BTRFS

Hi Miao,

When booting 3.0-rc1 with an existing BTRFS filesystem with a normal
desktop use pattern, we see btrfs_batch_insert_item() sometimes
attempt an overly-large kmalloc (>= order 11) [1], which is
subsequently failed.

Thanks,
  Daniel

--- [1]

WARNING: at mm/page_alloc.c:2074 __alloc_pages_nodemask+0x206/0x800()
Hardware name: Latitude E5420
Modules linked in: kvm_intel kvm microcode arc4 uvcvideo videodev
v4l2_compat_ioctl32 iwlagn mac80211 sdhci_pci sdhci mmc_core i915
drm_kms_helper drm mei(C) i2c_algo_bit video
Pid: 188, comm: btrfs-delayed-m Tainted: G         C  3.0.0-rc1-100debug+ #1
Call Trace:
 [<ffffffff8105ceaa>] warn_slowpath_common+0x7a/0xb0
 [<ffffffff8105cef5>] warn_slowpath_null+0x15/0x20
 [<ffffffff810f0df6>] __alloc_pages_nodemask+0x206/0x800
 [<ffffffff812bfa53>] ? map_extent_buffer+0xd3/0xe0
 [<ffffffff812b3db4>] ? btrfs_item_offset+0xe4/0xf0
 [<ffffffff81122bd0>] alloc_pages_current+0xa0/0x110
 [<ffffffff810ec43f>] __get_free_pages+0xf/0x50
 [<ffffffff8112e71a>] __kmalloc+0x13a/0x160
 [<ffffffff8171ac00>] ? _raw_spin_unlock+0x30/0x60
 [<ffffffff812e6050>] btrfs_batch_insert_items+0x110/0x290
 [<ffffffff812e6326>] btrfs_insert_delayed_items+0x156/0x170
 [<ffffffff812e674d>] btrfs_async_run_delayed_node_done+0x6d/0x1f0
 [<ffffffff812c80f6>] worker_loop+0x86/0x2b0
 [<ffffffff812c8070>] ? check_pending_worker_creates.clone.4+0xe0/0xe0
 [<ffffffff8107dea6>] kthread+0xb6/0xc0
 [<ffffffff8109882d>] ? trace_hardirqs_on_caller+0x13d/0x180
 [<ffffffff8171c894>] kernel_thread_helper+0x4/0x10
 [<ffffffff81048a47>] ? finish_task_switch+0x77/0x100
 [<ffffffff8171afc4>] ? retint_restore_args+0xe/0xe
 [<ffffffff8107ddf0>] ? __init_kthread_worker+0x70/0x70
 [<ffffffff8171c890>] ? gs_change+0xb/0xb
-- 
Daniel J Blueman

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [3.0-rc1] delayed insertion allocation failing...
  2011-05-30 14:24 [3.0-rc1] delayed insertion allocation failing Daniel J Blueman
@ 2011-05-30 19:11 ` Chris Mason
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Mason @ 2011-05-30 19:11 UTC (permalink / raw)
  To: Daniel J Blueman; +Cc: Miao Xie, Linux BTRFS

Excerpts from Daniel J Blueman's message of 2011-05-30 10:24:08 -0400:
> Hi Miao,
> 
> When booting 3.0-rc1 with an existing BTRFS filesystem with a normal
> desktop use pattern, we see btrfs_batch_insert_item() sometimes
> attempt an overly-large kmalloc (>= order 11) [1], which is
> subsequently failed.

Wow, that's a big allocation.  Not really sure how this manages to
compile with a warning.

diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
index 01e2950..790262d 100644
--- a/fs/btrfs/delayed-inode.c
+++ b/fs/btrfs/delayed-inode.c
@@ -678,6 +678,7 @@ static int btrfs_batch_insert_items(struct btrfs_trans_handle *trans,
 	INIT_LIST_HEAD(&head);
 
 	next = item;
+	nitems = 0;
 
 	/*
 	 * count the number of the continuous items that we can insert in batch

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-30 19:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-30 14:24 [3.0-rc1] delayed insertion allocation failing Daniel J Blueman
2011-05-30 19:11 ` Chris Mason

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).