* [PATCH v3 0/3] NFS Client btime support
@ 2025-05-29 10:45 Benjamin Coddington
2025-05-29 10:45 ` [PATCH v3 1/3] Expand the type of nfs_fattr->valid Benjamin Coddington
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Benjamin Coddington @ 2025-05-29 10:45 UTC (permalink / raw)
To: Trond Myklebust, Anna Schumaker; +Cc: linux-nfs, Lance Shelton, Jeff Layton
We're getting requests to allow the client to support btime, current kNFSD
already supports this for compatible filesystems.
I've rebased and worked the first three patches from
https://lore.kernel.org/linux-nfs/20211227190504.309612-1-trondmy@kernel.org/
onto v6.14, and I've been driving them around bakeathon without any signs
of trouble yet this week.
Thanks Trond and Anne for this (years-ago) work.
v2 - fix unnecessary cast to printk
v3 - drop hunk unrolling INVALID_ATTR on 2/3, add BTIME to INVALID_ATTR
Anne Marie Merritt (1):
nfs: Add timecreate to nfs inode
Trond Myklebust (2):
Expand the type of nfs_fattr->valid
NFS: Return the file btime in the statx results when appropriate
fs/nfs/inode.c | 34 +++++++++++++++++++----
fs/nfs/nfs4proc.c | 14 +++++++++-
fs/nfs/nfs4trace.h | 3 ++-
fs/nfs/nfs4xdr.c | 24 +++++++++++++++++
fs/nfs/nfstrace.h | 3 ++-
include/linux/nfs_fs.h | 8 ++++++
include/linux/nfs_fs_sb.h | 2 +-
include/linux/nfs_xdr.h | 57 ++++++++++++++++++++-------------------
8 files changed, 109 insertions(+), 36 deletions(-)
--
2.47.0
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH v3 1/3] Expand the type of nfs_fattr->valid 2025-05-29 10:45 [PATCH v3 0/3] NFS Client btime support Benjamin Coddington @ 2025-05-29 10:45 ` Benjamin Coddington 2025-05-29 10:45 ` [PATCH v3 2/3] nfs: Add timecreate to nfs inode Benjamin Coddington ` (2 subsequent siblings) 3 siblings, 0 replies; 9+ messages in thread From: Benjamin Coddington @ 2025-05-29 10:45 UTC (permalink / raw) To: Trond Myklebust, Anna Schumaker; +Cc: linux-nfs, Lance Shelton, Jeff Layton From: Trond Myklebust <trond.myklebust@primarydata.com> We need to be able to track more than 32 attributes per inode. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Lance Shelton <lance.shelton@hammerspace.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Benjamin Coddington <bcodding@redhat.com> --- fs/nfs/inode.c | 2 +- include/linux/nfs_fs_sb.h | 2 +- include/linux/nfs_xdr.h | 54 +++++++++++++++++++-------------------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 119e447758b9..160f3478a835 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -2166,7 +2166,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) bool attr_changed = false; bool have_delegation; - dfprintk(VFS, "NFS: %s(%s/%lu fh_crc=0x%08x ct=%d info=0x%x)\n", + dfprintk(VFS, "NFS: %s(%s/%lu fh_crc=0x%08x ct=%d info=0x%llx)\n", __func__, inode->i_sb->s_id, inode->i_ino, nfs_display_fhandle_hash(NFS_FH(inode)), atomic_read(&inode->i_count), fattr->valid); diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index ee03f3cef30c..4b38b8e709f8 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h @@ -171,8 +171,8 @@ struct nfs_server { #define NFS_MOUNT_FORCE_RDIRPLUS 0x20000000 #define NFS_MOUNT_NETUNREACH_FATAL 0x40000000 - unsigned int fattr_valid; /* Valid attributes */ unsigned int caps; /* server capabilities */ + __u64 fattr_valid; /* Valid attributes */ unsigned int rsize; /* read size */ unsigned int rpages; /* read size (in pages) */ unsigned int wsize; /* write size */ diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 67f6632f723b..9cacbbd14787 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -45,7 +45,7 @@ struct nfs4_threshold { }; struct nfs_fattr { - unsigned int valid; /* which fields are valid */ + __u64 valid; /* which fields are valid */ umode_t mode; __u32 nlink; kuid_t uid; @@ -80,32 +80,32 @@ struct nfs_fattr { struct nfs4_label *label; }; -#define NFS_ATTR_FATTR_TYPE (1U << 0) -#define NFS_ATTR_FATTR_MODE (1U << 1) -#define NFS_ATTR_FATTR_NLINK (1U << 2) -#define NFS_ATTR_FATTR_OWNER (1U << 3) -#define NFS_ATTR_FATTR_GROUP (1U << 4) -#define NFS_ATTR_FATTR_RDEV (1U << 5) -#define NFS_ATTR_FATTR_SIZE (1U << 6) -#define NFS_ATTR_FATTR_PRESIZE (1U << 7) -#define NFS_ATTR_FATTR_BLOCKS_USED (1U << 8) -#define NFS_ATTR_FATTR_SPACE_USED (1U << 9) -#define NFS_ATTR_FATTR_FSID (1U << 10) -#define NFS_ATTR_FATTR_FILEID (1U << 11) -#define NFS_ATTR_FATTR_ATIME (1U << 12) -#define NFS_ATTR_FATTR_MTIME (1U << 13) -#define NFS_ATTR_FATTR_CTIME (1U << 14) -#define NFS_ATTR_FATTR_PREMTIME (1U << 15) -#define NFS_ATTR_FATTR_PRECTIME (1U << 16) -#define NFS_ATTR_FATTR_CHANGE (1U << 17) -#define NFS_ATTR_FATTR_PRECHANGE (1U << 18) -#define NFS_ATTR_FATTR_V4_LOCATIONS (1U << 19) -#define NFS_ATTR_FATTR_V4_REFERRAL (1U << 20) -#define NFS_ATTR_FATTR_MOUNTPOINT (1U << 21) -#define NFS_ATTR_FATTR_MOUNTED_ON_FILEID (1U << 22) -#define NFS_ATTR_FATTR_OWNER_NAME (1U << 23) -#define NFS_ATTR_FATTR_GROUP_NAME (1U << 24) -#define NFS_ATTR_FATTR_V4_SECURITY_LABEL (1U << 25) +#define NFS_ATTR_FATTR_TYPE BIT_ULL(0) +#define NFS_ATTR_FATTR_MODE BIT_ULL(1) +#define NFS_ATTR_FATTR_NLINK BIT_ULL(2) +#define NFS_ATTR_FATTR_OWNER BIT_ULL(3) +#define NFS_ATTR_FATTR_GROUP BIT_ULL(4) +#define NFS_ATTR_FATTR_RDEV BIT_ULL(5) +#define NFS_ATTR_FATTR_SIZE BIT_ULL(6) +#define NFS_ATTR_FATTR_PRESIZE BIT_ULL(7) +#define NFS_ATTR_FATTR_BLOCKS_USED BIT_ULL(8) +#define NFS_ATTR_FATTR_SPACE_USED BIT_ULL(9) +#define NFS_ATTR_FATTR_FSID BIT_ULL(10) +#define NFS_ATTR_FATTR_FILEID BIT_ULL(11) +#define NFS_ATTR_FATTR_ATIME BIT_ULL(12) +#define NFS_ATTR_FATTR_MTIME BIT_ULL(13) +#define NFS_ATTR_FATTR_CTIME BIT_ULL(14) +#define NFS_ATTR_FATTR_PREMTIME BIT_ULL(15) +#define NFS_ATTR_FATTR_PRECTIME BIT_ULL(16) +#define NFS_ATTR_FATTR_CHANGE BIT_ULL(17) +#define NFS_ATTR_FATTR_PRECHANGE BIT_ULL(18) +#define NFS_ATTR_FATTR_V4_LOCATIONS BIT_ULL(19) +#define NFS_ATTR_FATTR_V4_REFERRAL BIT_ULL(20) +#define NFS_ATTR_FATTR_MOUNTPOINT BIT_ULL(21) +#define NFS_ATTR_FATTR_MOUNTED_ON_FILEID BIT_ULL(22) +#define NFS_ATTR_FATTR_OWNER_NAME BIT_ULL(23) +#define NFS_ATTR_FATTR_GROUP_NAME BIT_ULL(24) +#define NFS_ATTR_FATTR_V4_SECURITY_LABEL BIT_ULL(25) #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \ | NFS_ATTR_FATTR_MODE \ -- 2.47.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 2/3] nfs: Add timecreate to nfs inode 2025-05-29 10:45 [PATCH v3 0/3] NFS Client btime support Benjamin Coddington 2025-05-29 10:45 ` [PATCH v3 1/3] Expand the type of nfs_fattr->valid Benjamin Coddington @ 2025-05-29 10:45 ` Benjamin Coddington 2025-06-12 7:22 ` kernel test robot 2025-06-12 15:28 ` Benjamin Coddington 2025-05-29 10:45 ` [PATCH v3 3/3] NFS: Return the file btime in the statx results when appropriate Benjamin Coddington 2025-05-29 11:06 ` [PATCH v3 0/3] NFS Client btime support Jeff Layton 3 siblings, 2 replies; 9+ messages in thread From: Benjamin Coddington @ 2025-05-29 10:45 UTC (permalink / raw) To: Trond Myklebust, Anna Schumaker; +Cc: linux-nfs, Lance Shelton, Jeff Layton From: Anne Marie Merritt <annemarie.merritt@primarydata.com> Add tracking of the create time (a.k.a. btime) along with corresponding bitfields, request, and decode xdr routines. Signed-off-by: Anne Marie Merritt <annemarie.merritt@primarydata.com> Signed-off-by: Lance Shelton <lance.shelton@hammerspace.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Benjamin Coddington <bcodding@redhat.com> --- fs/nfs/inode.c | 17 +++++++++++++++-- fs/nfs/nfs4proc.c | 14 +++++++++++++- fs/nfs/nfs4xdr.c | 24 ++++++++++++++++++++++++ fs/nfs/nfstrace.h | 3 ++- include/linux/nfs_fs.h | 8 ++++++++ include/linux/nfs_xdr.h | 3 +++ 6 files changed, 65 insertions(+), 4 deletions(-) diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 160f3478a835..2e36188a855b 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -197,6 +197,7 @@ void nfs_set_cache_invalid(struct inode *inode, unsigned long flags) if (!(flags & NFS_INO_REVAL_FORCED)) flags &= ~(NFS_INO_INVALID_MODE | NFS_INO_INVALID_OTHER | + NFS_INO_INVALID_BTIME | NFS_INO_INVALID_XATTR); flags &= ~(NFS_INO_INVALID_CHANGE | NFS_INO_INVALID_SIZE); } @@ -522,6 +523,7 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr) inode_set_atime(inode, 0, 0); inode_set_mtime(inode, 0, 0); inode_set_ctime(inode, 0, 0); + memset(&nfsi->btime, 0, sizeof(nfsi->btime)); inode_set_iversion_raw(inode, 0); inode->i_size = 0; clear_nlink(inode); @@ -545,6 +547,10 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr) inode_set_ctime_to_ts(inode, fattr->ctime); else if (fattr_supported & NFS_ATTR_FATTR_CTIME) nfs_set_cache_invalid(inode, NFS_INO_INVALID_CTIME); + if (fattr->valid & NFS_ATTR_FATTR_BTIME) + nfsi->btime = fattr->btime; + else if (fattr_supported & NFS_ATTR_FATTR_BTIME) + nfs_set_cache_invalid(inode, NFS_INO_INVALID_BTIME); if (fattr->valid & NFS_ATTR_FATTR_CHANGE) inode_set_iversion_raw(inode, fattr->change_attr); else @@ -1900,7 +1906,7 @@ static int nfs_inode_finish_partial_attr_update(const struct nfs_fattr *fattr, NFS_INO_INVALID_ATIME | NFS_INO_INVALID_CTIME | NFS_INO_INVALID_MTIME | NFS_INO_INVALID_SIZE | NFS_INO_INVALID_BLOCKS | NFS_INO_INVALID_OTHER | - NFS_INO_INVALID_NLINK; + NFS_INO_INVALID_NLINK | NFS_INO_INVALID_BTIME; unsigned long cache_validity = NFS_I(inode)->cache_validity; enum nfs4_change_attr_type ctype = NFS_SERVER(inode)->change_attr_type; @@ -2261,7 +2267,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) | NFS_INO_INVALID_BLOCKS | NFS_INO_INVALID_NLINK | NFS_INO_INVALID_MODE - | NFS_INO_INVALID_OTHER; + | NFS_INO_INVALID_OTHER + | NFS_INO_INVALID_BTIME; if (S_ISDIR(inode->i_mode)) nfs_force_lookup_revalidate(inode); attr_changed = true; @@ -2295,6 +2302,12 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) nfsi->cache_validity |= save_cache_validity & NFS_INO_INVALID_CTIME; + if (fattr->valid & NFS_ATTR_FATTR_BTIME) + nfsi->btime = fattr->btime; + else if (fattr_supported & NFS_ATTR_FATTR_BTIME) + nfsi->cache_validity |= + save_cache_validity & NFS_INO_INVALID_BTIME; + /* Check if our cached file size is stale */ if (fattr->valid & NFS_ATTR_FATTR_SIZE) { new_isize = nfs_size_to_loff_t(fattr->size); diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index b1d2122bd5a7..f7fb61f805a3 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -222,6 +222,7 @@ const u32 nfs4_fattr_bitmap[3] = { | FATTR4_WORD1_RAWDEV | FATTR4_WORD1_SPACE_USED | FATTR4_WORD1_TIME_ACCESS + | FATTR4_WORD1_TIME_CREATE | FATTR4_WORD1_TIME_METADATA | FATTR4_WORD1_TIME_MODIFY | FATTR4_WORD1_MOUNTED_ON_FILEID, @@ -243,6 +244,7 @@ static const u32 nfs4_pnfs_open_bitmap[3] = { | FATTR4_WORD1_RAWDEV | FATTR4_WORD1_SPACE_USED | FATTR4_WORD1_TIME_ACCESS + | FATTR4_WORD1_TIME_CREATE | FATTR4_WORD1_TIME_METADATA | FATTR4_WORD1_TIME_MODIFY, FATTR4_WORD2_MDSTHRESHOLD @@ -323,6 +325,9 @@ static void nfs4_bitmap_copy_adjust(__u32 *dst, const __u32 *src, if (!(cache_validity & NFS_INO_INVALID_OTHER)) dst[1] &= ~(FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP); + if (!(cache_validity & NFS_INO_INVALID_BTIME)) + dst[1] &= ~FATTR4_WORD1_TIME_CREATE; + if (nfs_have_delegated_mtime(inode)) { if (!(cache_validity & NFS_INO_INVALID_ATIME)) dst[1] &= ~FATTR4_WORD1_TIME_ACCESS; @@ -1307,7 +1312,8 @@ nfs4_update_changeattr_locked(struct inode *inode, NFS_INO_INVALID_ACCESS | NFS_INO_INVALID_ACL | NFS_INO_INVALID_SIZE | NFS_INO_INVALID_OTHER | NFS_INO_INVALID_BLOCKS | NFS_INO_INVALID_NLINK | - NFS_INO_INVALID_MODE | NFS_INO_INVALID_XATTR; + NFS_INO_INVALID_MODE | NFS_INO_INVALID_BTIME | + NFS_INO_INVALID_XATTR; nfsi->attrtimeo = NFS_MINATTRTIMEO(inode); } nfsi->attrtimeo_timestamp = jiffies; @@ -4047,6 +4053,10 @@ static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *f server->fattr_valid &= ~NFS_ATTR_FATTR_CTIME; if (!(res.attr_bitmask[1] & FATTR4_WORD1_TIME_MODIFY)) server->fattr_valid &= ~NFS_ATTR_FATTR_MTIME; + if (!(res.attr_bitmask[1] & FATTR4_WORD1_TIME_MODIFY)) + server->fattr_valid &= ~NFS_ATTR_FATTR_MTIME; + if (!(res.attr_bitmask[1] & FATTR4_WORD1_TIME_CREATE)) + server->fattr_valid &= ~NFS_ATTR_FATTR_BTIME; memcpy(server->attr_bitmask_nl, res.attr_bitmask, sizeof(server->attr_bitmask)); server->attr_bitmask_nl[2] &= ~FATTR4_WORD2_SECURITY_LABEL; @@ -5773,6 +5783,8 @@ void nfs4_bitmask_set(__u32 bitmask[], const __u32 src[], bitmask[1] |= FATTR4_WORD1_TIME_MODIFY; if (cache_validity & NFS_INO_INVALID_BLOCKS) bitmask[1] |= FATTR4_WORD1_SPACE_USED; + if (cache_validity & NFS_INO_INVALID_BTIME) + bitmask[1] |= FATTR4_WORD1_TIME_CREATE; if (cache_validity & NFS_INO_INVALID_SIZE) bitmask[0] |= FATTR4_WORD0_SIZE; diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 55bef5fbfa47..f8d019c9d58d 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -1623,6 +1623,7 @@ static void encode_readdir(struct xdr_stream *xdr, const struct nfs4_readdir_arg | FATTR4_WORD1_RAWDEV | FATTR4_WORD1_SPACE_USED | FATTR4_WORD1_TIME_ACCESS + | FATTR4_WORD1_TIME_CREATE | FATTR4_WORD1_TIME_METADATA | FATTR4_WORD1_TIME_MODIFY; attrs[2] |= FATTR4_WORD2_SECURITY_LABEL; @@ -4207,6 +4208,24 @@ static int decode_attr_time_access(struct xdr_stream *xdr, uint32_t *bitmap, str return status; } +static int decode_attr_time_create(struct xdr_stream *xdr, uint32_t *bitmap, struct timespec64 *time) +{ + int status = 0; + + time->tv_sec = 0; + time->tv_nsec = 0; + if (unlikely(bitmap[1] & (FATTR4_WORD1_TIME_CREATE - 1U))) + return -EIO; + if (likely(bitmap[1] & FATTR4_WORD1_TIME_CREATE)) { + status = decode_attr_time(xdr, time); + if (status == 0) + status = NFS_ATTR_FATTR_BTIME; + bitmap[1] &= ~FATTR4_WORD1_TIME_CREATE; + } + dprintk("%s: btime=%lld\n", __func__, time->tv_sec); + return status; +} + static int decode_attr_time_metadata(struct xdr_stream *xdr, uint32_t *bitmap, struct timespec64 *time) { int status = 0; @@ -4781,6 +4800,11 @@ static int decode_getfattr_attrs(struct xdr_stream *xdr, uint32_t *bitmap, goto xdr_error; fattr->valid |= status; + status = decode_attr_time_create(xdr, bitmap, &fattr->btime); + if (status < 0) + goto xdr_error; + fattr->valid |= status; + status = decode_attr_time_metadata(xdr, bitmap, &fattr->ctime); if (status < 0) goto xdr_error; diff --git a/fs/nfs/nfstrace.h b/fs/nfs/nfstrace.h index 7a058bd8c566..f49f064c5ee5 100644 --- a/fs/nfs/nfstrace.h +++ b/fs/nfs/nfstrace.h @@ -32,7 +32,8 @@ { NFS_INO_INVALID_BLOCKS, "INVALID_BLOCKS" }, \ { NFS_INO_INVALID_XATTR, "INVALID_XATTR" }, \ { NFS_INO_INVALID_NLINK, "INVALID_NLINK" }, \ - { NFS_INO_INVALID_MODE, "INVALID_MODE" }) + { NFS_INO_INVALID_MODE, "INVALID_MODE" }, \ + { NFS_INO_INVALID_BTIME, "INVALID_BTIME" }) #define nfs_show_nfsi_flags(v) \ __print_flags(v, "|", \ diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 67ae2c3f41d2..c585939b6cd6 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -160,6 +160,12 @@ struct nfs_inode { unsigned long flags; /* atomic bit ops */ unsigned long cache_validity; /* bit mask */ + /* + * NFS Attributes not included in struct inode + */ + + struct timespec64 btime; + /* * read_cache_jiffies is when we started read-caching this inode. * attrtimeo is for how long the cached information is assumed @@ -316,10 +322,12 @@ struct nfs4_copy_state { #define NFS_INO_INVALID_XATTR BIT(15) /* xattrs are invalid */ #define NFS_INO_INVALID_NLINK BIT(16) /* cached nlinks is invalid */ #define NFS_INO_INVALID_MODE BIT(17) /* cached mode is invalid */ +#define NFS_INO_INVALID_BTIME BIT(18) /* cached btime is invalid */ #define NFS_INO_INVALID_ATTR (NFS_INO_INVALID_CHANGE \ | NFS_INO_INVALID_CTIME \ | NFS_INO_INVALID_MTIME \ + | NFS_INO_INVALID_BTIME \ | NFS_INO_INVALID_SIZE \ | NFS_INO_INVALID_NLINK \ | NFS_INO_INVALID_MODE \ diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 9cacbbd14787..ac4bff6e9913 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -67,6 +67,7 @@ struct nfs_fattr { struct timespec64 atime; struct timespec64 mtime; struct timespec64 ctime; + struct timespec64 btime; __u64 change_attr; /* NFSv4 change attribute */ __u64 pre_change_attr;/* pre-op NFSv4 change attribute */ __u64 pre_size; /* pre_op_attr.size */ @@ -106,6 +107,7 @@ struct nfs_fattr { #define NFS_ATTR_FATTR_OWNER_NAME BIT_ULL(23) #define NFS_ATTR_FATTR_GROUP_NAME BIT_ULL(24) #define NFS_ATTR_FATTR_V4_SECURITY_LABEL BIT_ULL(25) +#define NFS_ATTR_FATTR_BTIME BIT_ULL(26) #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \ | NFS_ATTR_FATTR_MODE \ @@ -126,6 +128,7 @@ struct nfs_fattr { | NFS_ATTR_FATTR_SPACE_USED) #define NFS_ATTR_FATTR_V4 (NFS_ATTR_FATTR \ | NFS_ATTR_FATTR_SPACE_USED \ + | NFS_ATTR_FATTR_BTIME \ | NFS_ATTR_FATTR_V4_SECURITY_LABEL) /* -- 2.47.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v3 2/3] nfs: Add timecreate to nfs inode 2025-05-29 10:45 ` [PATCH v3 2/3] nfs: Add timecreate to nfs inode Benjamin Coddington @ 2025-06-12 7:22 ` kernel test robot 2025-06-12 15:32 ` Benjamin Coddington 2025-06-12 15:28 ` Benjamin Coddington 1 sibling, 1 reply; 9+ messages in thread From: kernel test robot @ 2025-06-12 7:22 UTC (permalink / raw) To: Benjamin Coddington Cc: oe-lkp, lkp, Lance Shelton, Trond Myklebust, Benjamin Coddington, linux-nfs, Trond Myklebust, Anna Schumaker, Jeff Layton, oliver.sang Hello, kernel test robot noticed a 41.2% regression of stress-ng.msg.ops_per_sec on: commit: f76e96bdd6405866e2c9c846baee0d9a0f0ae6b7 ("[PATCH v3 2/3] nfs: Add timecreate to nfs inode") url: https://github.com/intel-lab-lkp/linux/commits/Benjamin-Coddington/Expand-the-type-of-nfs_fattr-valid/20250529-184909 base: git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next patch link: https://lore.kernel.org/all/1e3677b0655fa2bbaba0817b41d111d94a06e5ee.1748515333.git.bcodding@redhat.com/ patch subject: [PATCH v3 2/3] nfs: Add timecreate to nfs inode testcase: stress-ng config: x86_64-rhel-9.4 compiler: gcc-12 test machine: 192 threads 2 sockets Intel(R) Xeon(R) 6740E CPU @ 2.4GHz (Sierra Forest) with 256G memory parameters: nr_threads: 100% testtime: 60s test: msg cpufreq_governor: performance If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <oliver.sang@intel.com> | Closes: https://lore.kernel.org/oe-lkp/202506121525.2eac47db-lkp@intel.com Details are as below: --------------------------------------------------------------------------------------------------> The kernel config and materials to reproduce are available at: https://download.01.org/0day-ci/archive/20250612/202506121525.2eac47db-lkp@intel.com ========================================================================================= compiler/cpufreq_governor/kconfig/nr_threads/rootfs/tbox_group/test/testcase/testtime: gcc-12/performance/x86_64-rhel-9.4/100%/debian-12-x86_64-20240206.cgz/lkp-srf-2sp2/msg/stress-ng/60s commit: 252685ecbe ("Expand the type of nfs_fattr->valid") f76e96bdd6 ("nfs: Add timecreate to nfs inode") 252685ecbe596954 f76e96bdd6405866e2c9c846bae ---------------- --------------------------- %stddev %change %stddev \ | \ 5.08e+09 +47.6% 7.498e+09 cpuidle..time 18432946 ± 2% -12.4% 16148461 cpuidle..usage 1806088 ± 2% -12.0% 1589397 meminfo.Active 1806088 ± 2% -12.0% 1589397 meminfo.Active(anon) 495901 ± 3% -17.3% 409985 meminfo.Mapped 1081547 ± 4% -19.3% 872340 meminfo.Shmem 649437 ± 10% -23.0% 500076 ± 9% numa-numastat.node0.local_node 754484 ± 5% -17.9% 619525 ± 4% numa-numastat.node0.numa_hit 748532 ± 9% -39.7% 451340 ± 10% numa-numastat.node1.local_node 841379 ± 5% -37.0% 529826 ± 4% numa-numastat.node1.numa_hit 754539 ± 5% -17.8% 620582 ± 4% numa-vmstat.node0.numa_hit 649492 ± 10% -22.8% 501133 ± 9% numa-vmstat.node0.numa_local 841753 ± 5% -37.0% 529938 ± 4% numa-vmstat.node1.numa_hit 748906 ± 9% -39.7% 451451 ± 10% numa-vmstat.node1.numa_local 44.37 +43.6% 63.73 vmstat.cpu.id 105.22 ± 4% -37.4% 65.88 ± 3% vmstat.procs.r 451750 ± 2% -5.4% 427132 vmstat.system.cs 569382 -19.3% 459463 vmstat.system.in 42.98 +20.1 63.12 mpstat.cpu.all.idle% 0.08 ± 2% +0.0 0.13 mpstat.cpu.all.soft% 53.19 -19.2 33.98 mpstat.cpu.all.sys% 2.89 -1.0 1.92 mpstat.cpu.all.usr% 5.83 ± 37% +342.9% 25.83 ± 21% mpstat.max_utilization.seconds 62.63 -36.7% 39.63 mpstat.max_utilization_pct 1.418e+09 ± 2% -41.2% 8.345e+08 stress-ng.msg.ops 23637039 ± 2% -41.2% 13908394 stress-ng.msg.ops_per_sec 24711 -46.6% 13195 stress-ng.time.involuntary_context_switches 10844 -35.8% 6960 stress-ng.time.percent_of_cpu_this_job_got 6233 -35.8% 4000 stress-ng.time.system_time 304.86 ± 2% -35.4% 196.99 stress-ng.time.user_time 14384284 ± 2% -7.0% 13373296 stress-ng.time.voluntary_context_switches 451179 ± 2% -11.9% 397468 proc-vmstat.nr_active_anon 1157519 -4.5% 1105647 proc-vmstat.nr_file_pages 123991 ± 3% -17.0% 102925 ± 2% proc-vmstat.nr_mapped 270071 ± 4% -19.2% 218199 proc-vmstat.nr_shmem 451179 ± 2% -11.9% 397468 proc-vmstat.nr_zone_active_anon 1599152 -28.0% 1151855 proc-vmstat.numa_hit 1401258 -31.9% 953920 proc-vmstat.numa_local 1653599 -27.8% 1194489 proc-vmstat.pgalloc_normal 1263495 ± 2% -32.5% 853108 proc-vmstat.pgfree 0.72 ± 2% +28.6% 0.93 perf-stat.i.MPKI 1.646e+10 -44.6% 9.125e+09 perf-stat.i.branch-instructions 80522106 -45.3% 44038855 perf-stat.i.branch-misses 10.65 ± 2% +3.5 14.20 perf-stat.i.cache-miss-rate% 59505253 ± 4% -27.2% 43333874 perf-stat.i.cache-misses 5.874e+08 ± 2% -46.3% 3.154e+08 perf-stat.i.cache-references 470043 ± 2% -6.2% 440783 perf-stat.i.context-switches 4.22 ± 2% +15.2% 4.87 perf-stat.i.cpi 3.605e+11 -35.1% 2.339e+11 perf-stat.i.cpu-cycles 121109 -58.4% 50415 perf-stat.i.cpu-migrations 6348 ± 4% -14.1% 5456 perf-stat.i.cycles-between-cache-misses 8.496e+10 -43.7% 4.781e+10 perf-stat.i.instructions 0.24 ± 2% -14.0% 0.21 perf-stat.i.ipc 2.44 ± 2% -6.2% 2.29 perf-stat.i.metric.K/sec 0.70 ± 3% +29.6% 0.91 perf-stat.overall.MPKI 10.11 ± 2% +3.6 13.74 perf-stat.overall.cache-miss-rate% 4.25 ± 2% +15.2% 4.89 perf-stat.overall.cpi 6084 ± 5% -11.3% 5397 perf-stat.overall.cycles-between-cache-misses 0.24 ± 2% -13.2% 0.20 perf-stat.overall.ipc 1.619e+10 -44.6% 8.975e+09 perf-stat.ps.branch-instructions 79190529 -45.3% 43288658 perf-stat.ps.branch-misses 58447379 ± 4% -27.1% 42615000 perf-stat.ps.cache-misses 5.778e+08 ± 2% -46.3% 3.102e+08 perf-stat.ps.cache-references 462305 ± 2% -6.2% 433581 perf-stat.ps.context-switches 3.547e+11 -35.1% 2.3e+11 perf-stat.ps.cpu-cycles 119173 -58.4% 49593 perf-stat.ps.cpu-migrations 8.356e+10 -43.7% 4.702e+10 perf-stat.ps.instructions 5.125e+12 -43.9% 2.878e+12 perf-stat.total.instructions 2152139 -59.4% 874031 sched_debug.cfs_rq:/.avg_vruntime.avg 2600983 ± 3% -50.6% 1284774 ± 4% sched_debug.cfs_rq:/.avg_vruntime.max 2015605 -68.3% 638226 sched_debug.cfs_rq:/.avg_vruntime.min 67727 ± 10% +54.9% 104927 ± 3% sched_debug.cfs_rq:/.avg_vruntime.stddev 0.34 ± 9% -33.9% 0.22 ± 5% sched_debug.cfs_rq:/.h_nr_queued.avg 0.33 ± 8% -33.5% 0.22 ± 5% sched_debug.cfs_rq:/.h_nr_runnable.avg 18436 ± 47% -90.7% 1706 ±140% sched_debug.cfs_rq:/.left_deadline.avg 2128677 ± 4% -84.6% 327700 ±140% sched_debug.cfs_rq:/.left_deadline.max 191419 ± 24% -87.7% 23588 ±140% sched_debug.cfs_rq:/.left_deadline.stddev 18435 ± 47% -90.7% 1706 ±140% sched_debug.cfs_rq:/.left_vruntime.avg 2128515 ± 4% -84.6% 327651 ±140% sched_debug.cfs_rq:/.left_vruntime.max 191406 ± 24% -87.7% 23584 ±140% sched_debug.cfs_rq:/.left_vruntime.stddev 2152139 -59.4% 874031 sched_debug.cfs_rq:/.min_vruntime.avg 2600983 ± 3% -50.6% 1284774 ± 4% sched_debug.cfs_rq:/.min_vruntime.max 2015605 -68.3% 638226 sched_debug.cfs_rq:/.min_vruntime.min 67727 ± 10% +54.9% 104927 ± 3% sched_debug.cfs_rq:/.min_vruntime.stddev 0.33 ± 9% -33.5% 0.22 ± 4% sched_debug.cfs_rq:/.nr_queued.avg 18435 ± 47% -90.7% 1706 ±140% sched_debug.cfs_rq:/.right_vruntime.avg 2128515 ± 4% -84.6% 327651 ±140% sched_debug.cfs_rq:/.right_vruntime.max 191406 ± 24% -87.7% 23584 ±140% sched_debug.cfs_rq:/.right_vruntime.stddev 428.21 ± 4% -34.6% 280.10 ± 3% sched_debug.cfs_rq:/.runnable_avg.avg 1451 ± 6% -30.8% 1004 ± 11% sched_debug.cfs_rq:/.runnable_avg.max 257.16 -24.4% 194.45 ± 3% sched_debug.cfs_rq:/.runnable_avg.stddev 428.09 ± 4% -34.6% 279.93 ± 3% sched_debug.cfs_rq:/.util_avg.avg 1449 ± 6% -30.7% 1004 ± 11% sched_debug.cfs_rq:/.util_avg.max 256.69 -24.3% 194.37 ± 3% sched_debug.cfs_rq:/.util_avg.stddev 131.86 ± 11% -64.9% 46.30 ± 4% sched_debug.cfs_rq:/.util_est.avg 155.10 ± 6% -40.9% 91.59 ± 11% sched_debug.cfs_rq:/.util_est.stddev 627218 ± 4% +14.9% 720808 ± 2% sched_debug.cpu.avg_idle.avg 150048 ± 4% +32.6% 198975 ± 4% sched_debug.cpu.avg_idle.stddev 491.93 +29.8% 638.73 sched_debug.cpu.clock_task.stddev 1640 ± 10% -34.5% 1074 ± 5% sched_debug.cpu.curr->pid.avg 0.00 ± 5% -22.3% 0.00 ± 5% sched_debug.cpu.next_balance.stddev 0.33 ± 9% -34.3% 0.22 ± 5% sched_debug.cpu.nr_running.avg 0.28 ± 13% +38.2% 0.39 ± 2% sched_debug.cpu.nr_uninterruptible.avg 227.17 ± 13% -54.3% 103.92 ± 62% sched_debug.cpu.nr_uninterruptible.max -121.42 +85.0% -224.67 sched_debug.cpu.nr_uninterruptible.min 49.87 ± 2% -48.0% 25.95 ± 24% sched_debug.cpu.nr_uninterruptible.stddev 0.01 ± 17% +37.5% 0.01 ± 5% perf-sched.sch_delay.avg.ms.__cond_resched.__kmalloc_node_noprof.load_msg.do_msgsnd.do_syscall_64 0.01 ± 8% +34.0% 0.01 ± 9% perf-sched.sch_delay.avg.ms.__cond_resched.stop_one_cpu.migrate_task_to.task_numa_migrate.isra 0.00 ±223% +961.1% 0.03 ± 20% perf-sched.sch_delay.avg.ms.irqentry_exit_to_user_mode.asm_exc_page_fault.[unknown].[unknown] 0.00 ±223% +573.3% 0.02 ± 30% perf-sched.sch_delay.avg.ms.irqentry_exit_to_user_mode.asm_sysvec_call_function_single.[unknown] 0.00 ±223% +6233.3% 0.03 ± 63% perf-sched.sch_delay.avg.ms.irqentry_exit_to_user_mode.asm_sysvec_call_function_single.[unknown].[unknown] 0.02 ± 48% +143.6% 0.04 ± 53% perf-sched.sch_delay.avg.ms.irqentry_exit_to_user_mode.asm_sysvec_reschedule_ipi.[unknown] 0.01 ± 11% +28.2% 0.01 ± 5% perf-sched.sch_delay.avg.ms.schedule_timeout.rcu_gp_fqs_loop.rcu_gp_kthread.kthread 0.01 ± 9% +288.9% 0.02 ± 8% perf-sched.sch_delay.avg.ms.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm 0.03 ± 82% +166.3% 0.07 ± 61% perf-sched.sch_delay.max.ms.__cond_resched.__kmalloc_node_noprof.load_msg.do_msgsnd.do_syscall_64 0.02 ± 5% +36.3% 0.02 ± 18% perf-sched.sch_delay.max.ms.__cond_resched.stop_one_cpu.migrate_task_to.task_numa_migrate.isra 0.00 ±113% +388.5% 0.02 ± 41% perf-sched.sch_delay.max.ms.__cond_resched.task_work_run.syscall_exit_to_user_mode.do_syscall_64.entry_SYSCALL_64_after_hwframe 49.32 ± 37% -59.3% 20.08 ± 10% perf-sched.sch_delay.max.ms.do_msgrcv.do_syscall_64.entry_SYSCALL_64_after_hwframe.[unknown] 0.00 ±223% +1690.0% 0.06 ± 29% perf-sched.sch_delay.max.ms.irqentry_exit_to_user_mode.asm_exc_page_fault.[unknown].[unknown] 0.00 ±223% +1086.7% 0.03 ± 48% perf-sched.sch_delay.max.ms.irqentry_exit_to_user_mode.asm_sysvec_call_function_single.[unknown] 0.00 ±223% +8666.7% 0.04 ± 80% perf-sched.sch_delay.max.ms.irqentry_exit_to_user_mode.asm_sysvec_call_function_single.[unknown].[unknown] 0.02 ± 46% +788.0% 0.16 ±104% perf-sched.sch_delay.max.ms.irqentry_exit_to_user_mode.asm_sysvec_reschedule_ipi.[unknown] 0.03 ± 25% +113.7% 0.06 ± 21% perf-sched.sch_delay.max.ms.irqentry_exit_to_user_mode.asm_sysvec_reschedule_ipi.[unknown].[unknown] 37.94 ± 13% -46.7% 20.21 ± 12% perf-sched.sch_delay.max.ms.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.msgctl_info.constprop 25.94 ± 29% -80.4% 5.08 ± 95% perf-sched.sch_delay.max.ms.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.sysvipc_proc_start 36.84 ± 24% -43.7% 20.74 ± 15% perf-sched.sch_delay.max.ms.schedule_preempt_disabled.rwsem_down_write_slowpath.down_write.msgctl_down 54.03 ± 27% -60.0% 21.60 ± 10% perf-sched.total_sch_delay.max.ms 3.02 ± 3% +36.3% 4.12 perf-sched.total_wait_and_delay.average.ms 1146750 ± 6% -24.8% 862074 perf-sched.total_wait_and_delay.count.ms 3.01 ± 3% +36.5% 4.11 perf-sched.total_wait_time.average.ms 3.40 ± 4% -100.0% 0.00 perf-sched.wait_and_delay.avg.ms.__cond_resched.__wait_for_common.affine_move_task.__set_cpus_allowed_ptr.__sched_setaffinity 1.49 ± 4% +29.3% 1.92 ± 2% perf-sched.wait_and_delay.avg.ms.do_msgrcv.do_syscall_64.entry_SYSCALL_64_after_hwframe.[unknown] 1.21 ± 5% +51.5% 1.84 ± 3% perf-sched.wait_and_delay.avg.ms.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.msgctl_info.constprop 1.52 ± 5% +51.3% 2.29 ± 3% perf-sched.wait_and_delay.avg.ms.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.sysvipc_proc_start 1.34 ± 5% +44.2% 1.94 ± 4% perf-sched.wait_and_delay.avg.ms.schedule_preempt_disabled.rwsem_down_write_slowpath.down_write.msgctl_down 1024 ± 8% -100.0% 0.00 perf-sched.wait_and_delay.count.__cond_resched.__wait_for_common.affine_move_task.__set_cpus_allowed_ptr.__sched_setaffinity 9.17 ± 34% -58.2% 3.83 ± 41% perf-sched.wait_and_delay.count.__cond_resched.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm 555396 ± 5% -21.4% 436361 perf-sched.wait_and_delay.count.do_msgrcv.do_syscall_64.entry_SYSCALL_64_after_hwframe.[unknown] 359319 ± 8% -27.1% 261944 ± 3% perf-sched.wait_and_delay.count.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.msgctl_info.constprop 50490 ± 5% -42.7% 28940 ± 4% perf-sched.wait_and_delay.count.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.sysvipc_proc_start 173580 ± 6% -27.8% 125292 ± 4% perf-sched.wait_and_delay.count.schedule_preempt_disabled.rwsem_down_write_slowpath.down_write.msgctl_down 1000 -100.0% 0.00 perf-sched.wait_and_delay.max.ms.__cond_resched.__wait_for_common.affine_move_task.__set_cpus_allowed_ptr.__sched_setaffinity 1312 ± 8% +31.8% 1730 ± 2% perf-sched.wait_and_delay.max.ms.schedule_hrtimeout_range_clock.poll_schedule_timeout.constprop.0.do_poll 61.94 ± 18% -53.6% 28.77 ± 25% perf-sched.wait_and_delay.max.ms.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.msgctl_info.constprop 38.16 ± 25% -80.4% 7.48 ± 41% perf-sched.wait_and_delay.max.ms.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.sysvipc_proc_start 48.28 ± 19% -49.4% 24.43 ± 24% perf-sched.wait_and_delay.max.ms.schedule_preempt_disabled.rwsem_down_write_slowpath.down_write.msgctl_down 1.43 ± 12% +43.7% 2.06 ± 5% perf-sched.wait_time.avg.ms.__cond_resched.__kmalloc_node_noprof.load_msg.do_msgsnd.do_syscall_64 3.33 ± 4% +7.2% 3.57 perf-sched.wait_time.avg.ms.__cond_resched.__wait_for_common.affine_move_task.__set_cpus_allowed_ptr.__sched_setaffinity 1.24 ± 7% +57.8% 1.95 ± 7% perf-sched.wait_time.avg.ms.__cond_resched.stop_one_cpu.migrate_task_to.task_numa_migrate.isra 0.49 ±139% +517.5% 3.04 ± 77% perf-sched.wait_time.avg.ms.__cond_resched.task_work_run.syscall_exit_to_user_mode.do_syscall_64.entry_SYSCALL_64_after_hwframe 1.48 ± 4% +29.5% 1.92 ± 2% perf-sched.wait_time.avg.ms.do_msgrcv.do_syscall_64.entry_SYSCALL_64_after_hwframe.[unknown] 0.00 ±223% +944.4% 0.03 ± 19% perf-sched.wait_time.avg.ms.irqentry_exit_to_user_mode.asm_exc_page_fault.[unknown].[unknown] 1.38 ± 14% +90.7% 2.64 ± 52% perf-sched.wait_time.avg.ms.irqentry_exit_to_user_mode.asm_sysvec_apic_timer_interrupt.[unknown] 1.32 ± 9% +58.5% 2.09 ± 8% perf-sched.wait_time.avg.ms.irqentry_exit_to_user_mode.asm_sysvec_apic_timer_interrupt.[unknown].[unknown] 0.09 ±223% +3002.3% 2.67 ± 31% perf-sched.wait_time.avg.ms.irqentry_exit_to_user_mode.asm_sysvec_call_function_single.[unknown] 0.21 ±223% +1106.0% 2.49 ± 28% perf-sched.wait_time.avg.ms.irqentry_exit_to_user_mode.asm_sysvec_call_function_single.[unknown].[unknown] 1.13 ± 60% +1476.2% 17.79 ±191% perf-sched.wait_time.avg.ms.irqentry_exit_to_user_mode.asm_sysvec_reschedule_ipi.[unknown] 1.20 ± 5% +51.9% 1.82 ± 3% perf-sched.wait_time.avg.ms.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.msgctl_info.constprop 1.50 ± 5% +51.8% 2.28 ± 3% perf-sched.wait_time.avg.ms.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.sysvipc_proc_start 1.33 ± 5% +44.7% 1.92 ± 4% perf-sched.wait_time.avg.ms.schedule_preempt_disabled.rwsem_down_write_slowpath.down_write.msgctl_down 1.31 ± 10% +80.6% 2.37 ± 20% perf-sched.wait_time.avg.ms.syscall_exit_to_user_mode.do_syscall_64.entry_SYSCALL_64_after_hwframe.[unknown] 3.37 ± 17% +27.7% 4.30 ± 7% perf-sched.wait_time.max.ms.__cond_resched.stop_one_cpu.migrate_task_to.task_numa_migrate.isra 0.62 ±154% +2705.3% 17.45 ±173% perf-sched.wait_time.max.ms.__cond_resched.task_work_run.syscall_exit_to_user_mode.do_syscall_64.entry_SYSCALL_64_after_hwframe 72.86 ± 8% +37.9% 100.47 ± 4% perf-sched.wait_time.max.ms.do_msgrcv.do_syscall_64.entry_SYSCALL_64_after_hwframe.[unknown] 0.00 ±223% +1690.0% 0.06 ± 29% perf-sched.wait_time.max.ms.irqentry_exit_to_user_mode.asm_exc_page_fault.[unknown].[unknown] 3.34 ± 19% +53.2% 5.12 ± 22% perf-sched.wait_time.max.ms.irqentry_exit_to_user_mode.asm_sysvec_apic_timer_interrupt.[unknown].[unknown] 0.09 ±223% +4518.2% 3.98 ± 32% perf-sched.wait_time.max.ms.irqentry_exit_to_user_mode.asm_sysvec_call_function_single.[unknown] 0.21 ±223% +1573.8% 3.46 ± 15% perf-sched.wait_time.max.ms.irqentry_exit_to_user_mode.asm_sysvec_call_function_single.[unknown].[unknown] 1.78 ± 59% +9489.7% 170.25 ±217% perf-sched.wait_time.max.ms.irqentry_exit_to_user_mode.asm_sysvec_reschedule_ipi.[unknown] 1312 ± 8% +31.8% 1730 ± 2% perf-sched.wait_time.max.ms.schedule_hrtimeout_range_clock.poll_schedule_timeout.constprop.0.do_poll 33.63 ± 17% -50.2% 16.75 ± 25% perf-sched.wait_time.max.ms.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.msgctl_info.constprop 21.64 ± 31% -78.1% 4.74 ± 3% perf-sched.wait_time.max.ms.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.sysvipc_proc_start 27.46 ± 19% -52.8% 12.95 ± 35% perf-sched.wait_time.max.ms.schedule_preempt_disabled.rwsem_down_write_slowpath.down_write.msgctl_down Disclaimer: Results have been estimated based on internal Intel analysis and are provided for informational purposes only. Any difference in system hardware or software design or configuration may affect actual performance. -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 2/3] nfs: Add timecreate to nfs inode 2025-06-12 7:22 ` kernel test robot @ 2025-06-12 15:32 ` Benjamin Coddington 2025-06-17 8:48 ` Oliver Sang 0 siblings, 1 reply; 9+ messages in thread From: Benjamin Coddington @ 2025-06-12 15:32 UTC (permalink / raw) To: kernel test robot Cc: oe-lkp, lkp, Lance Shelton, Trond Myklebust, linux-nfs, Trond Myklebust, Anna Schumaker, Jeff Layton On 12 Jun 2025, at 3:22, kernel test robot wrote: > Hello, > > kernel test robot noticed a 41.2% regression of stress-ng.msg.ops_per_sec on: Wow, this is really unexpected here - best I can think is that we're mucking up cachelines in a very problematic way, but then NFS would have to be involved in the test somehow and I don't see evidence of that. LKP folks, is there some NFS on the test system that could be in play? I see that you collect nfsstat output, but I don't see that output in the details. Is it possible this report could be an anomaly? Ben ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 2/3] nfs: Add timecreate to nfs inode 2025-06-12 15:32 ` Benjamin Coddington @ 2025-06-17 8:48 ` Oliver Sang 0 siblings, 0 replies; 9+ messages in thread From: Oliver Sang @ 2025-06-17 8:48 UTC (permalink / raw) To: Benjamin Coddington Cc: oe-lkp, lkp, Lance Shelton, Trond Myklebust, linux-nfs, Trond Myklebust, Anna Schumaker, Jeff Layton, oliver.sang hi, Benjamin Coddington, On Thu, Jun 12, 2025 at 11:32:05AM -0400, Benjamin Coddington wrote: > On 12 Jun 2025, at 3:22, kernel test robot wrote: > > > Hello, > > > > kernel test robot noticed a 41.2% regression of stress-ng.msg.ops_per_sec on: > > Wow, this is really unexpected here - best I can think is that we're mucking > up cachelines in a very problematic way, but then NFS would have to be > involved in the test somehow and I don't see evidence of that. > > LKP folks, is there some NFS on the test system that could be in play? I > see that you collect nfsstat output, but I don't see that output in the > details. Is it possible this report could be an anomaly? sorry about this, seems this is a wrong report. there is no NFS involved in this test, so there is no nfsstat monitor enabled while doing tests. one possibility is fs/ is build earlier, which impacts the kernel image layout. we observed the cases that stress-ng tests are sensitive to this kind of alignment changes. sorry for the wrong report. > > Ben > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 2/3] nfs: Add timecreate to nfs inode 2025-05-29 10:45 ` [PATCH v3 2/3] nfs: Add timecreate to nfs inode Benjamin Coddington 2025-06-12 7:22 ` kernel test robot @ 2025-06-12 15:28 ` Benjamin Coddington 1 sibling, 0 replies; 9+ messages in thread From: Benjamin Coddington @ 2025-06-12 15:28 UTC (permalink / raw) To: Trond Myklebust, Anna Schumaker; +Cc: linux-nfs, Lance Shelton, Jeff Layton On 29 May 2025, at 6:45, Benjamin Coddington wrote: > From: Anne Marie Merritt <annemarie.merritt@primarydata.com> > > Add tracking of the create time (a.k.a. btime) along with corresponding > bitfields, request, and decode xdr routines. > > Signed-off-by: Anne Marie Merritt <annemarie.merritt@primarydata.com> > Signed-off-by: Lance Shelton <lance.shelton@hammerspace.com> > Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> > Signed-off-by: Benjamin Coddington <bcodding@redhat.com> > --- > fs/nfs/inode.c | 17 +++++++++++++++-- > fs/nfs/nfs4proc.c | 14 +++++++++++++- > fs/nfs/nfs4xdr.c | 24 ++++++++++++++++++++++++ > fs/nfs/nfstrace.h | 3 ++- > include/linux/nfs_fs.h | 8 ++++++++ > include/linux/nfs_xdr.h | 3 +++ > 6 files changed, 65 insertions(+), 4 deletions(-) > > diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c > index 160f3478a835..2e36188a855b 100644 > --- a/fs/nfs/inode.c > +++ b/fs/nfs/inode.c > @@ -197,6 +197,7 @@ void nfs_set_cache_invalid(struct inode *inode, unsigned long flags) > if (!(flags & NFS_INO_REVAL_FORCED)) > flags &= ~(NFS_INO_INVALID_MODE | > NFS_INO_INVALID_OTHER | > + NFS_INO_INVALID_BTIME | > NFS_INO_INVALID_XATTR); > flags &= ~(NFS_INO_INVALID_CHANGE | NFS_INO_INVALID_SIZE); > } > @@ -522,6 +523,7 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr) > inode_set_atime(inode, 0, 0); > inode_set_mtime(inode, 0, 0); > inode_set_ctime(inode, 0, 0); > + memset(&nfsi->btime, 0, sizeof(nfsi->btime)); > inode_set_iversion_raw(inode, 0); > inode->i_size = 0; > clear_nlink(inode); > @@ -545,6 +547,10 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr) > inode_set_ctime_to_ts(inode, fattr->ctime); > else if (fattr_supported & NFS_ATTR_FATTR_CTIME) > nfs_set_cache_invalid(inode, NFS_INO_INVALID_CTIME); > + if (fattr->valid & NFS_ATTR_FATTR_BTIME) > + nfsi->btime = fattr->btime; > + else if (fattr_supported & NFS_ATTR_FATTR_BTIME) > + nfs_set_cache_invalid(inode, NFS_INO_INVALID_BTIME); > if (fattr->valid & NFS_ATTR_FATTR_CHANGE) > inode_set_iversion_raw(inode, fattr->change_attr); > else > @@ -1900,7 +1906,7 @@ static int nfs_inode_finish_partial_attr_update(const struct nfs_fattr *fattr, > NFS_INO_INVALID_ATIME | NFS_INO_INVALID_CTIME | > NFS_INO_INVALID_MTIME | NFS_INO_INVALID_SIZE | > NFS_INO_INVALID_BLOCKS | NFS_INO_INVALID_OTHER | > - NFS_INO_INVALID_NLINK; > + NFS_INO_INVALID_NLINK | NFS_INO_INVALID_BTIME; > unsigned long cache_validity = NFS_I(inode)->cache_validity; > enum nfs4_change_attr_type ctype = NFS_SERVER(inode)->change_attr_type; > > @@ -2261,7 +2267,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) > | NFS_INO_INVALID_BLOCKS > | NFS_INO_INVALID_NLINK > | NFS_INO_INVALID_MODE > - | NFS_INO_INVALID_OTHER; > + | NFS_INO_INVALID_OTHER > + | NFS_INO_INVALID_BTIME; > if (S_ISDIR(inode->i_mode)) > nfs_force_lookup_revalidate(inode); > attr_changed = true; > @@ -2295,6 +2302,12 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) > nfsi->cache_validity |= > save_cache_validity & NFS_INO_INVALID_CTIME; > > + if (fattr->valid & NFS_ATTR_FATTR_BTIME) > + nfsi->btime = fattr->btime; > + else if (fattr_supported & NFS_ATTR_FATTR_BTIME) > + nfsi->cache_validity |= > + save_cache_validity & NFS_INO_INVALID_BTIME; > + > /* Check if our cached file size is stale */ > if (fattr->valid & NFS_ATTR_FATTR_SIZE) { > new_isize = nfs_size_to_loff_t(fattr->size); > diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c > index b1d2122bd5a7..f7fb61f805a3 100644 > --- a/fs/nfs/nfs4proc.c > +++ b/fs/nfs/nfs4proc.c > @@ -222,6 +222,7 @@ const u32 nfs4_fattr_bitmap[3] = { > | FATTR4_WORD1_RAWDEV > | FATTR4_WORD1_SPACE_USED > | FATTR4_WORD1_TIME_ACCESS > + | FATTR4_WORD1_TIME_CREATE > | FATTR4_WORD1_TIME_METADATA > | FATTR4_WORD1_TIME_MODIFY > | FATTR4_WORD1_MOUNTED_ON_FILEID, > @@ -243,6 +244,7 @@ static const u32 nfs4_pnfs_open_bitmap[3] = { > | FATTR4_WORD1_RAWDEV > | FATTR4_WORD1_SPACE_USED > | FATTR4_WORD1_TIME_ACCESS > + | FATTR4_WORD1_TIME_CREATE > | FATTR4_WORD1_TIME_METADATA > | FATTR4_WORD1_TIME_MODIFY, > FATTR4_WORD2_MDSTHRESHOLD > @@ -323,6 +325,9 @@ static void nfs4_bitmap_copy_adjust(__u32 *dst, const __u32 *src, > if (!(cache_validity & NFS_INO_INVALID_OTHER)) > dst[1] &= ~(FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP); > > + if (!(cache_validity & NFS_INO_INVALID_BTIME)) > + dst[1] &= ~FATTR4_WORD1_TIME_CREATE; > + > if (nfs_have_delegated_mtime(inode)) { > if (!(cache_validity & NFS_INO_INVALID_ATIME)) > dst[1] &= ~FATTR4_WORD1_TIME_ACCESS; > @@ -1307,7 +1312,8 @@ nfs4_update_changeattr_locked(struct inode *inode, > NFS_INO_INVALID_ACCESS | NFS_INO_INVALID_ACL | > NFS_INO_INVALID_SIZE | NFS_INO_INVALID_OTHER | > NFS_INO_INVALID_BLOCKS | NFS_INO_INVALID_NLINK | > - NFS_INO_INVALID_MODE | NFS_INO_INVALID_XATTR; > + NFS_INO_INVALID_MODE | NFS_INO_INVALID_BTIME | > + NFS_INO_INVALID_XATTR; > nfsi->attrtimeo = NFS_MINATTRTIMEO(inode); > } > nfsi->attrtimeo_timestamp = jiffies; > @@ -4047,6 +4053,10 @@ static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *f > server->fattr_valid &= ~NFS_ATTR_FATTR_CTIME; > if (!(res.attr_bitmask[1] & FATTR4_WORD1_TIME_MODIFY)) > server->fattr_valid &= ~NFS_ATTR_FATTR_MTIME; > + if (!(res.attr_bitmask[1] & FATTR4_WORD1_TIME_MODIFY)) > + server->fattr_valid &= ~NFS_ATTR_FATTR_MTIME; ^^ I just noticed this duplicates the two lines right above -- not harmful, but probably needs a cleanup.. let me know if I should repost or if this can be fixed up in a maintainers tree. Ben ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3 3/3] NFS: Return the file btime in the statx results when appropriate 2025-05-29 10:45 [PATCH v3 0/3] NFS Client btime support Benjamin Coddington 2025-05-29 10:45 ` [PATCH v3 1/3] Expand the type of nfs_fattr->valid Benjamin Coddington 2025-05-29 10:45 ` [PATCH v3 2/3] nfs: Add timecreate to nfs inode Benjamin Coddington @ 2025-05-29 10:45 ` Benjamin Coddington 2025-05-29 11:06 ` [PATCH v3 0/3] NFS Client btime support Jeff Layton 3 siblings, 0 replies; 9+ messages in thread From: Benjamin Coddington @ 2025-05-29 10:45 UTC (permalink / raw) To: Trond Myklebust, Anna Schumaker; +Cc: linux-nfs, Lance Shelton, Jeff Layton From: Trond Myklebust <trond.myklebust@hammerspace.com> If the server supports the NFSv4.x "create_time" attribute, then return it as part of the statx results. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Benjamin Coddington <bcodding@redhat.com> --- fs/nfs/inode.c | 15 +++++++++++++-- fs/nfs/nfs4trace.h | 3 ++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 2e36188a855b..beea003abb8e 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -894,6 +894,7 @@ static void nfs_readdirplus_parent_cache_hit(struct dentry *dentry) static u32 nfs_get_valid_attrmask(struct inode *inode) { + u64 fattr_valid = NFS_SERVER(inode)->fattr_valid; unsigned long cache_validity = READ_ONCE(NFS_I(inode)->cache_validity); u32 reply_mask = STATX_INO | STATX_TYPE; @@ -913,6 +914,9 @@ static u32 nfs_get_valid_attrmask(struct inode *inode) reply_mask |= STATX_UID | STATX_GID; if (!(cache_validity & NFS_INO_INVALID_BLOCKS)) reply_mask |= STATX_BLOCKS; + if (!(cache_validity & NFS_INO_INVALID_BTIME) && + (fattr_valid & NFS_ATTR_FATTR_BTIME)) + reply_mask |= STATX_BTIME; if (!(cache_validity & NFS_INO_INVALID_CHANGE)) reply_mask |= STATX_CHANGE_COOKIE; return reply_mask; @@ -923,6 +927,7 @@ int nfs_getattr(struct mnt_idmap *idmap, const struct path *path, { struct inode *inode = d_inode(path->dentry); struct nfs_server *server = NFS_SERVER(inode); + u64 fattr_valid = server->fattr_valid; unsigned long cache_validity; int err = 0; bool force_sync = query_flags & AT_STATX_FORCE_SYNC; @@ -933,9 +938,12 @@ int nfs_getattr(struct mnt_idmap *idmap, const struct path *path, request_mask &= STATX_TYPE | STATX_MODE | STATX_NLINK | STATX_UID | STATX_GID | STATX_ATIME | STATX_MTIME | STATX_CTIME | - STATX_INO | STATX_SIZE | STATX_BLOCKS | + STATX_INO | STATX_SIZE | STATX_BLOCKS | STATX_BTIME | STATX_CHANGE_COOKIE; + if (!(fattr_valid & NFS_ATTR_FATTR_BTIME)) + request_mask &= ~STATX_BTIME; + if ((query_flags & AT_STATX_DONT_SYNC) && !force_sync) { if (readdirplus_enabled) nfs_readdirplus_parent_cache_hit(path->dentry); @@ -967,7 +975,7 @@ int nfs_getattr(struct mnt_idmap *idmap, const struct path *path, /* Is the user requesting attributes that might need revalidation? */ if (!(request_mask & (STATX_MODE|STATX_NLINK|STATX_ATIME|STATX_CTIME| STATX_MTIME|STATX_UID|STATX_GID| - STATX_SIZE|STATX_BLOCKS| + STATX_SIZE|STATX_BLOCKS|STATX_BTIME| STATX_CHANGE_COOKIE))) goto out_no_revalidate; @@ -991,6 +999,8 @@ int nfs_getattr(struct mnt_idmap *idmap, const struct path *path, do_update |= cache_validity & NFS_INO_INVALID_OTHER; if (request_mask & STATX_BLOCKS) do_update |= cache_validity & NFS_INO_INVALID_BLOCKS; + if (request_mask & STATX_BTIME) + do_update |= cache_validity & NFS_INO_INVALID_BTIME; if (do_update) { if (readdirplus_enabled) @@ -1012,6 +1022,7 @@ int nfs_getattr(struct mnt_idmap *idmap, const struct path *path, stat->attributes |= STATX_ATTR_CHANGE_MONOTONIC; if (S_ISDIR(inode->i_mode)) stat->blksize = NFS_SERVER(inode)->dtsize; + stat->btime = NFS_I(inode)->btime; out: trace_nfs_getattr_exit(inode, err); return err; diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h index deab4c0e21a0..553e45502588 100644 --- a/fs/nfs/nfs4trace.h +++ b/fs/nfs/nfs4trace.h @@ -30,7 +30,8 @@ { NFS_ATTR_FATTR_CTIME, "CTIME" }, \ { NFS_ATTR_FATTR_CHANGE, "CHANGE" }, \ { NFS_ATTR_FATTR_OWNER_NAME, "OWNER_NAME" }, \ - { NFS_ATTR_FATTR_GROUP_NAME, "GROUP_NAME" }) + { NFS_ATTR_FATTR_GROUP_NAME, "GROUP_NAME" }, \ + { NFS_ATTR_FATTR_BTIME, "BTIME" }) DECLARE_EVENT_CLASS(nfs4_clientid_event, TP_PROTO( -- 2.47.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v3 0/3] NFS Client btime support 2025-05-29 10:45 [PATCH v3 0/3] NFS Client btime support Benjamin Coddington ` (2 preceding siblings ...) 2025-05-29 10:45 ` [PATCH v3 3/3] NFS: Return the file btime in the statx results when appropriate Benjamin Coddington @ 2025-05-29 11:06 ` Jeff Layton 3 siblings, 0 replies; 9+ messages in thread From: Jeff Layton @ 2025-05-29 11:06 UTC (permalink / raw) To: Benjamin Coddington, Trond Myklebust, Anna Schumaker Cc: linux-nfs, Lance Shelton On Thu, 2025-05-29 at 06:45 -0400, Benjamin Coddington wrote: > We're getting requests to allow the client to support btime, current kNFSD > already supports this for compatible filesystems. > > I've rebased and worked the first three patches from > https://lore.kernel.org/linux-nfs/20211227190504.309612-1-trondmy@kernel.org/ > onto v6.14, and I've been driving them around bakeathon without any signs > of trouble yet this week. > > Thanks Trond and Anne for this (years-ago) work. > > v2 - fix unnecessary cast to printk > v3 - drop hunk unrolling INVALID_ATTR on 2/3, add BTIME to INVALID_ATTR > > Anne Marie Merritt (1): > nfs: Add timecreate to nfs inode > > Trond Myklebust (2): > Expand the type of nfs_fattr->valid > NFS: Return the file btime in the statx results when appropriate > > fs/nfs/inode.c | 34 +++++++++++++++++++---- > fs/nfs/nfs4proc.c | 14 +++++++++- > fs/nfs/nfs4trace.h | 3 ++- > fs/nfs/nfs4xdr.c | 24 +++++++++++++++++ > fs/nfs/nfstrace.h | 3 ++- > include/linux/nfs_fs.h | 8 ++++++ > include/linux/nfs_fs_sb.h | 2 +- > include/linux/nfs_xdr.h | 57 ++++++++++++++++++++------------------- > 8 files changed, 109 insertions(+), 36 deletions(-) Reviewed-by: Jeff Layton <jlayton@kernel.org> ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-06-17 8:49 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-05-29 10:45 [PATCH v3 0/3] NFS Client btime support Benjamin Coddington 2025-05-29 10:45 ` [PATCH v3 1/3] Expand the type of nfs_fattr->valid Benjamin Coddington 2025-05-29 10:45 ` [PATCH v3 2/3] nfs: Add timecreate to nfs inode Benjamin Coddington 2025-06-12 7:22 ` kernel test robot 2025-06-12 15:32 ` Benjamin Coddington 2025-06-17 8:48 ` Oliver Sang 2025-06-12 15:28 ` Benjamin Coddington 2025-05-29 10:45 ` [PATCH v3 3/3] NFS: Return the file btime in the statx results when appropriate Benjamin Coddington 2025-05-29 11:06 ` [PATCH v3 0/3] NFS Client btime support Jeff Layton
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox