[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YtrLgCttVa7IP7B6@bombadil.infradead.org>
Date: Fri, 22 Jul 2022 09:08:32 -0700
From: Luis Chamberlain <mcgrof@...nel.org>
To: Muchun Song <songmuchun@...edance.com>
Cc: Zhang Yuchen <zhangyuchen.lcr@...edance.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
David Howells <dhowells@...hat.com>,
Deepa Dinamani <deepa.kernel@...il.com>,
Christoph Hellwig <hch@....de>, linux-api@...r.kernel.org,
Kees Cook <keescook@...omium.org>,
Iurii Zaikin <yzaikin@...gle.com>,
LKML <linux-kernel@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [RFC] proc: fix create timestamp of files in proc
On Fri, Jul 22, 2022 at 11:43:49AM +0800, Muchun Song wrote:
> On Fri, Jul 22, 2022 at 12:16 AM Luis Chamberlain <mcgrof@...nel.org> wrote:
> > On Thu, Jul 21, 2022 at 04:16:17PM +0800, Zhang Yuchen wrote:
> > > The file timestamp in procfs is the timestamp when the inode was
> > > created. If the inode of a file in procfs is reclaimed, the inode
> > > will be recreated when it is opened again, and the timestamp will
> > > be changed to the time when it was recreated.
> >
> > The commit log above starts off with a report of the directory
> > of a PID. When does the directory of a PID change dates when its
> > respective start_time does not? When does this reclaim happen exactly?
> > Under what situation?
>
> IMHO, when the system is under memory pressure, then the proc
> inode can be reclaimed, it is also true when we `echo 3 >
> /proc/sys/vm/drop_caches`. After this operation, the proc inode's
> timestamp is changed.
Good point.
> Maybe the users think the timestamp of /proc/$pid directory is equal to
> the start_time of a process, I think it is because of a comment of
> shortage about the meaning of the timestamp of /proc files.
I'll send a documentation enhancement for this. Thanks for helping with
improving the quality of your peer's patches / feedback in the future!
Luis
Powered by blists - more mailing lists