[go: up one dir, main page]

|
|
Log in / Subscribe / Register

Why searches must start at the root or current directory

Why searches must start at the root or current directory

Posted Dec 16, 2010 15:54 UTC (Thu) by jhhaller (guest, #56103)
Parent article: Dcache scalability and RCU-walk

While not directly related to the dcache scalability patch, one thing I have been curious is why there has never been an open relative to an open directory. It seems that would be useful for compiler type applications which have to search for files in several locations. The typical pattern is to prepend the search path to the file path and try to open. This causes the search path to have to be scanned multiple times just to get to the point of trying to open the file. If the open could be relative to a directory file descriptor, then the application could open every directory in the search path, and just open the file relative to each of those descriptors until the open succeeded. This would reduce the number of dentry cache looks which need to be done, for that specific workload.

While I have no idea of the relative time savings this would provide, has there ever been a proposal to have such an alternate open call, or done any prototyping?


to post comments

Why searches must start at the root or current directory

Posted Dec 16, 2010 16:18 UTC (Thu) by corbet (editor, #1) [Link]

Try "man openat" then ask your question again :)


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds