Re: svn commit: r280308 - head/sys/fs/devfs

2015-03-31 Thread Bruce Evans
On Mon, 30 Mar 2015, Konstantin Belousov wrote: On Mon, Mar 30, 2015 at 03:14:10PM +1100, Bruce Evans wrote: File timestamps use CLOCK_REALTIME, so they are supposed to go backwards sometimes. More importantly, if the time is set to a future time (by utimes(), etc., not due to a clock step),

Re: svn commit: r280308 - head/sys/fs/devfs

2015-03-30 Thread Konstantin Belousov
On Mon, Mar 30, 2015 at 03:14:10PM +1100, Bruce Evans wrote: File timestamps use CLOCK_REALTIME, so they are supposed to go backwards sometimes. More importantly, if the time is set to a future time (by utimes(), etc., not due to a clock step), this prevents it being correted. I think you

Re: svn commit: r280308 - head/sys/fs/devfs

2015-03-29 Thread Bruce Evans
On Sun, 29 Mar 2015, Jilles Tjoelker wrote: On Sun, Mar 22, 2015 at 11:25:07AM -0700, Don Lewis wrote: It's not totally worthless. I think the mtime on tty devices is used to calculate the idle time that is printed by the w command. We just don't need nanosecond accuracy for that. Hmm. The

Re: svn commit: r280308 - head/sys/fs/devfs

2015-03-29 Thread Bruce Evans
On Sun, 29 Mar 2015, Konstantin Belousov wrote: Interesting complication with the devfs timestamp update is that devfs_read_f() and devfs_write_f() do not lock the vnode. So whatever update method is used, stat(2) on devfs might return inconsistent value, since tv_src/tv_nsec cannot be updated

Re: svn commit: r280308 - head/sys/fs/devfs

2015-03-29 Thread Bruce Evans
On Mon, 30 Mar 2015, Bruce Evans wrote: On Sun, 29 Mar 2015, Konstantin Belousov wrote: Interesting complication with the devfs timestamp update is that devfs_read_f() and devfs_write_f() do not lock the vnode. So whatever update method is used, stat(2) on devfs might return inconsistent

Re: svn commit: r280308 - head/sys/fs/devfs

2015-03-29 Thread Jilles Tjoelker
On Sun, Mar 22, 2015 at 11:25:07AM -0700, Don Lewis wrote: It's not totally worthless. I think the mtime on tty devices is used to calculate the idle time that is printed by the w command. We just don't need nanosecond accuracy for that. Hmm. The idle time on tty devices breaking is a clear

Re: svn commit: r280308 - head/sys/fs/devfs

2015-03-29 Thread Konstantin Belousov
On Sun, Mar 29, 2015 at 07:51:37PM +0200, Jilles Tjoelker wrote: On Sun, Mar 22, 2015 at 11:25:07AM -0700, Don Lewis wrote: It's not totally worthless. I think the mtime on tty devices is used to calculate the idle time that is printed by the w command. We just don't need nanosecond

Re: svn commit: r280308 - head/sys/fs/devfs

2015-03-29 Thread Don Lewis
On 29 Mar, Jilles Tjoelker wrote: On Sun, Mar 22, 2015 at 11:25:07AM -0700, Don Lewis wrote: It's not totally worthless. I think the mtime on tty devices is used to calculate the idle time that is printed by the w command. We just don't need nanosecond accuracy for that. Hmm. The idle

Re: svn commit: r280308 - head/sys/fs/devfs

2015-03-22 Thread Jilles Tjoelker
On Sat, Mar 21, 2015 at 08:49:00PM +1100, Bruce Evans wrote: On Sat, 21 Mar 2015, Xin LI wrote: Log: Disable timestamping on devfs read/write operations by default. Currently we update timestamps unconditionally when doing read or write operations. This may slow things down on

Re: svn commit: r280308 - head/sys/fs/devfs

2015-03-22 Thread Konstantin Belousov
On Sun, Mar 22, 2015 at 02:37:09PM +0100, Jilles Tjoelker wrote: On Sat, Mar 21, 2015 at 08:49:00PM +1100, Bruce Evans wrote: On Sat, 21 Mar 2015, Xin LI wrote: Log: Disable timestamping on devfs read/write operations by default. Currently we update timestamps unconditionally

Re: svn commit: r280308 - head/sys/fs/devfs

2015-03-22 Thread Kubilay Kocak
On 22/03/2015 1:27 AM, Konstantin Belousov wrote: On Sat, Mar 21, 2015 at 11:00:09PM +1100, Kubilay Kocak wrote: On 21/03/2015 12:14 PM, Xin LI wrote: Author: delphij Date: Sat Mar 21 01:14:11 2015 New Revision: 280308 URL: https://svnweb.freebsd.org/changeset/base/280308 Log: Disable

Re: svn commit: r280308 - head/sys/fs/devfs

2015-03-22 Thread Bruce Evans
On Sun, 22 Mar 2015, Jilles Tjoelker wrote: On Sat, Mar 21, 2015 at 08:49:00PM +1100, Bruce Evans wrote: On Sat, 21 Mar 2015, Xin LI wrote: Log: Disable timestamping on devfs read/write operations by default. I don't like this. It defaults to non-POSIX-conformant behaviour... The

Re: svn commit: r280308 - head/sys/fs/devfs

2015-03-22 Thread Don Lewis
On 22 Mar, Konstantin Belousov wrote: On Sun, Mar 22, 2015 at 02:37:09PM +0100, Jilles Tjoelker wrote: On Sat, Mar 21, 2015 at 08:49:00PM +1100, Bruce Evans wrote: On Sat, 21 Mar 2015, Xin LI wrote: Log: Disable timestamping on devfs read/write operations by default. Currently

Re: svn commit: r280308 - head/sys/fs/devfs

2015-03-22 Thread Bruce Evans
On Sun, 22 Mar 2015, Konstantin Belousov wrote: On Sun, Mar 22, 2015 at 02:37:09PM +0100, Jilles Tjoelker wrote: On Sat, Mar 21, 2015 at 08:49:00PM +1100, Bruce Evans wrote: On Sat, 21 Mar 2015, Xin LI wrote: Log: Disable timestamping on devfs read/write operations by default. ... I

Re: svn commit: r280308 - head/sys/fs/devfs

2015-03-21 Thread Bruce Evans
On Sat, 21 Mar 2015, Xin LI wrote: Log: Disable timestamping on devfs read/write operations by default. Currently we update timestamps unconditionally when doing read or write operations. This may slow things down on hardware where reading timestamps is expensive (e.g. HPET, because of

Re: svn commit: r280308 - head/sys/fs/devfs

2015-03-21 Thread Kubilay Kocak
On 21/03/2015 12:14 PM, Xin LI wrote: Author: delphij Date: Sat Mar 21 01:14:11 2015 New Revision: 280308 URL: https://svnweb.freebsd.org/changeset/base/280308 Log: Disable timestamping on devfs read/write operations by default. Currently we update timestamps unconditionally when

Re: svn commit: r280308 - head/sys/fs/devfs

2015-03-21 Thread Konstantin Belousov
On Sat, Mar 21, 2015 at 11:00:09PM +1100, Kubilay Kocak wrote: On 21/03/2015 12:14 PM, Xin LI wrote: Author: delphij Date: Sat Mar 21 01:14:11 2015 New Revision: 280308 URL: https://svnweb.freebsd.org/changeset/base/280308 Log: Disable timestamping on devfs read/write operations

svn commit: r280308 - head/sys/fs/devfs

2015-03-20 Thread Xin LI
Author: delphij Date: Sat Mar 21 01:14:11 2015 New Revision: 280308 URL: https://svnweb.freebsd.org/changeset/base/280308 Log: Disable timestamping on devfs read/write operations by default. Currently we update timestamps unconditionally when doing read or write operations. This may