From: "Aneesh Kumar K.V" <aneesh.kumar@gmail.com>
To: Dmitri Monakhov <dmonakhov@openvz.org>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
cmm@us.ibm.com, tytso@mit.edu, sandeen@redhat.com,
npiggin@suse.de, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 4/4] ext4: Fix file fragmentation during large file write.
Date: Mon, 13 Oct 2008 19:04:41 +0530 [thread overview]
Message-ID: <20081013133441.GB9578@skywalker> (raw)
In-Reply-To: <m31vyly2q8.fsf@dmon-lap.sw.ru>
On Mon, Oct 13, 2008 at 12:31:43AM +0400, Dmitri Monakhov wrote:
> "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> writes:
>
> > The range_cyclic writeback mode uses the address_space writeback_index
> > as the start index for writeback. With delayed allocation we were
> > updating writeback_index wrongly resulting in highly fragmented file.
> > Number of extents reduced from 4000 to 27 for a 3GB file with the below
> > patch.
> Hi i've played with fragmentation patches with following result:
> I've had several crash and deadlocks
> for example objects wasn't freed on umount:
> EXT4-fs: mballoc: 12800 blocks 13 reqs (6 success)
> EXT4-fs: mballoc: 7 extents scanned, 12 goal hits, 1 2^N hits, 0 breaks, 0 lost
> EXT4-fs: mballoc: 1 generated and it took 3024
> EXT4-fs: mballoc: 7608 preallocated, 1536 discarded
> slab error in kmem_cache_destroy(): cache `ext4_prealloc_space': Can't free all objects
> Pid: 7703, comm: rmmod Not tainted 2.6.27-rc8 #3
>
> Call Trace:
> [<ffffffff8028b011>] kmem_cache_destroy+0x7d/0xc0
> [<ffffffffa03ca057>] exit_ext4_mballoc+0x10/0x1e [ext4dev]
> [<ffffffffa03d35b3>] exit_ext4_fs+0x1f/0x2f [ext4dev]
> [<ffffffff80250dff>] sys_delete_module+0x199/0x1f3
> [<ffffffff8025d06e>] audit_syscall_entry+0x12d/0x160
> [<ffffffff8020be0b>] system_call_fastpath+0x16/0x1b
Looking at the code i found this. I haven't test the change yet.
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 2f38754..acf6a32 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2569,7 +2569,7 @@ static void ext4_mb_cleanup_pa(struct ext4_group_info *grp)
pa = list_entry(cur, struct ext4_prealloc_space, pa_group_list);
list_del(&pa->pa_group_list);
count++;
- kfree(pa);
+ kmem_cache_free(ext4_pspace_cachep, pa);
}
if (count)
mb_debug("mballoc: %u PAs left\n", count);
prev parent reply other threads:[~2008-10-13 13:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-11 19:04 [PATCH 1/4] ext4: Use tag dirty lookup during mpage_da_submit_io Aneesh Kumar K.V
2008-10-11 19:04 ` [PATCH 2/4] vfs: Remove the range_cont writeback mode Aneesh Kumar K.V
2008-10-11 19:04 ` [PATCH 3/4] vfs: Add no_nrwrite_update and no_index_update writeback control flags Aneesh Kumar K.V
2008-10-11 19:04 ` [PATCH 4/4] ext4: Fix file fragmentation during large file write Aneesh Kumar K.V
2008-10-12 20:31 ` Dmitri Monakhov
2008-10-13 9:52 ` Aneesh Kumar K.V
2008-10-13 15:14 ` Dmitri Monakhov
2008-10-13 13:34 ` Aneesh Kumar K.V [this message]
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=20081013133441.GB9578@skywalker \
--to=aneesh.kumar@gmail.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=cmm@us.ibm.com \
--cc=dmonakhov@openvz.org \
--cc=linux-ext4@vger.kernel.org \
--cc=npiggin@suse.de \
--cc=sandeen@redhat.com \
--cc=tytso@mit.edu \
/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).