Re: [RFC] proc: fix create timestamp of files in proc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx> 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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux