On Sun, Apr 27, 2008 at 09:43:05PM -0700, Ulrich Drepper wrote:I'm not sure this would help in the cold cache case, which is what Soeren originally complained about.[1] The problem is whaever information the user might need won't be store in the directory, so the filesystem would end having to stat the file anyway, incurring a disk seek, which was what the user was complaining about. A readdirplus() would save a whole bunch of system calls if the inode was already cached, yes, but I'm not sure that's it would be worth the effort given how small Linux's system call overhead would be. But in the cold cache case, you end up seeking all over the disk, and the only thing you can do is to try to keep the inodes close to each other, and to have either readdir() or the caller of readdir() sort all of the returned directory entries by inode number to avoid seeking all over the disk. - Ted [1] At least, not without making filesystem modifications; the problem is that if you're going to store the inode information (or part of the inode information) in the directory it has to get updated each time the inode gets updated, and that gets painful with hardlinks. There was a Usenix paper which explored this idea over ten years ago, and it's possible --- but then all directory entries need to have linked list so that that you can either (a) find the "master" directory entry which contains the inode information and be able to migrate inode information to another directory entry when the originl "master" dirent gets deleted, or (b) you keep the subset of the inode information in all of the directory entries of the hardlink, and have to update them all each time the inode information changes. --
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Artem Bityutskiy | [PATCH 18/44 take 2] [UBI] build unit implementation |
| James Morris | Re: LSM conversion to static interface |
git: | |
| Paul Jackson | [PATCH] cpuset sched_load_balance kmalloc fix |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Linus Torvalds | Re: [GIT]: Networking |
