Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp1602819imp; Fri, 22 Feb 2019 07:01:19 -0800 (PST) X-Google-Smtp-Source: AHgI3IYemsaLSo2n20UQ/IyTon4Hm0udwc2qIkZ9vPu+XknGwjfR8N71r04wPwrkXqSMh3iCJ9/t X-Received: by 2002:a17:902:503:: with SMTP id 3mr4620347plf.233.1550847679836; Fri, 22 Feb 2019 07:01:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550847679; cv=none; d=google.com; s=arc-20160816; b=oXI5eveQss4t+wlQVyyCSV/UZvxwyGMuBF7GooGfalFtHRg+snlW07+B65Pu6B2y9U SkxKmnK/mZXlJL8mEZEOBHrudfbQRjTzMhIRExg6ykze/Fx5UqQ0Ck0ifeobrxSGbX+0 0UCJUPRBlmONnsmy/horCBDiYrKE2ypvVj+J+P872f8FZjmGgdkTwI8EdZFTc6Hyynrn ZLdA+tziSVTkw669TbTn+eJXUjD+XlHQDrPnWQEiTLC4jsFHJ8a5vnCegrFmovYx2+R9 ePh/fccSUFkoNZUpK3Wd5Y8wEUnYWtOIwnu5Kp+GzSv27SoJOwwCUxxvDnznWmWRNydm aVzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=+nAWGpM0/ofIp19OtflwgJgOG6Gl/A+DxnTTX+TkMVs=; b=pjNeQ/kGgVdebAqy16JbcRiywlA2g+l+cWMB+c4VY9nr12UYS9lvciXz2lfZs2+6dH D4oaqNxGB53AU5SOYSZq4NX14Z6Zub498w86nAU0waPvtDYRyhe/q7WOTdiIaz0W+7e6 JbvXwcmDxhC8mcNzPY1VGL1Mjwzf5xJHFKZdMiw6hLr4xjDldxrItV5rxMtbC3e8kp6b Qw6Wv95gUb07+PdppaJlY+AaQ1pYMLEn0cdwsfOac3J7C65bJExtwTDD2AKujpaZgFtd QQKlIJTKzR4q2ta/fGs4yHhUvJyR9mYpmTCO70I7TsCfZh2bMzYuWEyRGNDckcy3TEdQ TVmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t24si1505705pgv.141.2019.02.22.07.01.03; Fri, 22 Feb 2019 07:01:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727200AbfBVPAX (ORCPT + 99 others); Fri, 22 Feb 2019 10:00:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41840 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726361AbfBVPAW (ORCPT ); Fri, 22 Feb 2019 10:00:22 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 67DAE5D5EC; Fri, 22 Feb 2019 15:00:22 +0000 (UTC) Received: from laptop.jcline.org (ovpn-124-228.rdu2.redhat.com [10.10.124.228]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 429E360180; Fri, 22 Feb 2019 15:00:22 +0000 (UTC) Received: from laptop.jcline.org (localhost [IPv6:::1]) by laptop.jcline.org (Postfix) with ESMTPS id 4E4397045B3B; Fri, 22 Feb 2019 10:00:21 -0500 (EST) Date: Fri, 22 Feb 2019 10:00:20 -0500 From: Jeremy Cline To: Alexey Dobriyan Cc: David Both , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] proc: update i_atime when reading files Message-ID: <20190222150020.GA14465@laptop.jcline.org> References: <20190221163714.22330-1-jcline@redhat.com> <20190222053742.GA4270@avx2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190222053742.GA4270@avx2> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 22 Feb 2019 15:00:22 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 22, 2019 at 08:37:42AM +0300, Alexey Dobriyan wrote: > On Thu, Feb 21, 2019 at 11:37:14AM -0500, Jeremy Cline wrote: > > Prior to commit 1da4d377f943 ("proc: revalidate misc dentries"), the > > access, modify, and change times of files in /proc were just the current > > time. > > Ehh, actually no. Doing > > $(which sleep) infinity > will sabotage atime updates because dentry and inode will be pinned in > caches. > > "revalidate misc denries" commit simply makes the effect (much) more > visible by making objects stay in caches for longer. Indeed. It wasn't my intention to imply there's anything wrong with that commit, just that that's what caused this apparent change in behavior for users. In the "common" case when something hasn't pinned the dentry and inode what users saw was the current time. > > > Now the mtime and ctime values change mostly as a user would > > expect, but the atime isn't updated when the file read. This patch > > updates the access time of /proc files when they are read. > > > rv = read(file, buf, count, ppos); > > + if (rv >= 0) > > + inode->i_atime = current_time(inode); > > + } > > Maybe it should be done given /proc is virtual so there are no concerns > about scheduling writes noone cares about to the filesystem. Sorry, maybe I've not had enough coffee yet, but I don't understand this sentence. Thanks, Jeremy