From: Luis Chamberlain <mcgrof@kernel.org>
To: Muchun Song <songmuchun@bytedance.com>
Cc: Zhang Yuchen <zhangyuchen.lcr@bytedance.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
David Howells <dhowells@redhat.com>,
Deepa Dinamani <deepa.kernel@gmail.com>,
Christoph Hellwig <hch@lst.de>,
linux-api@vger.kernel.org, Kees Cook <keescook@chromium.org>,
Iurii Zaikin <yzaikin@google.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [RFC] proc: fix create timestamp of files in proc
Date: Fri, 22 Jul 2022 09:08:32 -0700 [thread overview]
Message-ID: <YtrLgCttVa7IP7B6@bombadil.infradead.org> (raw)
In-Reply-To: <CAMZfGtXjK2BgpwTOGsWdKs9-3i0X9ohdbXJk=0DAmpEKUymS5w@mail.gmail.com>
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@kernel.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
prev parent reply other threads:[~2022-07-22 16:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-21 8:16 Zhang Yuchen
2022-07-21 16:16 ` Luis Chamberlain
2022-07-21 17:45 ` Eric W. Biederman
2022-07-21 19:47 ` Luis Chamberlain
2022-07-22 3:43 ` Muchun Song
2022-07-22 9:17 ` Yuchen Zhang
2022-07-22 16:08 ` Luis Chamberlain [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YtrLgCttVa7IP7B6@bombadil.infradead.org \
--to=mcgrof@kernel.org \
--cc=deepa.kernel@gmail.com \
--cc=dhowells@redhat.com \
--cc=ebiederm@xmission.com \
--cc=hch@lst.de \
--cc=keescook@chromium.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=songmuchun@bytedance.com \
--cc=torvalds@linux-foundation.org \
--cc=yzaikin@google.com \
--cc=zhangyuchen.lcr@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®