tl;dr for those who have been following along:
There are several changes in this version. The conversion of ctime to
be a ktime_t value has been dropped, and we now use an unused bit in
the nsec field as the QUERIED flag (like the earlier patchset did).
The floor value is now tracked as a monoton
The VFS has always used coarse-grained timestamps when updating the
ctime and mtime after a change. This has the benefit of allowing
filesystems to optimize away a lot metadata updates, down to around 1
per jiffy, even when a file is under heavy writes.
Unfortunately, this has always been an issue
Add some tracepoints around various multigrain timestamp events.
Signed-off-by: Jeff Layton
---
fs/inode.c | 5 ++
fs/stat.c| 3 ++
include/trace/events/timestamp.h | 109 +++
3 files changed, 117 insertions(+)
Keep a pair of percpu counters so we can track what proportion of
timestamps is fine-grained.
Signed-off-by: Jeff Layton
---
fs/inode.c | 49 -
1 file changed, 48 insertions(+), 1 deletion(-)
diff --git a/fs/inode.c b/fs/inode.c
index 4ab7aee3558c
The setattr codepath is still using coarse-grained timestamps, even on
multigrain filesystems. To fix this, we need to fetch the timestamp for
ctime updates later, at the point where the assignment occurs in
setattr_copy.
On a multigrain inode, ignore the ia_ctime in the attrs, and always
update t
Add a high-level document that describes how multigrain timestamps work,
rationale for them, and some info about implementation and tradeoffs.
Signed-off-by: Jeff Layton
---
Documentation/filesystems/multigrain-ts.rst | 120
1 file changed, 120 insertions(+)
diff --
Enable multigrain timestamps, which should ensure that there is an
apparent change to the timestamp whenever it has been written after
being actively observed via getattr.
Also, anytime the mtime changes, the ctime must also change, and those
are now the only two options for xfs_trans_ichgtime. Ha
Enable multigrain timestamps, which should ensure that there is an
apparent change to the timestamp whenever it has been written after
being actively observed via getattr.
For ext4, we only need to enable the FS_MGTIME flag.
Signed-off-by: Jeff Layton
---
fs/ext4/super.c | 2 +-
1 file changed,
Enable multigrain timestamps, which should ensure that there is an
apparent change to the timestamp whenever it has been written after
being actively observed via getattr.
Beyond enabling the FS_MGTIME flag, this patch eliminates
update_time_for_write, which goes to great pains to avoid in-memory
Enable multigrain timestamps, which should ensure that there is an
apparent change to the timestamp whenever it has been written after
being actively observed via getattr.
tmpfs only requires the FS_MGTIME flag.
Signed-off-by: Jeff Layton
---
mm/shmem.c | 2 +-
1 file changed, 1 insertion(+), 1
On Fri, 05 Jul 2024 13:02:36 -0400
Jeff Layton wrote:
> diff --git a/include/trace/events/timestamp.h
> b/include/trace/events/timestamp.h
> new file mode 100644
> index ..a004e5572673
> --- /dev/null
> +++ b/include/trace/events/timestamp.h
> @@ -0,0 +1,109 @@
> +/* SPDX-License-Ide
On Fri, 2024-07-05 at 14:07 -0400, Steven Rostedt wrote:
> On Fri, 05 Jul 2024 13:02:36 -0400
> Jeff Layton wrote:
>
> > diff --git a/include/trace/events/timestamp.h
> > b/include/trace/events/timestamp.h
> > new file mode 100644
> > index ..a004e5572673
> > --- /dev/null
> > +++ b/i
On 7/5/24 10:02 AM, Jeff Layton wrote:
> Add a high-level document that describes how multigrain timestamps work,
> rationale for them, and some info about implementation and tradeoffs.
>
> Signed-off-by: Jeff Layton
> ---
> Documentation/filesystems/multigrain-ts.rst | 120
> +++
13 matches
Mail list logo