I have emailed the results of debugreiserfs -m /dev/hda1 to Vladimir
already, Jeff I can email it to you as well if you want?

Just you so you know, there is a thread about this on the MythTV mailing
list (http://www.gossamer-threads.com/lists/mythtv/users/208573) and it
looks like there might be as many as 5 other people experiencing the
same issue. 

We originally thought it was caused by IVTV drivers, but one other
person and myself (after profiling) discovered it was related to how
much disk space we have available on our reiserfs partitions. 

I also haven't _noticed_ a gradual increase in load as the free space
decreases, as I would expect if reiserfs had to spend longer searching
for unused blocks, it seems the box all of a sudden gets hit at a
certain point and the load spikes to 10 and writing slows to a crawl.


On Fri, 2006-06-30 at 10:04 -0700, Hans Reiser wrote:
> I have to apologize, I just now read the part where find_next_zero is
> using 42% of CPU.
> 
> Jeff, this has the "feel" of a bug (affecting performance not
> correctness).  I am skeptical that we are searching only bitmap blocks
> in which we successfully find and use a free block.  Could you look at
> the code and his results with some care?  This profiling result is what
> I would have expected to see BEFORE your optimizations occurred, and I
> would not expect it now.  Thanks Mike for bringing this to our attention.
> 
> Hans
> 
> -------------------------
> 
> From: Jeff Mahoney <[EMAIL PROTECTED]>
> Subject: [PATCH 5/5] reiserfs: make bitmap use cached first zero bit
> 
>  Currently, the bitmap code uses half of the hinting data gathered and
> cached
>  and wastes the other half. We'll skip completely full bitmaps, but start
>  scanning in bitmaps at locations where if we consulted the zero bit hint,
>  we'd know there aren't any free bits available.
> 
>  This patch uses the first zero hint to bump the beginning of the search
>  window to where we know there is at least one zero bit.
> 
>  fs/reiserfs/bitmap.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletion(-)
> 
> Signed-off-by: Jeff Mahoney <[EMAIL PROTECTED]>
> 
> diff -ruNpX ../dontdiff linux-2.6.15.orig.staging1/fs/reiserfs/bitmap.c
> linux-2.6.15.orig.staging2/fs/reiserfs/bitmap.c
> --- linux-2.6.15.orig.staging1/fs/reiserfs/bitmap.c    2006-01-16
> 16:53:35.663319136 -0500
> +++ linux-2.6.15.orig.staging2/fs/reiserfs/bitmap.c    2006-01-16
> 16:53:35.673317616 -0500
> @@ -187,7 +187,10 @@ static int scan_bitmap_block(struct reis
>              return 0;    // No free blocks in this bitmap
>          }
>  
> -        /* search for a first zero bit -- beggining of a window */
> +        if (*beg < bi->first_zero_hint)
> +            *beg = bi->first_zero_hint;
> +
> +        /* search for a first zero bit -- beginning of a window */
>          *beg = reiserfs_find_next_zero_le_bit
>              ((unsigned long *)(bh->b_data), boundary, *beg);
>  
> 
> 
-- 
Mike Benoit <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to