Skip to content

Two fsck_bitmap_set patches

Bob Peterson cluster-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2fsck.gfs2: Make _fsck_bitmap_set not send a return codegfs2/fsck/metawalk.c gfs2/fsck/metawalk.h gfs2/fsck/pass1.c+61 -530 replies
2/2fsck.gfs2: convert fsck_bitmap_set to a macrogfs2/fsck/metawalk.c gfs2/fsck/metawalk.h gfs2/fsck/pass1.c+25 -280 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Cluster-devel] [fsck.gfs2 PATCH 0/2] Two fsck_bitmap_set patches

Hi,

I posted these two fsck.gfs2 performance patches previously on 22 June as part of a multi-patch set. I split these two patches from the rest, but they only achieve savings together.

The theory behind these two patches is this:
A large file system (in my case 15TB, at 80% full) is going to loop trillions of times, touching the bitmap in memory each time, so the more efficient we can make that, the faster it will go. In my case, it was looping more than 13 trillion times, and as you can tell, making fsck_bitmap_set more efficient did help significantly.

In this case, the savings is probably only significant when verbose mode (-vv option) is not used. The problem is that the fsck_bitmap_set function was checking for verbose mode and passing lots of information into the function, even when it wasn't going to use it. By converting the function into a macro that only checked the value once instead of passing all that information, it avoided doing that 13 trillion times, which resulted in considerable savings.

The first performance patch I sent today allowed pass1 to go from 16h49m44.636s to 15h52m8.912s.

This set of two patches made pass1 go from 15h52m to 14h23m, a savings of 89 minutes: another 9.3 percent speedup from the previous set.

Regards,

Bob Peterson
Red Hat File Systems
---
Bob Peterson (2):
fsck.gfs2: Make _fsck_bitmap_set not send a return code fsck.gfs2: convert fsck_bitmap_set to a macro

 gfs2/fsck/metawalk.c | 58 ----------------------------------------------
 gfs2/fsck/metawalk.h | 65 ++++++++++++++++++++++++++++++++++++++++++++++------
 gfs2/fsck/pass1.c    | 22 ++++++++++++++----
 3 files changed, 75 insertions(+), 70 deletions(-)
Signature · 1 line
2.5.5