lkml.org 
[lkml]   [2020]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] fs, pseudo: Do not update atime for pseudo inodes
On Wed, Jun 17, 2020 at 5:53 PM Mel Gorman <mgorman@techsingularity.net> wrote:
>
> The kernel uses internal mounts created by kern_mount() and populated
> with files with no lookup path by alloc_file_pseudo() for a variety of
> reasons. An relevant example is anonymous pipes because every vfs_write
> also checks if atime needs to be updated even though it is unnecessary.
> Most of the relevant users for alloc_file_pseudo() either have no statfs
> helper or use simple_statfs which does not return st_atime. The closest

st_atime is returned by simple_getattr()

> proxy measure is the proc fd representations of such inodes which do not
> appear to change once they are created. This patch sets the S_NOATIME
> on inode->i_flags for inodes created by new_inode_pseudo() so that atime
> will not be updated.
>

new_inode() calls new_inode_pseudo() ...
You need to factor out a new helper.

Either you can provide callers analysis of all new_inode_pseudo() users
or use a new helper to set S_NOATIME and call it from the relevant users
(pipe, socket).

How about S_NOCMTIME while you are at it?
Doesn't file_update_time() show in profiling?
Is there a valid use case for updating c/mtime of anonymous socket/pipe?

Thanks,
Amir.

\
 
 \ /
  Last update: 2020-06-19 15:45    [W:0.068 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site