ext3-orlov for 2.4

ext3-orlov for 2.4

Post by J.A. Magallo » Sun, 01 Dec 2002 18:20:07



HI all...

Tell me if this is correct. GCC-3.2 spits a wrning like this when
building -jam, I did not noticed before:

ialloc.c: In function `ext3_new_inode':
ialloc.c:546: warning: comparison between pointer and integer
ialloc.c:682: warning: label `out' defined but not used
ialloc.c:520: warning: `gdp' might be used uninitialized in this function

Line is question is:
    if (gdp == -1)
        goto fail;
It comes from the orlov-allocator for ext3.

Looking at the structure of ext3_new_inode:

struct inode * ext3_new_inode (handle_t *handle, struct inode * dir, int mode)
{
    ...
    struct ext3_group_desc * gdp;

repeat:
    ...
    if (gdp == -1)
        goto fail;
    ...
    gdp = ext3_get_group_desc (sb, group, &bh2);
    ...                    

Thigs to note:
- gdp is used without previous initialization.
- gdp is a pointer and is compared with -1

Should not the structure be:
    gdp = ext3_get_group_desc (sb, group, &bh2);
    if (!gdp)
        goto fail;

Can anybody check 2.5 for this also ?

???

TIA

--

werewolf.able.es                         \           It's better when it's free
Mandrake Linux release 9.1 (Cooker) for i586
Linux 2.4.20-jam0 (gcc 3.2 (Mandrake Linux 9.1 3.2-4mdk))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

ext3-orlov for 2.4

Post by Andrew Morto » Mon, 02 Dec 2002 00:20:09



> HI all...

> Tell me if this is correct. GCC-3.2 spits a wrning like this when
> building -jam, I did not noticed before:

> ialloc.c: In function `ext3_new_inode':
> ialloc.c:546: warning: comparison between pointer and integer
> ialloc.c:682: warning: label `out' defined but not used
> ialloc.c:520: warning: `gdp' might be used uninitialized in this function

> Line is question is:
>     if (gdp == -1)
>         goto fail;
> It comes from the orlov-allocator for ext3.

gdp will be NULL on failure.  The above code isn't right.

Quote:> Should not the structure be:
>     gdp = ext3_get_group_desc (sb, group, &bh2);
>     if (!gdp)
>         goto fail;

yes.

Quote:> Can anybody check 2.5 for this also ?

Is OK.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. naive but spectacular ext3 HTREE+Orlov benchmark

On a 192 megabyte 1.1GHz laptop with boring disk, 13G well worn partition -
this is not a stylized benchmark! Result is repeatable though.

Summary of HTREE ext3 Orlov vs non-Orlov, in real minute:seconds

                                2.5.45  2.5.46
----------------------------------------------
unpacking kernel tar.bz2:       1:26    1:16
cold traversal:                 1:01.5  0:42.9
hot traversal:                  0:51.0  0:34.5
delete                          0:05.3  <0:02

Congratulations everybody, this is a major result! You can in fact *hear*
the difference. With the Orlov allocator, seeks are much more higher pitched
as if they are generally over shorter distances - which they probably are.

The cold traversal boils down to 4.47 megabytes/second over 13035 files,
close to 303 files/second which is comfortably more than the number of
seeks/second I expect this disk to be able to do. Magic is being performed
here.

traverse script:
#!/bin/sh
find . -type f | xargs -n 500 cat > /dev/null

On Linux 2.5.45, ext3+HTREE:

# mount /dev/hda3 /mnt
$ cd mnt
$ time tar xjf linux-2.5.45.tar.bz2
real    1m26.640s
user    0m48.256s
sys     0m4.592s

*reboot*

# mount /dev/hda3 /mnt
$ cd mnt/linux-2.5.45
$ time ../traverse
real    1m1.518s
user    0m0.159s
sys     0m1.267s
$ time ../traverse
real    0m51.007s
user    0m0.143s
sys     0m1.236s

$ cd .. ; time rm -rf linux-2.5.45
real    0m5.248s
user    0m0.020s
sys     0m0.440s

Same on Linux 2.5.46, ext3+HTREE+Orlov:
# mount /dev/hda3 /mnt
$ cd mnt
$ time tar xjf linux-2.5.45.tar.bz2
real    1m16.071s
user    0m48.291s
sys     0m4.918s

*reboot*

# mount /dev/hda3 /mnt
$ cd mnt/linux-2.5.45
$ time ../traverse
real    0m42.869s
user    0m0.148s
sys     0m1.323s
$ time ../traverse
real    0m34.468s
user    0m0.151s
sys     0m1.358s
$ cd .. ; rm -rf linux-2.5.45
$

This last delete wasn't measured but it appeared to be <2 seconds.

--
http://www.PowerDNS.com          Versatile DNS Software & Services
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. printer problem

3. Orlov block allocator for ext3

4. Comcast@Home Cable Modem Service Help

5. 2.4.20/2.4.21 ext2|ext3 updates / Orlov Block Allocator

6. Mounting internal zip drive

7. 2.4: Minor build fix for ext3 (2.4 and 2.5)

8. Restoring corrupted files

9. 2.4.x write barriers (updated for ext3)

10. 2.4: Fix ext3 panic due to ll_rw_block behaviour after illegal block access.

11. ext3 patch for 2.4 ?

12. 2.4 ext3 ino_t removal

13. ext3/jbd breaks md stacking in 2.4