From owner-freebsd-hackers@freebsd.org Thu Mar 9 04:40:44 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B79CD03E01 for ; Thu, 9 Mar 2017 04:40:44 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ipmail06.adl6.internode.on.net (ipmail06.adl6.internode.on.net [150.101.137.145]) by mx1.freebsd.org (Postfix) with ESMTP id 10E9D1F7 for ; Thu, 9 Mar 2017 04:40:43 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ppp121-45-87-165.bras1.adl6.internode.on.net (HELO midget.dons.net.au) ([121.45.87.165]) by ipmail06.adl6.internode.on.net with ESMTP; 09 Mar 2017 15:05:33 +1030 Received: from midget.dons.net.au (localhost [127.0.0.1]) by midget.dons.net.au (8.15.1/8.14.9) with ESMTPS id v294ZN1N091273 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 9 Mar 2017 15:05:23 +1030 (CST) (envelope-from darius@dons.net.au) Received: (from mailnull@localhost) by midget.dons.net.au (8.15.1/8.14.9/Submit) id v294KcF8081429 for ; Thu, 9 Mar 2017 14:50:38 +1030 (CST) (envelope-from darius@dons.net.au) X-Authentication-Warning: midget.dons.net.au: mailnull set sender to using -f Received: from [10.176.136.153] (ns.dons.net.au [10.0.2.1]) by ns.dons.net.au (envelope-sender ) (MIMEDefang) with ESMTP id v294Kamt081426; Thu, 09 Mar 2017 14:50:38 +1030 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: open(): O_EVTONLY and O_NOATIME From: "O'Connor, Daniel" In-Reply-To: <20170309031532.0079ab35@rimwks> Date: Thu, 9 Mar 2017 14:50:36 +1030 Cc: Konstantin Belousov , freebsd-hackers@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20170309022554.18875d07@rimwks> <20170308235016.GT30979@kib.kiev.ua> <20170309031532.0079ab35@rimwks> To: Rozhuk Ivan X-Mailer: Apple Mail (2.3259) X-Spam-Score: -1 () No, score=-1.0 required=5.0 tests=ALL_TRUSTED, RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.0 X-Scanned-By: MIMEDefang 2.75 on 10.0.2.1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Mar 2017 04:40:44 -0000 > On 9 Mar 2017, at 10:45, Rozhuk Ivan wrote: >=20 >> consider the most often cause for atime update, read(2): VFS >> translates the syscall through all its layers into VOP_READ() call >> for fs-specific action, and the signature of the call is >> VOP_READ(struct vnode *, struct uio *, int ioflag, struct >> ucred *); As you see, there file is already down-casted to vnode, and >> of course we do not want the vnode to loose atime updates just >> because one file is opened which asked for no atime updates. As >> result, upper VFS layers must pass a flag to VOP_READ(). >>=20 >> You are welcome to finish the analysis and to prototype the solution. >=20 > ???? > If file system cant be mount with NOATIME - then it already ready to = support O_NOATIME. Konstantin means that due to the way the file system driver gets = requests there is no information about how they were opened in the first = place. This means that there is no way it could look at all the FDs which have = this file open and see they are all noatime and then disable atime just = for that one. You are right in that if an FS can be mounted noatime it should be able = to work but unfortunately there is no plumbing between the open of the = file and the file system that supports that. -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C