lkml.org 
[lkml]   [2004]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Add getdents32t syscall
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Linus Torvalds wrote:

    > - pre-fill the dirent area with 0xff or something

    fill whole temporary buffer allocated by opendir() for every call to
    getdents(2)?


    You are swapping a bit of additional kernel code for quite a bit of
    overhead at every program's runtime.

    Yes, you want to keep your code small and tidy, but getdents calls are
    frequent and the wasted cycles spent on the memory operations far
    outweigh the extra code. In many cases we have to clear a 8k+ buffer
    just because getdents fills in 200 bytes.


    Plus, the old code, like all compatibility interface, can over time be
    grouped together and moved to one side of the kernel so that they don't
    disturb the icache.

    - --
    ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.3 (GNU/Linux)

    iD8DBQFAPnNI2ijCOnn/RHQRAnynAKDH4GOGnF3ai/7UHdfc7siArOF7fwCePZZP
    huZUMCSGIhAM5uw1zgpLSmM=
    =YtUt
    -----END PGP SIGNATURE-----
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:01    [W:0.020 / U:3.292 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site