bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: basing *at functions over openat when available?


From: Paolo Bonzini
Subject: Re: basing *at functions over openat when available?
Date: Thu, 24 Sep 2009 14:47:15 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3


P.S. The Cygwin developers discovered that NtCreateFile/NtOpenFile, when
used to open a relative file, has quadratic behavior in the length of the
absolute file name being opened, in Windows XP and earlier; this time is
attributed to the system call and not the application.  Microsoft fixed it
to have linear performance on relative names in newer versions of Windows,
and even acknowledged the bug in earlier versions, but is not going to
address it.  So even if we implemented openat with these functions, it
would not add any speed to super-long paths under mingw on older Windows.

Yes, my only reason to use NtCreateFile/NtOpenFile would be to have non-racy fts, and see if I can eliminate the funny open wrappers.

More interesting will be implementing utimensat, where there are indeed
systems with openat and futimes where that may be the best fallback.

Indeed I mentioned fchmodat just as an example (and an ill-chosen one apparently), but this applies to any *at function.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]