This is the mail archive of the cygwin-patches mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Thu, 21 Jul 2005, Christopher Faylor wrote: > On Fri, Jul 22, 2005 at 01:32:50AM +0200, Vaclav Haisman wrote: > >the attached patch sets FILE_ATTRIBUTE_TEMPORARY on files opened by > >mkstemp() on WinNT class systems. Theoretically the OS should then be > >less eager to write such files onto the physical storage and use cache > >instead. > > Thank you for the patch but unless you can demonstrate some obvious > performance improvements I don't think we'll be applying it. You've > slowed down (slightly) the common case of calling open for the uncommon > case of calling mk?temp. I am not sure what kind of slow down do you mean. Is it the one extra call? In that case the attached modified patch should fix it. The call to open_with_attributes() in open() gets inlined, I have checked the resulting .s file. > > Also, if this was to be accepted, the preference for this type of thing > is to add a capability like wincap.has_file_attribute_temporary () rather > than just relying on is_winnt (). Done. > > cgf > VH 2005-07-22 Vaclav Haisman <v.haisman@sh.cvut.cz> * wincap.h (wincap::has_file_attribute_temporary): New field. (wincapc::has_file_attribute_temporary): New accessor. * wincap.cc (wincap_unknown): Initialize has_file_attribute_temporary field. (wincap_95): Ditto. (wincap_95osr2): Ditto. (wincap_98): Ditto. (wincap_98se): Ditto. (wincap_me): Ditto. (wincap_nt3): Ditto. (wincap_nt4): Ditto. (wincap_nt4sp4): Ditto. (wincap_2000): Ditto. (wincap_xp): Ditto. (wincap_2003): Ditto. * syscalls.cc (open_with_attributes): Rename open() to open_with_attributes(). Add fileattr parameter and use it. Add explicit mode_t parameter for mode. Tweak debugging syscall_printf() calls to reflect the new parameter. (open): Reimplement using open_with_attributes(). * fhandler.cc (fhandler_base::open): Use pc.file_attributes() when opening disk file. * mktemp.cc (_gettemp): Set FILE_ATTRIBUTE_TEMPORARY on WinNT using open_with_attributes().
Attachment:
file_attribute_temporary.patch
Description: Text document
Attachment:
file_attribute_temporary.ChangeLog
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |