From owner-svn-src-all@FreeBSD.ORG Sun Mar 29 17:51:42 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96D4ECBB; Sun, 29 Mar 2015 17:51:42 +0000 (UTC) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 55451CF; Sun, 29 Mar 2015 17:51:42 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id CBE46358C5A; Sun, 29 Mar 2015 19:51:37 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id B126128494; Sun, 29 Mar 2015 19:51:37 +0200 (CEST) Date: Sun, 29 Mar 2015 19:51:37 +0200 From: Jilles Tjoelker To: Don Lewis Subject: Re: svn commit: r280308 - head/sys/fs/devfs Message-ID: <20150329175137.GD95224@stack.nl> References: <20150322162507.GD2379@kib.kiev.ua> <201503221825.t2MIP7jv096531@gw.catspoiler.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503221825.t2MIP7jv096531@gw.catspoiler.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org, delphij@FreeBSD.org, brde@optusnet.com.au, kostikbel@gmail.com X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2015 17:51:42 -0000 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 POLA violation, but I'm not sure what's the best way to fix it. By the way, w uses atime and who -u uses mtime. Some options are: * Bypass vfs_timestamp() and hard-code second accuracy in devfs; futimens() will still set timestamps to the nanosecond, even with UTIME_NOW. A timestamp update after UTIME_NOW setting may set back the timestamp to an older value. * Make vfs.timestamp_precision filesystem-specific. Since this does not affect futimens() with explicit timestamps, it will not cause strange situations with cp -p. * Restrict file times on devfs to seconds. * Somehow add a special case for TTY devices so they will always keep timestamps. * Somehow add a special case for "performance-critical" devices so they will not keep timestamps. * Change the default for vfs.timestamp_precision to 1, which still provides non-zero nanoseconds (so much of the same bugs) but is not so slow. The file server people won't like this though. My proposal for delayed updates as in UFS clearly does not work for TTY idle times, so there is no point in that. -- Jilles Tjoelker