+ reiserfs-eliminate-minimum-window-size-for-bitmap-searching.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     reiserfs: eliminate minimum window size for bitmap searching

has been added to the -mm tree.  Its filename is

     reiserfs-eliminate-minimum-window-size-for-bitmap-searching.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: reiserfs: eliminate minimum window size for bitmap searching
From: Jeff Mahoney <jeffm@xxxxxxxx>

When a file system becomes fragmented (using MythTV, for example), the
bigalloc window searching ends up causing huge performance problems.  In a
file system presented by a user experiencing this bug, the file system was
90% free, but no 32-block free windows existed on the entire file system. 
This causes the allocator to scan the entire file system for each 128k
write before backing down to searching for individual blocks.

In the end, finding a contiguous window for all the blocks in a write is an
advantageous special case, but one that can be found naturally when such a
window exists anyway.

This patch removes the bigalloc window searching, and has been proven to
fix the test case described above.

Signed-off-by: Jeff Mahoney <jeffm@xxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/reiserfs/bitmap.c |   23 +----------------------
 1 files changed, 1 insertion(+), 22 deletions(-)

diff -puN fs/reiserfs/bitmap.c~reiserfs-eliminate-minimum-window-size-for-bitmap-searching fs/reiserfs/bitmap.c
--- a/fs/reiserfs/bitmap.c~reiserfs-eliminate-minimum-window-size-for-bitmap-searching
+++ a/fs/reiserfs/bitmap.c
@@ -1034,7 +1034,6 @@ static inline int blocknrs_and_prealloc_
 	b_blocknr_t finish = SB_BLOCK_COUNT(s) - 1;
 	int passno = 0;
 	int nr_allocated = 0;
-	int bigalloc = 0;
 
 	determine_prealloc_size(hint);
 	if (!hint->formatted_node) {
@@ -1061,28 +1060,9 @@ static inline int blocknrs_and_prealloc_
 				hint->preallocate = hint->prealloc_size = 0;
 		}
 		/* for unformatted nodes, force large allocations */
-		bigalloc = amount_needed;
 	}
 
 	do {
-		/* in bigalloc mode, nr_allocated should stay zero until
-		 * the entire allocation is filled
-		 */
-		if (unlikely(bigalloc && nr_allocated)) {
-			reiserfs_warning(s, "bigalloc is %d, nr_allocated %d\n",
-					 bigalloc, nr_allocated);
-			/* reset things to a sane value */
-			bigalloc = amount_needed - nr_allocated;
-		}
-		/*
-		 * try pass 0 and pass 1 looking for a nice big
-		 * contiguous allocation.  Then reset and look
-		 * for anything you can find.
-		 */
-		if (passno == 2 && bigalloc) {
-			passno = 0;
-			bigalloc = 0;
-		}
 		switch (passno++) {
 		case 0:	/* Search from hint->search_start to end of disk */
 			start = hint->search_start;
@@ -1120,8 +1100,7 @@ static inline int blocknrs_and_prealloc_
 								 new_blocknrs +
 								 nr_allocated,
 								 start, finish,
-								 bigalloc ?
-								 bigalloc : 1,
+								 1,
 								 amount_needed -
 								 nr_allocated,
 								 hint->
_

Patches currently in -mm which might be from jeffm@xxxxxxxx are

reiserfs-warn-about-the-useless-nolargeio-option.patch
reiserfs-fix-is_reusable-bitmap-check-to-not-traverse-the-bitmap-info-array.patch
reiserfs-clean-up-bitmap-block-buffer-head-references.patch
reiserfs-reorganize-bitmap-loading-functions.patch
reiserfs-on-demand-bitmap-loading.patch
reiserfs-use-generic_file_open-for-open-checks.patch
reiserfs-eliminate-minimum-window-size-for-bitmap-searching.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux