[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rm -rf: avoid ext3/4 O(N^2) performance hit, further librarify remov
From: |
Jim Meyering |
Subject: |
Re: rm -rf: avoid ext3/4 O(N^2) performance hit, further librarify remove.c |
Date: |
Sat, 27 Sep 2008 00:33:19 +0200 |
Jim Meyering <address@hidden> wrote:
> Here are three patches:
> The first relaxes "make distcheck" so it'll pass even after
> the 2nd goes in (it introduces several c99 stmt-after-decl).
>
> The 2nd patch does the same thing for rm that I did for fts:
>
> http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/14808
>
> i.e., this change makes rm process dir entry names in sorted
> inode order, when that's sensible.
>
> Adding the test to exercise/exhibit the fix was interesting.
> I classified it as "expensive", so it doesn't run by default:
> it creates and removes 400,000 files. The removal takes about
> 10s on a reasonably modern system. If it takes more than 1 minute,
> that's deemed a failure. Without the patch, the removal takes almost
> 6 *minutes* with a fast system. If you want to run just
> that one test, do this:
>
> make -C tests TESTS=rm/ext3-perf RUN_EXPENSIVE_TESTS=yes VERBOSE=yes
>
> The 3rd patch fixes remove.c to be closer to library-ready,
> by removing uses of xmalloc and by adjusting the existing obstack-
> using code so that obstack allocation doesn't provoke an exit.
I've pushed those patches with some small additional changes.
Thanks to those who gave feedback.
I'd like to put a test release on alpha.gnu.org next week,
so if you have any pending problem reports or patches, post
them to the list soon.
- rm -rf: avoid ext3/4 O(N^2) performance hit, further librarify remove.c, Jim Meyering, 2008/09/25
- Re: rm -rf: avoid ext3/4 O(N^2) performance hit, further librarify remove.c, Eric Blake, 2008/09/25
- Re: rm -rf: avoid ext3/4 O(N^2) performance hit, further librarify remove.c, Ralf Wildenhues, 2008/09/26
- Re: rm -rf: avoid ext3/4 O(N^2) performance hit, further librarify remove.c, Andreas Schwab, 2008/09/26
- Re: rm -rf: avoid ext3/4 O(N^2) performance hit, further librarify remove.c,
Jim Meyering <=