Re: [PATCH] Add getdents32t syscall

From: Ulrich Drepper
Date: Thu Feb 26 2004 - 17:34:10 EST


-----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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/