* Re: [PATCH 12/61] nfsd: update format strings for u64 i_ino
From: Chuck Lever @ 2026-02-26 19:48 UTC (permalink / raw)
To: Jeff Layton, Alexander Viro, Christian Brauner, Jan Kara,
Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers, Dan Williams,
Matthew Wilcox, Eric Biggers, Theodore Y. Ts'o, Muchun Song,
Oscar Salvador, David Hildenbrand, David Howells, Paulo Alcantara,
Andreas Dilger, Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust,
Anna Schumaker, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25
In-Reply-To: <20260226-iino-u64-v1-12-ccceff366db9@kernel.org>
On 2/26/26 10:55 AM, Jeff Layton wrote:
> Update format strings from %ld/%lu to %lld/%llu for i_ino, which is
> now a u64.
>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> fs/nfsd/export.c | 2 +-
> fs/nfsd/nfs4state.c | 4 ++--
> fs/nfsd/nfsfh.c | 4 ++--
> fs/nfsd/vfs.c | 2 +-
> 4 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
> index 8fdbba7cad96443d92cc7fdeea6158c4cc681be1..334b63eb966e71e6af6adde61aa1123f01b4390b 100644
> --- a/fs/nfsd/export.c
> +++ b/fs/nfsd/export.c
> @@ -1039,7 +1039,7 @@ exp_rootfh(struct net *net, struct auth_domain *clp, char *name,
> }
> inode = d_inode(path.dentry);
>
> - dprintk("nfsd: exp_rootfh(%s [%p] %s:%s/%ld)\n",
> + dprintk("nfsd: exp_rootfh(%s [%p] %s:%s/%lld)\n",
> name, path.dentry, clp->name,
> inode->i_sb->s_id, inode->i_ino);
> exp = exp_parent(cd, clp, &path);
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index 6b9c399b89dfb71a52b9c97f0efe9a1dea0558a6..a569d89ac9123d66bb47e7d74c7c98610de21da2 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -1253,7 +1253,7 @@ static void nfsd4_finalize_deleg_timestamps(struct nfs4_delegation *dp, struct f
> if (ret) {
> struct inode *inode = file_inode(f);
>
> - pr_notice_ratelimited("nfsd: Unable to update timestamps on inode %02x:%02x:%lu: %d\n",
> + pr_notice_ratelimited("nfsd: Unable to update timestamps on inode %02x:%02x:%llu: %d\n",
> MAJOR(inode->i_sb->s_dev),
> MINOR(inode->i_sb->s_dev),
> inode->i_ino, ret);
> @@ -2888,7 +2888,7 @@ static void nfs4_show_superblock(struct seq_file *s, struct nfsd_file *f)
> {
> struct inode *inode = file_inode(f->nf_file);
>
> - seq_printf(s, "superblock: \"%02x:%02x:%ld\"",
> + seq_printf(s, "superblock: \"%02x:%02x:%llu\"",
> MAJOR(inode->i_sb->s_dev),
> MINOR(inode->i_sb->s_dev),
> inode->i_ino);
> diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
> index ed85dd43da18e6d4c4667ff14dc035f2eacff1d6..cfd143b41eb1fb53868f378d668905c1c7d5f868 100644
> --- a/fs/nfsd/nfsfh.c
> +++ b/fs/nfsd/nfsfh.c
> @@ -601,9 +601,9 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry,
> struct inode * inode = d_inode(dentry);
> dev_t ex_dev = exp_sb(exp)->s_dev;
>
> - dprintk("nfsd: fh_compose(exp %02x:%02x/%ld %pd2, ino=%ld)\n",
> + dprintk("nfsd: fh_compose(exp %02x:%02x/%lld %pd2, ino=%lld)\n",
> MAJOR(ex_dev), MINOR(ex_dev),
> - (long) d_inode(exp->ex_path.dentry)->i_ino,
> + (long long) d_inode(exp->ex_path.dentry)->i_ino,
> dentry,
> (inode ? inode->i_ino : 0));
>
> diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
> index c884c3f34afb044ee5cacc962a04a97de2f7fd88..dde09f3734c2844a3fe0b6d18d596276a19aa2d1 100644
> --- a/fs/nfsd/vfs.c
> +++ b/fs/nfsd/vfs.c
> @@ -1163,7 +1163,7 @@ nfsd_direct_read(struct svc_rqst *rqstp, struct svc_fh *fhp,
> } else if (unlikely(host_err == -EINVAL)) {
> struct inode *inode = d_inode(fhp->fh_dentry);
>
> - pr_info_ratelimited("nfsd: Direct I/O alignment failure on %s/%ld\n",
> + pr_info_ratelimited("nfsd: Direct I/O alignment failure on %s/%lld\n",
> inode->i_sb->s_id, inode->i_ino);
> host_err = -ESERVERFAULT;
> }
>
Suggestion: Let's use the %llu format specifier consistently for
inode->i_ino, which is unsigned.
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
--
Chuck Lever
^ permalink raw reply
* Re: [PATCH 17/61] nilfs2: update for u64 i_ino
From: Jeff Layton @ 2026-02-26 20:06 UTC (permalink / raw)
To: Viacheslav Dubeyko, david@kernel.org, namhyung@kernel.org,
oleg@redhat.com, anna@kernel.org, ms@dev.tdt.de,
alexander.shishkin@linux.intel.com, jack@suse.cz,
ebiggers@kernel.org, Ondrej Mosnacek, mark.rutland@arm.com,
casey@schaufler-ca.com, glaubitz@physik.fu-berlin.de,
miklos@szeredi.hu, sumit.semwal@linaro.org,
john.johansen@canonical.com, amir73il@gmail.com,
slava@dubeyko.com, willy@infradead.org, tytso@mit.edu,
asmadeus@codewreck.org, jth@kernel.org, shaggy@kernel.org,
serge@hallyn.com, jaharkes@cs.cmu.edu, trondmy@kernel.org,
jolsa@kernel.org, ericvh@kernel.org, simona@ffwll.ch,
willemb@google.com, aivazian.tigran@gmail.com,
hubcap@omnibond.com, muchun.song@linux.dev, sfrench@samba.org,
neil@brown.name, jmorris@namei.org, jlbec@evilplan.org,
chuck.lever@oracle.com, ronniesahlberg@gmail.com,
lucho@ionkov.net, dan.j.williams@intel.com, raven@themaw.net,
Alex Markuze, mhiramat@kernel.org, alexander.deucher@amd.com,
mathieu.desnoyers@efficios.com, horms@kernel.org, tom@talpey.com,
mark@fasheh.com, mikulas@artax.karlin.mff.cuni.cz,
djwong@kernel.org, edumazet@google.com, Olga Kornievskaia,
bharathsm@microsoft.com, adrian.hunter@intel.com,
osalvador@suse.de, peterz@infradead.org, christian.koenig@amd.com,
pc@manguebit.org, martin@omnibond.com, naohiro.aota@wdc.com,
frank.li@vivo.com, dsterba@suse.com, zohar@linux.ibm.com,
code@tyhicks.com, dwmw2@infradead.org, kuba@kernel.org,
kuniyu@google.com, nico@fluxnic.net, jack@suse.com,
dlemoal@kernel.org, viro@zeniv.linux.org.uk,
stephen.smalley.work@gmail.com, salah.triki@gmail.com,
David Howells, paul@paul-moore.com, luisbg@kernel.org,
irogers@google.com, acme@kernel.org, richard@nod.at,
rostedt@goodmis.org, idryomov@gmail.com,
joseph.qi@linux.alibaba.com, al@alarsen.net,
james.clark@linaro.org, dmitry.kasatkin@gmail.com,
roberto.sassu@huawei.com, konishi.ryusuke@gmail.com,
sprasad@microsoft.com, jaegeuk@kernel.org,
linux_oss@crudebyte.com, brauner@kernel.org, Dai.Ngo@oracle.com,
eric.snowberg@oracle.com, adilger.kernel@dilger.ca,
chao@kernel.org, wufan@kernel.org, coda@cs.cmu.edu, Ingo Molnar,
alex.aring@gmail.com, airlied@gmail.com, chengzhihao1@huawei.com,
Paolo Abeni, marc.dionne@auristor.com,
almaz.alexandrovich@paragon-software.com, davem@davemloft.net,
hch@infradead.org
Cc: ecryptfs@vger.kernel.org, linux-unionfs@vger.kernel.org,
apparmor@lists.ubuntu.com, linux-ext4@vger.kernel.org,
autofs@vger.kernel.org, amd-gfx@lists.freedesktop.org,
fsverity@lists.linux.dev, ntfs3@lists.linux.dev,
ocfs2-devel@lists.linux.dev, linux-fsdevel@vger.kernel.org,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, linux-integrity@vger.kernel.org,
samba-technical@lists.samba.org, linux-nilfs@vger.kernel.org,
selinux@vger.kernel.org, linaro-mm-sig@lists.linaro.org,
linux-trace-kernel@vger.kernel.org, v9fs@lists.linux.dev,
linux-xfs@vger.kernel.org, linux-x25@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net, nvdimm@lists.linux.dev,
ceph-devel@vger.kernel.org, jfs-discussion@lists.sourceforge.net,
linux-mtd@lists.infradead.org, devel@lists.orangefs.org,
linux-afs@lists.infradead.org, linux-fscrypt@vger.kernel.org,
linux-security-module@vger.kernel.org, linux-cifs@vger.kernel.org,
linux-hams@vger.kernel.org, linux-nfs@vger.kernel.org,
codalist@coda.cs.cmu.edu, linux-mm@kvack.org,
netfs@lists.linux.dev, linux-perf-users@vger.kernel.org,
dri-devel@lists.freedesktop.org
In-Reply-To: <34b1d1f43043ca1b71a3ca9ea5ebce597a4c02aa.camel@ibm.com>
On Thu, 2026-02-26 at 19:46 +0000, Viacheslav Dubeyko wrote:
> On Thu, 2026-02-26 at 10:55 -0500, Jeff Layton wrote:
> > Update nilfs2 trace events and filesystem code for u64 i_ino:
> >
> > - Change __field(ino_t, ...) to __field(u64, ...) in trace events
> > - Update format strings from %lu to %llu
> > - Cast to (unsigned long long) in TP_printk
> >
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > ---
> > fs/nilfs2/alloc.c | 10 +++++-----
> > fs/nilfs2/bmap.c | 2 +-
> > fs/nilfs2/btnode.c | 2 +-
> > fs/nilfs2/btree.c | 12 ++++++------
> > fs/nilfs2/dir.c | 12 ++++++------
> > fs/nilfs2/direct.c | 4 ++--
> > fs/nilfs2/gcinode.c | 2 +-
> > fs/nilfs2/inode.c | 8 ++++----
> > fs/nilfs2/mdt.c | 2 +-
> > fs/nilfs2/namei.c | 2 +-
> > fs/nilfs2/segment.c | 2 +-
> > include/trace/events/nilfs2.h | 12 ++++++------
> > 12 files changed, 35 insertions(+), 35 deletions(-)
> >
> > diff --git a/fs/nilfs2/alloc.c b/fs/nilfs2/alloc.c
> > index e7eebb04f9a4080a39f17d4123e58ed7df6b2f4b..7b1cd2baefcf21e54f9260845b02c7c95c148c64 100644
> > --- a/fs/nilfs2/alloc.c
> > +++ b/fs/nilfs2/alloc.c
> > @@ -707,7 +707,7 @@ void nilfs_palloc_commit_free_entry(struct inode *inode,
> >
> > if (!nilfs_clear_bit_atomic(lock, group_offset, bitmap))
> > nilfs_warn(inode->i_sb,
> > - "%s (ino=%lu): entry number %llu already freed",
> > + "%s (ino=%llu): entry number %llu already freed",
> > __func__, inode->i_ino,
> > (unsigned long long)req->pr_entry_nr);
> > else
> > @@ -748,7 +748,7 @@ void nilfs_palloc_abort_alloc_entry(struct inode *inode,
> >
> > if (!nilfs_clear_bit_atomic(lock, group_offset, bitmap))
> > nilfs_warn(inode->i_sb,
> > - "%s (ino=%lu): entry number %llu already freed",
> > + "%s (ino=%llu): entry number %llu already freed",
> > __func__, inode->i_ino,
> > (unsigned long long)req->pr_entry_nr);
> > else
> > @@ -861,7 +861,7 @@ int nilfs_palloc_freev(struct inode *inode, __u64 *entry_nrs, size_t nitems)
> > if (!nilfs_clear_bit_atomic(lock, group_offset,
> > bitmap)) {
> > nilfs_warn(inode->i_sb,
> > - "%s (ino=%lu): entry number %llu already freed",
> > + "%s (ino=%llu): entry number %llu already freed",
> > __func__, inode->i_ino,
> > (unsigned long long)entry_nrs[j]);
> > } else {
> > @@ -906,7 +906,7 @@ int nilfs_palloc_freev(struct inode *inode, __u64 *entry_nrs, size_t nitems)
> > last_nrs[k]);
> > if (ret && ret != -ENOENT)
> > nilfs_warn(inode->i_sb,
> > - "error %d deleting block that object (entry=%llu, ino=%lu) belongs to",
> > + "error %d deleting block that object (entry=%llu, ino=%llu) belongs to",
> > ret, (unsigned long long)last_nrs[k],
> > inode->i_ino);
> > }
> > @@ -923,7 +923,7 @@ int nilfs_palloc_freev(struct inode *inode, __u64 *entry_nrs, size_t nitems)
> > ret = nilfs_palloc_delete_bitmap_block(inode, group);
> > if (ret && ret != -ENOENT)
> > nilfs_warn(inode->i_sb,
> > - "error %d deleting bitmap block of group=%lu, ino=%lu",
> > + "error %d deleting bitmap block of group=%lu, ino=%llu",
> > ret, group, inode->i_ino);
> > }
> > }
> > diff --git a/fs/nilfs2/bmap.c b/fs/nilfs2/bmap.c
> > index ccc1a7aa52d2064d56b826058554264c498d592f..824f2bd91c167965ec3a660202b6e6c5f1fe007e 100644
> > --- a/fs/nilfs2/bmap.c
> > +++ b/fs/nilfs2/bmap.c
> > @@ -33,7 +33,7 @@ static int nilfs_bmap_convert_error(struct nilfs_bmap *bmap,
> >
> > if (err == -EINVAL) {
> > __nilfs_error(inode->i_sb, fname,
> > - "broken bmap (inode number=%lu)", inode->i_ino);
> > + "broken bmap (inode number=%llu)", inode->i_ino);
> > err = -EIO;
> > }
> > return err;
> > diff --git a/fs/nilfs2/btnode.c b/fs/nilfs2/btnode.c
> > index 56836712909201775907483887e8a0022851bbec..2e553d698d0f3980de98fced415dfd819ddbca0a 100644
> > --- a/fs/nilfs2/btnode.c
> > +++ b/fs/nilfs2/btnode.c
> > @@ -64,7 +64,7 @@ nilfs_btnode_create_block(struct address_space *btnc, __u64 blocknr)
> > * clearing of an abandoned b-tree node is missing somewhere).
> > */
> > nilfs_error(inode->i_sb,
> > - "state inconsistency probably due to duplicate use of b-tree node block address %llu (ino=%lu)",
> > + "state inconsistency probably due to duplicate use of b-tree node block address %llu (ino=%llu)",
> > (unsigned long long)blocknr, inode->i_ino);
> > goto failed;
> > }
> > diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c
> > index dd0c8e560ef6a2c96515025321914e0d73f41144..3c03f5a741d144d22d1ffb5acf43a035e88c00dc 100644
> > --- a/fs/nilfs2/btree.c
> > +++ b/fs/nilfs2/btree.c
> > @@ -353,7 +353,7 @@ static int nilfs_btree_node_broken(const struct nilfs_btree_node *node,
> > nchildren <= 0 ||
> > nchildren > NILFS_BTREE_NODE_NCHILDREN_MAX(size))) {
> > nilfs_crit(inode->i_sb,
> > - "bad btree node (ino=%lu, blocknr=%llu): level = %d, flags = 0x%x, nchildren = %d",
> > + "bad btree node (ino=%llu, blocknr=%llu): level = %d, flags = 0x%x, nchildren = %d",
> > inode->i_ino, (unsigned long long)blocknr, level,
> > flags, nchildren);
> > ret = 1;
> > @@ -384,7 +384,7 @@ static int nilfs_btree_root_broken(const struct nilfs_btree_node *node,
> > nchildren > NILFS_BTREE_ROOT_NCHILDREN_MAX ||
> > (nchildren == 0 && level > NILFS_BTREE_LEVEL_NODE_MIN))) {
> > nilfs_crit(inode->i_sb,
> > - "bad btree root (ino=%lu): level = %d, flags = 0x%x, nchildren = %d",
> > + "bad btree root (ino=%llu): level = %d, flags = 0x%x, nchildren = %d",
> > inode->i_ino, level, flags, nchildren);
> > ret = 1;
> > }
> > @@ -453,7 +453,7 @@ static int nilfs_btree_bad_node(const struct nilfs_bmap *btree,
> > if (unlikely(nilfs_btree_node_get_level(node) != level)) {
> > dump_stack();
> > nilfs_crit(btree->b_inode->i_sb,
> > - "btree level mismatch (ino=%lu): %d != %d",
> > + "btree level mismatch (ino=%llu): %d != %d",
> > btree->b_inode->i_ino,
> > nilfs_btree_node_get_level(node), level);
> > return 1;
> > @@ -521,7 +521,7 @@ static int __nilfs_btree_get_block(const struct nilfs_bmap *btree, __u64 ptr,
> > out_no_wait:
> > if (!buffer_uptodate(bh)) {
> > nilfs_err(btree->b_inode->i_sb,
> > - "I/O error reading b-tree node block (ino=%lu, blocknr=%llu)",
> > + "I/O error reading b-tree node block (ino=%llu, blocknr=%llu)",
> > btree->b_inode->i_ino, (unsigned long long)ptr);
> > brelse(bh);
> > return -EIO;
> > @@ -2104,7 +2104,7 @@ static int nilfs_btree_propagate(struct nilfs_bmap *btree,
> > if (ret < 0) {
> > if (unlikely(ret == -ENOENT)) {
> > nilfs_crit(btree->b_inode->i_sb,
> > - "writing node/leaf block does not appear in b-tree (ino=%lu) at key=%llu, level=%d",
> > + "writing node/leaf block does not appear in b-tree (ino=%llu) at key=%llu, level=%d",
> > btree->b_inode->i_ino,
> > (unsigned long long)key, level);
> > ret = -EINVAL;
> > @@ -2146,7 +2146,7 @@ static void nilfs_btree_add_dirty_buffer(struct nilfs_bmap *btree,
> > level >= NILFS_BTREE_LEVEL_MAX) {
> > dump_stack();
> > nilfs_warn(btree->b_inode->i_sb,
> > - "invalid btree level: %d (key=%llu, ino=%lu, blocknr=%llu)",
> > + "invalid btree level: %d (key=%llu, ino=%llu, blocknr=%llu)",
> > level, (unsigned long long)key,
> > btree->b_inode->i_ino,
> > (unsigned long long)bh->b_blocknr);
> > diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c
> > index b243199036dfa1ab2299efaaa5bdf5da2d159ff2..3653db5cdb65137d1e660bb509c14ec4cbc8840b 100644
> > --- a/fs/nilfs2/dir.c
> > +++ b/fs/nilfs2/dir.c
> > @@ -150,7 +150,7 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
> >
> > Ebadsize:
> > nilfs_error(sb,
> > - "size of directory #%lu is not a multiple of chunk size",
> > + "size of directory #%llu is not a multiple of chunk size",
> > dir->i_ino);
> > goto fail;
> > Eshort:
> > @@ -169,7 +169,7 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
> > error = "disallowed inode number";
> > bad_entry:
> > nilfs_error(sb,
> > - "bad entry in directory #%lu: %s - offset=%lu, inode=%lu, rec_len=%zd, name_len=%d",
> > + "bad entry in directory #%llu: %s - offset=%lu, inode=%lu, rec_len=%zd, name_len=%d",
>
> I think you missed 'inode=%lu' here.
That is actually the placeholder for this:
(unsigned long)le64_to_cpu(p->inode)
...which is not inode->i_ino. I do agree that the cast probably no
longer makes sense with this change, but I'd probably leave that to a
later cleanup so we can keep this set focused on the i_ino change.
> > dir->i_ino, error, (folio->index << PAGE_SHIFT) + offs,
> > (unsigned long)le64_to_cpu(p->inode),
> > rec_len, p->name_len);
> > @@ -177,7 +177,7 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
> > Eend:
> > p = (struct nilfs_dir_entry *)(kaddr + offs);
> > nilfs_error(sb,
> > - "entry in directory #%lu spans the page boundary offset=%lu, inode=%lu",
> > + "entry in directory #%llu spans the page boundary offset=%lu, inode=%lu",
>
> Ditto. You missed 'inode=%lu' here.
>
>
Same here.
> > dir->i_ino, (folio->index << PAGE_SHIFT) + offs,
> > (unsigned long)le64_to_cpu(p->inode));
> > fail:
> > @@ -251,7 +251,7 @@ static int nilfs_readdir(struct file *file, struct dir_context *ctx)
> >
> > kaddr = nilfs_get_folio(inode, n, &folio);
> > if (IS_ERR(kaddr)) {
> > - nilfs_error(sb, "bad page in #%lu", inode->i_ino);
> > + nilfs_error(sb, "bad page in #%llu", inode->i_ino);
> > ctx->pos += PAGE_SIZE - offset;
> > return -EIO;
> > }
> > @@ -336,7 +336,7 @@ struct nilfs_dir_entry *nilfs_find_entry(struct inode *dir,
> > /* next folio is past the blocks we've got */
> > if (unlikely(n > (dir->i_blocks >> (PAGE_SHIFT - 9)))) {
> > nilfs_error(dir->i_sb,
> > - "dir %lu size %lld exceeds block count %llu",
> > + "dir %llu size %lld exceeds block count %llu",
> > dir->i_ino, dir->i_size,
> > (unsigned long long)dir->i_blocks);
> > goto out;
> > @@ -382,7 +382,7 @@ struct nilfs_dir_entry *nilfs_dotdot(struct inode *dir, struct folio **foliop)
> > return next_de;
> >
> > fail:
> > - nilfs_error(dir->i_sb, "directory #%lu %s", dir->i_ino, msg);
> > + nilfs_error(dir->i_sb, "directory #%llu %s", dir->i_ino, msg);
> > folio_release_kmap(folio, de);
> > return NULL;
> > }
> > diff --git a/fs/nilfs2/direct.c b/fs/nilfs2/direct.c
> > index 2d8dc6b35b5477947ca12a70288d3a3cce858aab..8bd0b1374e25f8ff510f3b36dbde2acc01aafc1e 100644
> > --- a/fs/nilfs2/direct.c
> > +++ b/fs/nilfs2/direct.c
> > @@ -338,7 +338,7 @@ static int nilfs_direct_assign(struct nilfs_bmap *bmap,
> > key = nilfs_bmap_data_get_key(bmap, *bh);
> > if (unlikely(key > NILFS_DIRECT_KEY_MAX)) {
> > nilfs_crit(bmap->b_inode->i_sb,
> > - "%s (ino=%lu): invalid key: %llu",
> > + "%s (ino=%llu): invalid key: %llu",
> > __func__,
> > bmap->b_inode->i_ino, (unsigned long long)key);
> > return -EINVAL;
> > @@ -346,7 +346,7 @@ static int nilfs_direct_assign(struct nilfs_bmap *bmap,
> > ptr = nilfs_direct_get_ptr(bmap, key);
> > if (unlikely(ptr == NILFS_BMAP_INVALID_PTR)) {
> > nilfs_crit(bmap->b_inode->i_sb,
> > - "%s (ino=%lu): invalid pointer: %llu",
> > + "%s (ino=%llu): invalid pointer: %llu",
> > __func__,
> > bmap->b_inode->i_ino, (unsigned long long)ptr);
> > return -EINVAL;
> > diff --git a/fs/nilfs2/gcinode.c b/fs/nilfs2/gcinode.c
> > index 561c220799c7aee879ad866865e377799c8ee6bb..62d4c1b787e95c961a360a4214d621d564ad8b4c 100644
> > --- a/fs/nilfs2/gcinode.c
> > +++ b/fs/nilfs2/gcinode.c
> > @@ -137,7 +137,7 @@ int nilfs_gccache_wait_and_mark_dirty(struct buffer_head *bh)
> > struct inode *inode = bh->b_folio->mapping->host;
> >
> > nilfs_err(inode->i_sb,
> > - "I/O error reading %s block for GC (ino=%lu, vblocknr=%llu)",
> > + "I/O error reading %s block for GC (ino=%llu, vblocknr=%llu)",
> > buffer_nilfs_node(bh) ? "node" : "data",
> > inode->i_ino, (unsigned long long)bh->b_blocknr);
> > return -EIO;
> > diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c
> > index 51bde45d586509dda3ef0cb7c46facb7fb2c61dd..51f7e125a311b868860e3e111700d49d4cb98fa6 100644
> > --- a/fs/nilfs2/inode.c
> > +++ b/fs/nilfs2/inode.c
> > @@ -108,7 +108,7 @@ int nilfs_get_block(struct inode *inode, sector_t blkoff,
> > * be locked in this case.
> > */
> > nilfs_warn(inode->i_sb,
> > - "%s (ino=%lu): a race condition while inserting a data block at offset=%llu",
> > + "%s (ino=%llu): a race condition while inserting a data block at offset=%llu",
> > __func__, inode->i_ino,
> > (unsigned long long)blkoff);
> > err = -EAGAIN;
> > @@ -789,7 +789,7 @@ static void nilfs_truncate_bmap(struct nilfs_inode_info *ii,
> > goto repeat;
> >
> > failed:
> > - nilfs_warn(ii->vfs_inode.i_sb, "error %d truncating bmap (ino=%lu)",
> > + nilfs_warn(ii->vfs_inode.i_sb, "error %d truncating bmap (ino=%llu)",
> > ret, ii->vfs_inode.i_ino);
> > }
> >
> > @@ -1026,7 +1026,7 @@ int nilfs_set_file_dirty(struct inode *inode, unsigned int nr_dirty)
> > * this inode.
> > */
> > nilfs_warn(inode->i_sb,
> > - "cannot set file dirty (ino=%lu): the file is being freed",
> > + "cannot set file dirty (ino=%llu): the file is being freed",
> > inode->i_ino);
> > spin_unlock(&nilfs->ns_inode_lock);
> > return -EINVAL; /*
> > @@ -1057,7 +1057,7 @@ int __nilfs_mark_inode_dirty(struct inode *inode, int flags)
> > err = nilfs_load_inode_block(inode, &ibh);
> > if (unlikely(err)) {
> > nilfs_warn(inode->i_sb,
> > - "cannot mark inode dirty (ino=%lu): error %d loading inode block",
> > + "cannot mark inode dirty (ino=%llu): error %d loading inode block",
> > inode->i_ino, err);
> > return err;
> > }
> > diff --git a/fs/nilfs2/mdt.c b/fs/nilfs2/mdt.c
> > index 946b0d3534a5f22f34ac44a91fb121541881c548..09adb40c65e505d92012a3d2f5fe8a5696e10056 100644
> > --- a/fs/nilfs2/mdt.c
> > +++ b/fs/nilfs2/mdt.c
> > @@ -203,7 +203,7 @@ static int nilfs_mdt_read_block(struct inode *inode, unsigned long block,
> > err = -EIO;
> > if (!buffer_uptodate(first_bh)) {
> > nilfs_err(inode->i_sb,
> > - "I/O error reading meta-data file (ino=%lu, block-offset=%lu)",
> > + "I/O error reading meta-data file (ino=%llu, block-offset=%lu)",
> > inode->i_ino, block);
> > goto failed_bh;
> > }
> > diff --git a/fs/nilfs2/namei.c b/fs/nilfs2/namei.c
> > index 40f4b1a28705b6e0eb8f0978cf3ac18b43aa1331..40ac679ec56e400b1df98e9be6fe9ca338a9ba51 100644
> > --- a/fs/nilfs2/namei.c
> > +++ b/fs/nilfs2/namei.c
> > @@ -292,7 +292,7 @@ static int nilfs_do_unlink(struct inode *dir, struct dentry *dentry)
> >
> > if (!inode->i_nlink) {
> > nilfs_warn(inode->i_sb,
> > - "deleting nonexistent file (ino=%lu), %d",
> > + "deleting nonexistent file (ino=%llu), %d",
> > inode->i_ino, inode->i_nlink);
> > set_nlink(inode, 1);
> > }
> > diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
> > index 098a3bd103e04cd09b0689fe2017380d74664496..4b1bf559f3524b1cc3965dae9fd3e5745718569d 100644
> > --- a/fs/nilfs2/segment.c
> > +++ b/fs/nilfs2/segment.c
> > @@ -2024,7 +2024,7 @@ static int nilfs_segctor_collect_dirty_files(struct nilfs_sc_info *sci,
> > ifile, ii->vfs_inode.i_ino, &ibh);
> > if (unlikely(err)) {
> > nilfs_warn(sci->sc_super,
> > - "log writer: error %d getting inode block (ino=%lu)",
> > + "log writer: error %d getting inode block (ino=%llu)",
> > err, ii->vfs_inode.i_ino);
> > return err;
> > }
> > diff --git a/include/trace/events/nilfs2.h b/include/trace/events/nilfs2.h
> > index 8880c11733dd307c223cc62ee34ebeff650ecb12..86a0011c9eeaf031cfa0b79875b2b106ef8b7cfd 100644
> > --- a/include/trace/events/nilfs2.h
> > +++ b/include/trace/events/nilfs2.h
> > @@ -165,14 +165,14 @@ TRACE_EVENT(nilfs2_segment_usage_freed,
> >
> > TRACE_EVENT(nilfs2_mdt_insert_new_block,
> > TP_PROTO(struct inode *inode,
> > - unsigned long ino,
> > + u64 ino,
> > unsigned long block),
> >
> > TP_ARGS(inode, ino, block),
> >
> > TP_STRUCT__entry(
> > __field(struct inode *, inode)
> > - __field(unsigned long, ino)
> > + __field(u64, ino)
> > __field(unsigned long, block)
> > ),
> >
> > @@ -182,7 +182,7 @@ TRACE_EVENT(nilfs2_mdt_insert_new_block,
> > __entry->block = block;
> > ),
> >
> > - TP_printk("inode = %p ino = %lu block = %lu",
> > + TP_printk("inode = %p ino = %llu block = %lu",
> > __entry->inode,
> > __entry->ino,
> > __entry->block)
> > @@ -190,7 +190,7 @@ TRACE_EVENT(nilfs2_mdt_insert_new_block,
> >
> > TRACE_EVENT(nilfs2_mdt_submit_block,
> > TP_PROTO(struct inode *inode,
> > - unsigned long ino,
> > + u64 ino,
> > unsigned long blkoff,
> > enum req_op mode),
> >
> > @@ -198,7 +198,7 @@ TRACE_EVENT(nilfs2_mdt_submit_block,
> >
> > TP_STRUCT__entry(
> > __field(struct inode *, inode)
> > - __field(unsigned long, ino)
> > + __field(u64, ino)
> > __field(unsigned long, blkoff)
> > /*
> > * Use field_struct() to avoid is_signed_type() on the
> > @@ -214,7 +214,7 @@ TRACE_EVENT(nilfs2_mdt_submit_block,
> > __entry->mode = mode;
> > ),
> >
> > - TP_printk("inode = %p ino = %lu blkoff = %lu mode = %x",
> > + TP_printk("inode = %p ino = %llu blkoff = %lu mode = %x",
> > __entry->inode,
> > __entry->ino,
> > __entry->blkoff,
--
Jeff Layton <jlayton@kernel.org>
^ permalink raw reply
* Re: [PATCH 12/61] nfsd: update format strings for u64 i_ino
From: Jeff Layton @ 2026-02-26 20:06 UTC (permalink / raw)
To: Chuck Lever, Alexander Viro, Christian Brauner, Jan Kara,
Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers, Dan Williams,
Matthew Wilcox, Eric Biggers, Theodore Y. Ts'o, Muchun Song,
Oscar Salvador, David Hildenbrand, David Howells, Paulo Alcantara,
Andreas Dilger, Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust,
Anna Schumaker, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25
In-Reply-To: <8b0bb056-9504-4835-8063-7ddeba328721@oracle.com>
On Thu, 2026-02-26 at 14:48 -0500, Chuck Lever wrote:
> On 2/26/26 10:55 AM, Jeff Layton wrote:
> > Update format strings from %ld/%lu to %lld/%llu for i_ino, which is
> > now a u64.
> >
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > ---
> > fs/nfsd/export.c | 2 +-
> > fs/nfsd/nfs4state.c | 4 ++--
> > fs/nfsd/nfsfh.c | 4 ++--
> > fs/nfsd/vfs.c | 2 +-
> > 4 files changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
> > index 8fdbba7cad96443d92cc7fdeea6158c4cc681be1..334b63eb966e71e6af6adde61aa1123f01b4390b 100644
> > --- a/fs/nfsd/export.c
> > +++ b/fs/nfsd/export.c
> > @@ -1039,7 +1039,7 @@ exp_rootfh(struct net *net, struct auth_domain *clp, char *name,
> > }
> > inode = d_inode(path.dentry);
> >
> > - dprintk("nfsd: exp_rootfh(%s [%p] %s:%s/%ld)\n",
> > + dprintk("nfsd: exp_rootfh(%s [%p] %s:%s/%lld)\n",
> > name, path.dentry, clp->name,
> > inode->i_sb->s_id, inode->i_ino);
> > exp = exp_parent(cd, clp, &path);
> > diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> > index 6b9c399b89dfb71a52b9c97f0efe9a1dea0558a6..a569d89ac9123d66bb47e7d74c7c98610de21da2 100644
> > --- a/fs/nfsd/nfs4state.c
> > +++ b/fs/nfsd/nfs4state.c
> > @@ -1253,7 +1253,7 @@ static void nfsd4_finalize_deleg_timestamps(struct nfs4_delegation *dp, struct f
> > if (ret) {
> > struct inode *inode = file_inode(f);
> >
> > - pr_notice_ratelimited("nfsd: Unable to update timestamps on inode %02x:%02x:%lu: %d\n",
> > + pr_notice_ratelimited("nfsd: Unable to update timestamps on inode %02x:%02x:%llu: %d\n",
> > MAJOR(inode->i_sb->s_dev),
> > MINOR(inode->i_sb->s_dev),
> > inode->i_ino, ret);
> > @@ -2888,7 +2888,7 @@ static void nfs4_show_superblock(struct seq_file *s, struct nfsd_file *f)
> > {
> > struct inode *inode = file_inode(f->nf_file);
> >
> > - seq_printf(s, "superblock: \"%02x:%02x:%ld\"",
> > + seq_printf(s, "superblock: \"%02x:%02x:%llu\"",
> > MAJOR(inode->i_sb->s_dev),
> > MINOR(inode->i_sb->s_dev),
> > inode->i_ino);
> > diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
> > index ed85dd43da18e6d4c4667ff14dc035f2eacff1d6..cfd143b41eb1fb53868f378d668905c1c7d5f868 100644
> > --- a/fs/nfsd/nfsfh.c
> > +++ b/fs/nfsd/nfsfh.c
> > @@ -601,9 +601,9 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry,
> > struct inode * inode = d_inode(dentry);
> > dev_t ex_dev = exp_sb(exp)->s_dev;
> >
> > - dprintk("nfsd: fh_compose(exp %02x:%02x/%ld %pd2, ino=%ld)\n",
> > + dprintk("nfsd: fh_compose(exp %02x:%02x/%lld %pd2, ino=%lld)\n",
> > MAJOR(ex_dev), MINOR(ex_dev),
> > - (long) d_inode(exp->ex_path.dentry)->i_ino,
> > + (long long) d_inode(exp->ex_path.dentry)->i_ino,
> > dentry,
> > (inode ? inode->i_ino : 0));
> >
> > diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
> > index c884c3f34afb044ee5cacc962a04a97de2f7fd88..dde09f3734c2844a3fe0b6d18d596276a19aa2d1 100644
> > --- a/fs/nfsd/vfs.c
> > +++ b/fs/nfsd/vfs.c
> > @@ -1163,7 +1163,7 @@ nfsd_direct_read(struct svc_rqst *rqstp, struct svc_fh *fhp,
> > } else if (unlikely(host_err == -EINVAL)) {
> > struct inode *inode = d_inode(fhp->fh_dentry);
> >
> > - pr_info_ratelimited("nfsd: Direct I/O alignment failure on %s/%ld\n",
> > + pr_info_ratelimited("nfsd: Direct I/O alignment failure on %s/%lld\n",
> > inode->i_sb->s_id, inode->i_ino);
> > host_err = -ESERVERFAULT;
> > }
> >
>
> Suggestion: Let's use the %llu format specifier consistently for
> inode->i_ino, which is unsigned.
>
> Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
>
Good plan. I'll have claude do a pass for that in the next set.
--
Jeff Layton <jlayton@kernel.org>
^ permalink raw reply
* RE: [PATCH 17/61] nilfs2: update for u64 i_ino
From: Viacheslav Dubeyko @ 2026-02-26 20:09 UTC (permalink / raw)
To: david@kernel.org, davem@davemloft.net, hch@infradead.org,
Paolo Abeni, anna@kernel.org, ms@dev.tdt.de,
alexander.shishkin@linux.intel.com, casey@schaufler-ca.com,
ebiggers@kernel.org, jack@suse.cz, Ondrej Mosnacek,
mark.rutland@arm.com, glaubitz@physik.fu-berlin.de,
miklos@szeredi.hu, sumit.semwal@linaro.org,
john.johansen@canonical.com, amir73il@gmail.com,
slava@dubeyko.com, willy@infradead.org, tytso@mit.edu,
serge@hallyn.com, jth@kernel.org, jolsa@kernel.org,
shaggy@kernel.org, jaharkes@cs.cmu.edu, willemb@google.com,
jlayton@kernel.org, ericvh@kernel.org, simona@ffwll.ch,
trondmy@kernel.org, aivazian.tigran@gmail.com,
asmadeus@codewreck.org, hubcap@omnibond.com,
muchun.song@linux.dev, neil@brown.name, sfrench@samba.org,
jmorris@namei.org, lucho@ionkov.net, jlbec@evilplan.org,
chuck.lever@oracle.com, mathieu.desnoyers@efficios.com,
dan.j.williams@intel.com, raven@themaw.net, Alex Markuze,
peterz@infradead.org, christian.koenig@amd.com, horms@kernel.org,
mhiramat@kernel.org, alexander.deucher@amd.com, tom@talpey.com,
mark@fasheh.com, mikulas@artax.karlin.mff.cuni.cz,
djwong@kernel.org, edumazet@google.com, Olga Kornievskaia,
bharathsm@microsoft.com, adrian.hunter@intel.com,
osalvador@suse.de, ronniesahlberg@gmail.com, pc@manguebit.org,
martin@omnibond.com, naohiro.aota@wdc.com, frank.li@vivo.com,
dsterba@suse.com, zohar@linux.ibm.com, code@tyhicks.com,
dwmw2@infradead.org, kuba@kernel.org, kuniyu@google.com,
nico@fluxnic.net, jack@suse.com, dlemoal@kernel.org,
viro@zeniv.linux.org.uk, stephen.smalley.work@gmail.com,
salah.triki@gmail.com, David Howells, paul@paul-moore.com,
luisbg@kernel.org, acme@kernel.org, richard@nod.at,
rostedt@goodmis.org, idryomov@gmail.com,
joseph.qi@linux.alibaba.com, al@alarsen.net,
james.clark@linaro.org, dmitry.kasatkin@gmail.com,
roberto.sassu@huawei.com, konishi.ryusuke@gmail.com,
sprasad@microsoft.com, jaegeuk@kernel.org,
linux_oss@crudebyte.com, brauner@kernel.org, Dai.Ngo@oracle.com,
eric.snowberg@oracle.com, adilger.kernel@dilger.ca,
chao@kernel.org, wufan@kernel.org, irogers@google.com,
Ingo Molnar, alex.aring@gmail.com, namhyung@kernel.org,
oleg@redhat.com, chengzhihao1@huawei.com,
marc.dionne@auristor.com, airlied@gmail.com,
almaz.alexandrovich@paragon-software.com, coda@cs.cmu.edu
Cc: ecryptfs@vger.kernel.org, ntfs3@lists.linux.dev,
linux-unionfs@vger.kernel.org, linux-x25@vger.kernel.org,
autofs@vger.kernel.org, amd-gfx@lists.freedesktop.org,
linux-fsdevel@vger.kernel.org, linux-media@vger.kernel.org,
ocfs2-devel@lists.linux.dev, fsverity@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-integrity@vger.kernel.org, samba-technical@lists.samba.org,
linux-nilfs@vger.kernel.org, apparmor@lists.ubuntu.com,
selinux@vger.kernel.org, linaro-mm-sig@lists.linaro.org,
v9fs@lists.linux.dev, linux-xfs@vger.kernel.org,
netdev@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net, nvdimm@lists.linux.dev,
ceph-devel@vger.kernel.org, jfs-discussion@lists.sourceforge.net,
linux-mtd@lists.infradead.org, devel@lists.orangefs.org,
linux-fscrypt@vger.kernel.org, linux-afs@lists.infradead.org,
linux-security-module@vger.kernel.org, linux-cifs@vger.kernel.org,
linux-hams@vger.kernel.org, linux-nfs@vger.kernel.org,
codalist@coda.cs.cmu.edu, linux-mm@kvack.org,
netfs@lists.linux.dev, linux-perf-users@vger.kernel.org,
dri-devel@lists.freedesktop.org
In-Reply-To: <d8d47ebf099b21bf20f7284837f8164a19590010.camel@kernel.org>
On Thu, 2026-02-26 at 15:06 -0500, Jeff Layton wrote:
> On Thu, 2026-02-26 at 19:46 +0000, Viacheslav Dubeyko wrote:
> > On Thu, 2026-02-26 at 10:55 -0500, Jeff Layton wrote:
> > > Update nilfs2 trace events and filesystem code for u64 i_ino:
> > >
> > > - Change __field(ino_t, ...) to __field(u64, ...) in trace events
> > > - Update format strings from %lu to %llu
> > > - Cast to (unsigned long long) in TP_printk
> > >
> > > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > > ---
> > > fs/nilfs2/alloc.c | 10 +++++-----
> > > fs/nilfs2/bmap.c | 2 +-
> > > fs/nilfs2/btnode.c | 2 +-
> > > fs/nilfs2/btree.c | 12 ++++++------
> > > fs/nilfs2/dir.c | 12 ++++++------
> > > fs/nilfs2/direct.c | 4 ++--
> > > fs/nilfs2/gcinode.c | 2 +-
> > > fs/nilfs2/inode.c | 8 ++++----
> > > fs/nilfs2/mdt.c | 2 +-
> > > fs/nilfs2/namei.c | 2 +-
> > > fs/nilfs2/segment.c | 2 +-
> > > include/trace/events/nilfs2.h | 12 ++++++------
> > > 12 files changed, 35 insertions(+), 35 deletions(-)
> > >
> > > diff --git a/fs/nilfs2/alloc.c b/fs/nilfs2/alloc.c
> > > index e7eebb04f9a4080a39f17d4123e58ed7df6b2f4b..7b1cd2baefcf21e54f9260845b02c7c95c148c64 100644
> > > --- a/fs/nilfs2/alloc.c
> > > +++ b/fs/nilfs2/alloc.c
> > > @@ -707,7 +707,7 @@ void nilfs_palloc_commit_free_entry(struct inode *inode,
> > >
> > > if (!nilfs_clear_bit_atomic(lock, group_offset, bitmap))
> > > nilfs_warn(inode->i_sb,
> > > - "%s (ino=%lu): entry number %llu already freed",
> > > + "%s (ino=%llu): entry number %llu already freed",
> > > __func__, inode->i_ino,
> > > (unsigned long long)req->pr_entry_nr);
> > > else
> > > @@ -748,7 +748,7 @@ void nilfs_palloc_abort_alloc_entry(struct inode *inode,
> > >
> > > if (!nilfs_clear_bit_atomic(lock, group_offset, bitmap))
> > > nilfs_warn(inode->i_sb,
> > > - "%s (ino=%lu): entry number %llu already freed",
> > > + "%s (ino=%llu): entry number %llu already freed",
> > > __func__, inode->i_ino,
> > > (unsigned long long)req->pr_entry_nr);
> > > else
> > > @@ -861,7 +861,7 @@ int nilfs_palloc_freev(struct inode *inode, __u64 *entry_nrs, size_t nitems)
> > > if (!nilfs_clear_bit_atomic(lock, group_offset,
> > > bitmap)) {
> > > nilfs_warn(inode->i_sb,
> > > - "%s (ino=%lu): entry number %llu already freed",
> > > + "%s (ino=%llu): entry number %llu already freed",
> > > __func__, inode->i_ino,
> > > (unsigned long long)entry_nrs[j]);
> > > } else {
> > > @@ -906,7 +906,7 @@ int nilfs_palloc_freev(struct inode *inode, __u64 *entry_nrs, size_t nitems)
> > > last_nrs[k]);
> > > if (ret && ret != -ENOENT)
> > > nilfs_warn(inode->i_sb,
> > > - "error %d deleting block that object (entry=%llu, ino=%lu) belongs to",
> > > + "error %d deleting block that object (entry=%llu, ino=%llu) belongs to",
> > > ret, (unsigned long long)last_nrs[k],
> > > inode->i_ino);
> > > }
> > > @@ -923,7 +923,7 @@ int nilfs_palloc_freev(struct inode *inode, __u64 *entry_nrs, size_t nitems)
> > > ret = nilfs_palloc_delete_bitmap_block(inode, group);
> > > if (ret && ret != -ENOENT)
> > > nilfs_warn(inode->i_sb,
> > > - "error %d deleting bitmap block of group=%lu, ino=%lu",
> > > + "error %d deleting bitmap block of group=%lu, ino=%llu",
> > > ret, group, inode->i_ino);
> > > }
> > > }
> > > diff --git a/fs/nilfs2/bmap.c b/fs/nilfs2/bmap.c
> > > index ccc1a7aa52d2064d56b826058554264c498d592f..824f2bd91c167965ec3a660202b6e6c5f1fe007e 100644
> > > --- a/fs/nilfs2/bmap.c
> > > +++ b/fs/nilfs2/bmap.c
> > > @@ -33,7 +33,7 @@ static int nilfs_bmap_convert_error(struct nilfs_bmap *bmap,
> > >
> > > if (err == -EINVAL) {
> > > __nilfs_error(inode->i_sb, fname,
> > > - "broken bmap (inode number=%lu)", inode->i_ino);
> > > + "broken bmap (inode number=%llu)", inode->i_ino);
> > > err = -EIO;
> > > }
> > > return err;
> > > diff --git a/fs/nilfs2/btnode.c b/fs/nilfs2/btnode.c
> > > index 56836712909201775907483887e8a0022851bbec..2e553d698d0f3980de98fced415dfd819ddbca0a 100644
> > > --- a/fs/nilfs2/btnode.c
> > > +++ b/fs/nilfs2/btnode.c
> > > @@ -64,7 +64,7 @@ nilfs_btnode_create_block(struct address_space *btnc, __u64 blocknr)
> > > * clearing of an abandoned b-tree node is missing somewhere).
> > > */
> > > nilfs_error(inode->i_sb,
> > > - "state inconsistency probably due to duplicate use of b-tree node block address %llu (ino=%lu)",
> > > + "state inconsistency probably due to duplicate use of b-tree node block address %llu (ino=%llu)",
> > > (unsigned long long)blocknr, inode->i_ino);
> > > goto failed;
> > > }
> > > diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c
> > > index dd0c8e560ef6a2c96515025321914e0d73f41144..3c03f5a741d144d22d1ffb5acf43a035e88c00dc 100644
> > > --- a/fs/nilfs2/btree.c
> > > +++ b/fs/nilfs2/btree.c
> > > @@ -353,7 +353,7 @@ static int nilfs_btree_node_broken(const struct nilfs_btree_node *node,
> > > nchildren <= 0 ||
> > > nchildren > NILFS_BTREE_NODE_NCHILDREN_MAX(size))) {
> > > nilfs_crit(inode->i_sb,
> > > - "bad btree node (ino=%lu, blocknr=%llu): level = %d, flags = 0x%x, nchildren = %d",
> > > + "bad btree node (ino=%llu, blocknr=%llu): level = %d, flags = 0x%x, nchildren = %d",
> > > inode->i_ino, (unsigned long long)blocknr, level,
> > > flags, nchildren);
> > > ret = 1;
> > > @@ -384,7 +384,7 @@ static int nilfs_btree_root_broken(const struct nilfs_btree_node *node,
> > > nchildren > NILFS_BTREE_ROOT_NCHILDREN_MAX ||
> > > (nchildren == 0 && level > NILFS_BTREE_LEVEL_NODE_MIN))) {
> > > nilfs_crit(inode->i_sb,
> > > - "bad btree root (ino=%lu): level = %d, flags = 0x%x, nchildren = %d",
> > > + "bad btree root (ino=%llu): level = %d, flags = 0x%x, nchildren = %d",
> > > inode->i_ino, level, flags, nchildren);
> > > ret = 1;
> > > }
> > > @@ -453,7 +453,7 @@ static int nilfs_btree_bad_node(const struct nilfs_bmap *btree,
> > > if (unlikely(nilfs_btree_node_get_level(node) != level)) {
> > > dump_stack();
> > > nilfs_crit(btree->b_inode->i_sb,
> > > - "btree level mismatch (ino=%lu): %d != %d",
> > > + "btree level mismatch (ino=%llu): %d != %d",
> > > btree->b_inode->i_ino,
> > > nilfs_btree_node_get_level(node), level);
> > > return 1;
> > > @@ -521,7 +521,7 @@ static int __nilfs_btree_get_block(const struct nilfs_bmap *btree, __u64 ptr,
> > > out_no_wait:
> > > if (!buffer_uptodate(bh)) {
> > > nilfs_err(btree->b_inode->i_sb,
> > > - "I/O error reading b-tree node block (ino=%lu, blocknr=%llu)",
> > > + "I/O error reading b-tree node block (ino=%llu, blocknr=%llu)",
> > > btree->b_inode->i_ino, (unsigned long long)ptr);
> > > brelse(bh);
> > > return -EIO;
> > > @@ -2104,7 +2104,7 @@ static int nilfs_btree_propagate(struct nilfs_bmap *btree,
> > > if (ret < 0) {
> > > if (unlikely(ret == -ENOENT)) {
> > > nilfs_crit(btree->b_inode->i_sb,
> > > - "writing node/leaf block does not appear in b-tree (ino=%lu) at key=%llu, level=%d",
> > > + "writing node/leaf block does not appear in b-tree (ino=%llu) at key=%llu, level=%d",
> > > btree->b_inode->i_ino,
> > > (unsigned long long)key, level);
> > > ret = -EINVAL;
> > > @@ -2146,7 +2146,7 @@ static void nilfs_btree_add_dirty_buffer(struct nilfs_bmap *btree,
> > > level >= NILFS_BTREE_LEVEL_MAX) {
> > > dump_stack();
> > > nilfs_warn(btree->b_inode->i_sb,
> > > - "invalid btree level: %d (key=%llu, ino=%lu, blocknr=%llu)",
> > > + "invalid btree level: %d (key=%llu, ino=%llu, blocknr=%llu)",
> > > level, (unsigned long long)key,
> > > btree->b_inode->i_ino,
> > > (unsigned long long)bh->b_blocknr);
> > > diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c
> > > index b243199036dfa1ab2299efaaa5bdf5da2d159ff2..3653db5cdb65137d1e660bb509c14ec4cbc8840b 100644
> > > --- a/fs/nilfs2/dir.c
> > > +++ b/fs/nilfs2/dir.c
> > > @@ -150,7 +150,7 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
> > >
> > > Ebadsize:
> > > nilfs_error(sb,
> > > - "size of directory #%lu is not a multiple of chunk size",
> > > + "size of directory #%llu is not a multiple of chunk size",
> > > dir->i_ino);
> > > goto fail;
> > > Eshort:
> > > @@ -169,7 +169,7 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
> > > error = "disallowed inode number";
> > > bad_entry:
> > > nilfs_error(sb,
> > > - "bad entry in directory #%lu: %s - offset=%lu, inode=%lu, rec_len=%zd, name_len=%d",
> > > + "bad entry in directory #%llu: %s - offset=%lu, inode=%lu, rec_len=%zd, name_len=%d",
> >
> > I think you missed 'inode=%lu' here.
>
> That is actually the placeholder for this:
>
> (unsigned long)le64_to_cpu(p->inode)
>
> ...which is not inode->i_ino. I do agree that the cast probably no
> longer makes sense with this change, but I'd probably leave that to a
> later cleanup so we can keep this set focused on the i_ino change.
I see your point. Makes sense. The rest looks good.
Reviewed-by: Viacheslav Dubeyko <slava@dubeyko.com>
Thanks,
Slava.
>
>
> > > dir->i_ino, error, (folio->index << PAGE_SHIFT) + offs,
> > > (unsigned long)le64_to_cpu(p->inode),
> > > rec_len, p->name_len);
> > > @@ -177,7 +177,7 @@ static bool nilfs_check_folio(struct folio *folio, char *kaddr)
> > > Eend:
> > > p = (struct nilfs_dir_entry *)(kaddr + offs);
> > > nilfs_error(sb,
> > > - "entry in directory #%lu spans the page boundary offset=%lu, inode=%lu",
> > > + "entry in directory #%llu spans the page boundary offset=%lu, inode=%lu",
> >
> > Ditto. You missed 'inode=%lu' here.
> >
> >
>
> Same here.
>
> > > dir->i_ino, (folio->index << PAGE_SHIFT) + offs,
> > > (unsigned long)le64_to_cpu(p->inode));
> > > fail:
> > > @@ -251,7 +251,7 @@ static int nilfs_readdir(struct file *file, struct dir_context *ctx)
> > >
> > > kaddr = nilfs_get_folio(inode, n, &folio);
> > > if (IS_ERR(kaddr)) {
> > > - nilfs_error(sb, "bad page in #%lu", inode->i_ino);
> > > + nilfs_error(sb, "bad page in #%llu", inode->i_ino);
> > > ctx->pos += PAGE_SIZE - offset;
> > > return -EIO;
> > > }
> > > @@ -336,7 +336,7 @@ struct nilfs_dir_entry *nilfs_find_entry(struct inode *dir,
> > > /* next folio is past the blocks we've got */
> > > if (unlikely(n > (dir->i_blocks >> (PAGE_SHIFT - 9)))) {
> > > nilfs_error(dir->i_sb,
> > > - "dir %lu size %lld exceeds block count %llu",
> > > + "dir %llu size %lld exceeds block count %llu",
> > > dir->i_ino, dir->i_size,
> > > (unsigned long long)dir->i_blocks);
> > > goto out;
> > > @@ -382,7 +382,7 @@ struct nilfs_dir_entry *nilfs_dotdot(struct inode *dir, struct folio **foliop)
> > > return next_de;
> > >
> > > fail:
> > > - nilfs_error(dir->i_sb, "directory #%lu %s", dir->i_ino, msg);
> > > + nilfs_error(dir->i_sb, "directory #%llu %s", dir->i_ino, msg);
> > > folio_release_kmap(folio, de);
> > > return NULL;
> > > }
> > > diff --git a/fs/nilfs2/direct.c b/fs/nilfs2/direct.c
> > > index 2d8dc6b35b5477947ca12a70288d3a3cce858aab..8bd0b1374e25f8ff510f3b36dbde2acc01aafc1e 100644
> > > --- a/fs/nilfs2/direct.c
> > > +++ b/fs/nilfs2/direct.c
> > > @@ -338,7 +338,7 @@ static int nilfs_direct_assign(struct nilfs_bmap *bmap,
> > > key = nilfs_bmap_data_get_key(bmap, *bh);
> > > if (unlikely(key > NILFS_DIRECT_KEY_MAX)) {
> > > nilfs_crit(bmap->b_inode->i_sb,
> > > - "%s (ino=%lu): invalid key: %llu",
> > > + "%s (ino=%llu): invalid key: %llu",
> > > __func__,
> > > bmap->b_inode->i_ino, (unsigned long long)key);
> > > return -EINVAL;
> > > @@ -346,7 +346,7 @@ static int nilfs_direct_assign(struct nilfs_bmap *bmap,
> > > ptr = nilfs_direct_get_ptr(bmap, key);
> > > if (unlikely(ptr == NILFS_BMAP_INVALID_PTR)) {
> > > nilfs_crit(bmap->b_inode->i_sb,
> > > - "%s (ino=%lu): invalid pointer: %llu",
> > > + "%s (ino=%llu): invalid pointer: %llu",
> > > __func__,
> > > bmap->b_inode->i_ino, (unsigned long long)ptr);
> > > return -EINVAL;
> > > diff --git a/fs/nilfs2/gcinode.c b/fs/nilfs2/gcinode.c
> > > index 561c220799c7aee879ad866865e377799c8ee6bb..62d4c1b787e95c961a360a4214d621d564ad8b4c 100644
> > > --- a/fs/nilfs2/gcinode.c
> > > +++ b/fs/nilfs2/gcinode.c
> > > @@ -137,7 +137,7 @@ int nilfs_gccache_wait_and_mark_dirty(struct buffer_head *bh)
> > > struct inode *inode = bh->b_folio->mapping->host;
> > >
> > > nilfs_err(inode->i_sb,
> > > - "I/O error reading %s block for GC (ino=%lu, vblocknr=%llu)",
> > > + "I/O error reading %s block for GC (ino=%llu, vblocknr=%llu)",
> > > buffer_nilfs_node(bh) ? "node" : "data",
> > > inode->i_ino, (unsigned long long)bh->b_blocknr);
> > > return -EIO;
> > > diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c
> > > index 51bde45d586509dda3ef0cb7c46facb7fb2c61dd..51f7e125a311b868860e3e111700d49d4cb98fa6 100644
> > > --- a/fs/nilfs2/inode.c
> > > +++ b/fs/nilfs2/inode.c
> > > @@ -108,7 +108,7 @@ int nilfs_get_block(struct inode *inode, sector_t blkoff,
> > > * be locked in this case.
> > > */
> > > nilfs_warn(inode->i_sb,
> > > - "%s (ino=%lu): a race condition while inserting a data block at offset=%llu",
> > > + "%s (ino=%llu): a race condition while inserting a data block at offset=%llu",
> > > __func__, inode->i_ino,
> > > (unsigned long long)blkoff);
> > > err = -EAGAIN;
> > > @@ -789,7 +789,7 @@ static void nilfs_truncate_bmap(struct nilfs_inode_info *ii,
> > > goto repeat;
> > >
> > > failed:
> > > - nilfs_warn(ii->vfs_inode.i_sb, "error %d truncating bmap (ino=%lu)",
> > > + nilfs_warn(ii->vfs_inode.i_sb, "error %d truncating bmap (ino=%llu)",
> > > ret, ii->vfs_inode.i_ino);
> > > }
> > >
> > > @@ -1026,7 +1026,7 @@ int nilfs_set_file_dirty(struct inode *inode, unsigned int nr_dirty)
> > > * this inode.
> > > */
> > > nilfs_warn(inode->i_sb,
> > > - "cannot set file dirty (ino=%lu): the file is being freed",
> > > + "cannot set file dirty (ino=%llu): the file is being freed",
> > > inode->i_ino);
> > > spin_unlock(&nilfs->ns_inode_lock);
> > > return -EINVAL; /*
> > > @@ -1057,7 +1057,7 @@ int __nilfs_mark_inode_dirty(struct inode *inode, int flags)
> > > err = nilfs_load_inode_block(inode, &ibh);
> > > if (unlikely(err)) {
> > > nilfs_warn(inode->i_sb,
> > > - "cannot mark inode dirty (ino=%lu): error %d loading inode block",
> > > + "cannot mark inode dirty (ino=%llu): error %d loading inode block",
> > > inode->i_ino, err);
> > > return err;
> > > }
> > > diff --git a/fs/nilfs2/mdt.c b/fs/nilfs2/mdt.c
> > > index 946b0d3534a5f22f34ac44a91fb121541881c548..09adb40c65e505d92012a3d2f5fe8a5696e10056 100644
> > > --- a/fs/nilfs2/mdt.c
> > > +++ b/fs/nilfs2/mdt.c
> > > @@ -203,7 +203,7 @@ static int nilfs_mdt_read_block(struct inode *inode, unsigned long block,
> > > err = -EIO;
> > > if (!buffer_uptodate(first_bh)) {
> > > nilfs_err(inode->i_sb,
> > > - "I/O error reading meta-data file (ino=%lu, block-offset=%lu)",
> > > + "I/O error reading meta-data file (ino=%llu, block-offset=%lu)",
> > > inode->i_ino, block);
> > > goto failed_bh;
> > > }
> > > diff --git a/fs/nilfs2/namei.c b/fs/nilfs2/namei.c
> > > index 40f4b1a28705b6e0eb8f0978cf3ac18b43aa1331..40ac679ec56e400b1df98e9be6fe9ca338a9ba51 100644
> > > --- a/fs/nilfs2/namei.c
> > > +++ b/fs/nilfs2/namei.c
> > > @@ -292,7 +292,7 @@ static int nilfs_do_unlink(struct inode *dir, struct dentry *dentry)
> > >
> > > if (!inode->i_nlink) {
> > > nilfs_warn(inode->i_sb,
> > > - "deleting nonexistent file (ino=%lu), %d",
> > > + "deleting nonexistent file (ino=%llu), %d",
> > > inode->i_ino, inode->i_nlink);
> > > set_nlink(inode, 1);
> > > }
> > > diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
> > > index 098a3bd103e04cd09b0689fe2017380d74664496..4b1bf559f3524b1cc3965dae9fd3e5745718569d 100644
> > > --- a/fs/nilfs2/segment.c
> > > +++ b/fs/nilfs2/segment.c
> > > @@ -2024,7 +2024,7 @@ static int nilfs_segctor_collect_dirty_files(struct nilfs_sc_info *sci,
> > > ifile, ii->vfs_inode.i_ino, &ibh);
> > > if (unlikely(err)) {
> > > nilfs_warn(sci->sc_super,
> > > - "log writer: error %d getting inode block (ino=%lu)",
> > > + "log writer: error %d getting inode block (ino=%llu)",
> > > err, ii->vfs_inode.i_ino);
> > > return err;
> > > }
> > > diff --git a/include/trace/events/nilfs2.h b/include/trace/events/nilfs2.h
> > > index 8880c11733dd307c223cc62ee34ebeff650ecb12..86a0011c9eeaf031cfa0b79875b2b106ef8b7cfd 100644
> > > --- a/include/trace/events/nilfs2.h
> > > +++ b/include/trace/events/nilfs2.h
> > > @@ -165,14 +165,14 @@ TRACE_EVENT(nilfs2_segment_usage_freed,
> > >
> > > TRACE_EVENT(nilfs2_mdt_insert_new_block,
> > > TP_PROTO(struct inode *inode,
> > > - unsigned long ino,
> > > + u64 ino,
> > > unsigned long block),
> > >
> > > TP_ARGS(inode, ino, block),
> > >
> > > TP_STRUCT__entry(
> > > __field(struct inode *, inode)
> > > - __field(unsigned long, ino)
> > > + __field(u64, ino)
> > > __field(unsigned long, block)
> > > ),
> > >
> > > @@ -182,7 +182,7 @@ TRACE_EVENT(nilfs2_mdt_insert_new_block,
> > > __entry->block = block;
> > > ),
> > >
> > > - TP_printk("inode = %p ino = %lu block = %lu",
> > > + TP_printk("inode = %p ino = %llu block = %lu",
> > > __entry->inode,
> > > __entry->ino,
> > > __entry->block)
> > > @@ -190,7 +190,7 @@ TRACE_EVENT(nilfs2_mdt_insert_new_block,
> > >
> > > TRACE_EVENT(nilfs2_mdt_submit_block,
> > > TP_PROTO(struct inode *inode,
> > > - unsigned long ino,
> > > + u64 ino,
> > > unsigned long blkoff,
> > > enum req_op mode),
> > >
> > > @@ -198,7 +198,7 @@ TRACE_EVENT(nilfs2_mdt_submit_block,
> > >
> > > TP_STRUCT__entry(
> > > __field(struct inode *, inode)
> > > - __field(unsigned long, ino)
> > > + __field(u64, ino)
> > > __field(unsigned long, blkoff)
> > > /*
> > > * Use field_struct() to avoid is_signed_type() on the
> > > @@ -214,7 +214,7 @@ TRACE_EVENT(nilfs2_mdt_submit_block,
> > > __entry->mode = mode;
> > > ),
> > >
> > > - TP_printk("inode = %p ino = %lu blkoff = %lu mode = %x",
> > > + TP_printk("inode = %p ino = %llu blkoff = %lu mode = %x",
> > > __entry->inode,
> > > __entry->ino,
> > > __entry->blkoff,
^ permalink raw reply
* Re: [PATCH mm-unstable v15 11/13] mm/khugepaged: avoid unnecessary mTHP collapse attempts
From: Nico Pache @ 2026-02-26 20:47 UTC (permalink / raw)
To: Usama Arif
Cc: linux-doc, linux-kernel, linux-mm, linux-trace-kernel, akpm,
anshuman.khandual, apopple, baohua, baolin.wang, byungchul,
catalin.marinas, cl, corbet, dave.hansen, david, dev.jain, gourry,
hannes, hughd, jack, jackmanb, jannh, jglisse, joshua.hahnjy, kas,
lance.yang, Liam.Howlett, lorenzo.stoakes, mathieu.desnoyers,
matthew.brost, mhiramat, mhocko, peterx, pfalcato, rakie.kim,
raquini, rdunlap, richard.weiyang, rientjes, rostedt, rppt,
ryan.roberts, shivankg, sunnanyong, surenb, thomas.hellstrom,
tiwai, usamaarif642, vbabka, vishal.moola, wangkefeng.wang, will,
willy, yang, ying.huang, ziy, zokeefe
In-Reply-To: <20260226162653.3802758-1-usama.arif@linux.dev>
On Thu, Feb 26, 2026 at 9:27 AM Usama Arif <usama.arif@linux.dev> wrote:
>
> On Wed, 25 Feb 2026 20:26:31 -0700 Nico Pache <npache@redhat.com> wrote:
>
> > There are cases where, if an attempted collapse fails, all subsequent
> > orders are guaranteed to also fail. Avoid these collapse attempts by
> > bailing out early.
> >
> > Signed-off-by: Nico Pache <npache@redhat.com>
> > ---
> > mm/khugepaged.c | 35 ++++++++++++++++++++++++++++++++++-
> > 1 file changed, 34 insertions(+), 1 deletion(-)
> >
> > diff --git a/mm/khugepaged.c b/mm/khugepaged.c
> > index 1c3711ed4513..388d3f2537e2 100644
> > --- a/mm/khugepaged.c
> > +++ b/mm/khugepaged.c
> > @@ -1492,9 +1492,42 @@ static int mthp_collapse(struct mm_struct *mm, unsigned long address,
> > ret = collapse_huge_page(mm, collapse_address, referenced,
> > unmapped, cc, mmap_locked,
> > order);
> > - if (ret == SCAN_SUCCEED) {
> > +
> > + switch (ret) {
> > + /* Cases were we continue to next collapse candidate */
> > + case SCAN_SUCCEED:
> > collapsed += nr_pte_entries;
> > + fallthrough;
> > + case SCAN_PTE_MAPPED_HUGEPAGE:
> > continue;
> > + /* Cases were lower orders might still succeed */
> > + case SCAN_LACK_REFERENCED_PAGE:
> > + case SCAN_EXCEED_NONE_PTE:
> > + case SCAN_EXCEED_SWAP_PTE:
> > + case SCAN_EXCEED_SHARED_PTE:
> > + case SCAN_PAGE_LOCK:
> > + case SCAN_PAGE_COUNT:
> > + case SCAN_PAGE_LRU:
> > + case SCAN_PAGE_NULL:
> > + case SCAN_DEL_PAGE_LRU:
> > + case SCAN_PTE_NON_PRESENT:
> > + case SCAN_PTE_UFFD_WP:
> > + case SCAN_ALLOC_HUGE_PAGE_FAIL:
> > + goto next_order;
> > + /* Cases were no further collapse is possible */
> > + case SCAN_CGROUP_CHARGE_FAIL:
>
> The only one that stands out to me is SCAN_CGROUP_CHARGE_FAIL. memcg charging
> of higher order folio might fail, but a lower order folio might pass?
> That said, if the cgroup is that tight, continuing collapse work may not
> be productive.
>
> Acked-by: Usama Arif <usama.arif@linux.dev>
Thanks! IIRC, David and I discussed all of these off chain to confirm
their placement. I had this in the 'next_order' case at some point and
David recommended it to "fail" for the same reason you state here:
collapsing or charging large order pages in such a tight cgroup is
likely unproductive and not worth the effort.
In contrast, SCAN_ALLOC_HUGE_PAGE_FAIL does not necessarily indicate a
resource constraint, but it could. We might fail to allocate an N-page
size due to fragmentation, but we could easily find an (N-1) size. We
could also have a scenario where a lack of memory causes the failure,
iterating all the way down, which would be unproductive. However, at
that point the OOM reaper should be active and the system will already
be cornered in multiple ways, so it should be ok.
Hopefully that gives some insight into the decisions made here :)
Cheers,
-- Nico
>
> > + case SCAN_COPY_MC:
> > + case SCAN_ADDRESS_RANGE:
> > + case SCAN_NO_PTE_TABLE:
> > + case SCAN_ANY_PROCESS:
> > + case SCAN_VMA_NULL:
> > + case SCAN_VMA_CHECK:
> > + case SCAN_SCAN_ABORT:
> > + case SCAN_PAGE_ANON:
> > + case SCAN_PMD_MAPPED:
> > + case SCAN_FAIL:
> > + default:
> > + return collapsed;
> > }
> > }
> >
> > --
> > 2.53.0
> >
> >
>
^ permalink raw reply
* Re: [PATCH 47/61] ubifs: update format strings for u64 i_ino
From: Richard Weinberger @ 2026-02-26 21:06 UTC (permalink / raw)
To: Jeff Layton
Cc: Al Viro, Christian Brauner, Jan Kara, Steven Rostedt, mhiramat,
Mathieu Desnoyers, dan j williams, Matthew Wilcox, Eric Biggers,
tytso, Muchun Song, Oscar Salvador, David Hildenbrand,
David Howells, Paulo Alcantara, Andreas Dilger, Jan Kara,
Jaegeuk Kim, Chao Yu, Trond Myklebust, anna, chuck lever,
NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey, Steve French,
Ronnie Sahlberg, Shyam, Bharath SM, Alexander Aring,
Ryusuke Konishi, Viacheslav Dubeyko, Eric Van Hensbergen,
Latchesar Ionkov, Dominique Martinet, Christian Schoenebeck,
David Sterba, Marc Dionne, raven, Luis de Bethencourt,
Salah Triki, Tigran A. Aivazian, Ilya Dryomov, Alex Markuze,
Jan Harkes, coda, Nicolas Pitre, Tyler Hicks, Amir Goldstein,
Christoph Hellwig, John Paul Adrian Glaubitz, Yangtao Li,
Mikulas Patocka, David Woodhouse, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
chengzhihao1, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, sumit semwal,
edumazet, Kuniyuki Iwashima, pabeni, Willem de Bruijn, davem,
kuba, Simon Horman, oleg, Peter Zijlstra, mingo,
Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
James Clark, Darrick J. Wong, Martin Schiller, linux-fsdevel,
linux-kernel, linux-trace-kernel, nvdimm, fsverity, linux-mm,
netfs, linux-ext4, linux-f2fs-devel, linux-nfs, linux-cifs,
samba-technical, linux-nilfs, v9fs, linux-afs, autofs, ceph-devel,
codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3, ocfs2-devel,
devel, linux-unionfs, apparmor, LSM, linux-integrity, selinux,
amd-gfx, DRI mailing list, linux-media, linaro-mm-sig, netdev,
linux-perf-users, linux-fscrypt, linux-xfs, linux-hams, linux-x25
In-Reply-To: <20260226-iino-u64-v1-47-ccceff366db9@kernel.org>
----- Ursprüngliche Mail -----
> Von: "Jeff Layton" <jlayton@kernel.org>
> Update format strings and local variable types in ubifs for the
> i_ino type change from unsigned long to u64.
>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> fs/ubifs/debug.c | 8 ++++----
> fs/ubifs/dir.c | 28 ++++++++++++++--------------
> fs/ubifs/file.c | 28 ++++++++++++++--------------
> fs/ubifs/journal.c | 6 +++---
> fs/ubifs/super.c | 16 ++++++++--------
> fs/ubifs/tnc.c | 4 ++--
> fs/ubifs/xattr.c | 14 +++++++-------
> 7 files changed, 52 insertions(+), 52 deletions(-)
Acked-by: Richard Weinberger <richard@nod.at>
Thanks,
//richard
^ permalink raw reply
* Re: [PATCH 37/61] jffs2: update format strings for u64 i_ino
From: Richard Weinberger @ 2026-02-26 21:06 UTC (permalink / raw)
To: Jeff Layton
Cc: Al Viro, Christian Brauner, Jan Kara, Steven Rostedt, mhiramat,
Mathieu Desnoyers, dan j williams, Matthew Wilcox, Eric Biggers,
tytso, Muchun Song, Oscar Salvador, David Hildenbrand,
David Howells, Paulo Alcantara, Andreas Dilger, Jan Kara,
Jaegeuk Kim, Chao Yu, Trond Myklebust, anna, chuck lever,
NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey, Steve French,
Ronnie Sahlberg, Shyam, Bharath SM, Alexander Aring,
Ryusuke Konishi, Viacheslav Dubeyko, Eric Van Hensbergen,
Latchesar Ionkov, Dominique Martinet, Christian Schoenebeck,
David Sterba, Marc Dionne, raven, Luis de Bethencourt,
Salah Triki, Tigran A. Aivazian, Ilya Dryomov, Alex Markuze,
Jan Harkes, coda, Nicolas Pitre, Tyler Hicks, Amir Goldstein,
Christoph Hellwig, John Paul Adrian Glaubitz, Yangtao Li,
Mikulas Patocka, David Woodhouse, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
chengzhihao1, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, sumit semwal,
edumazet, Kuniyuki Iwashima, pabeni, Willem de Bruijn, davem,
kuba, Simon Horman, oleg, Peter Zijlstra, mingo,
Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
James Clark, Darrick J. Wong, Martin Schiller, linux-fsdevel,
linux-kernel, linux-trace-kernel, nvdimm, fsverity, linux-mm,
netfs, linux-ext4, linux-f2fs-devel, linux-nfs, linux-cifs,
samba-technical, linux-nilfs, v9fs, linux-afs, autofs, ceph-devel,
codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3, ocfs2-devel,
devel, linux-unionfs, apparmor, LSM, linux-integrity, selinux,
amd-gfx, DRI mailing list, linux-media, linaro-mm-sig, netdev,
linux-perf-users, linux-fscrypt, linux-xfs, linux-hams, linux-x25
In-Reply-To: <20260226-iino-u64-v1-37-ccceff366db9@kernel.org>
----- Ursprüngliche Mail -----
> Von: "Jeff Layton" <jlayton@kernel.org>
> Update format strings and local variable types in jffs2 for the
> i_ino type change from unsigned long to u64.
>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> fs/jffs2/dir.c | 4 ++--
> fs/jffs2/file.c | 4 ++--
> fs/jffs2/fs.c | 18 +++++++++---------
> 3 files changed, 13 insertions(+), 13 deletions(-)
Acked-by: Richard Weinberger <richard@nod.at>
Thanks,
//richard
^ permalink raw reply
* Re: [PATCH 51/61] security: update audit format strings for u64 i_ino
From: Paul Moore @ 2026-02-26 21:11 UTC (permalink / raw)
To: Jeff Layton
Cc: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, James Morris, Serge E. Hallyn, Mimi Zohar,
Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller, linux-fsdevel, linux-kernel, linux-trace-kernel,
nvdimm, fsverity, linux-mm, netfs, linux-ext4, linux-f2fs-devel,
linux-nfs, linux-cifs, samba-technical, linux-nilfs, v9fs,
linux-afs, autofs, ceph-devel, codalist, ecryptfs, linux-mtd,
jfs-discussion, ntfs3, ocfs2-devel, devel, linux-unionfs,
apparmor, linux-security-module, linux-integrity, selinux,
amd-gfx, dri-devel, linux-media, linaro-mm-sig, netdev,
linux-perf-users, linux-fscrypt, linux-xfs, linux-hams, linux-x25
In-Reply-To: <20260226-iino-u64-v1-51-ccceff366db9@kernel.org>
On Thu, Feb 26, 2026 at 11:06 AM Jeff Layton <jlayton@kernel.org> wrote:
>
> Update %lu/%ld to %llu/%lld in security audit logging functions that
> print inode->i_ino, since i_ino is now u64.
>
> Files updated: apparmor/apparmorfs.c, integrity/integrity_audit.c,
> ipe/audit.c, lsm_audit.c.
>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> security/apparmor/apparmorfs.c | 4 ++--
> security/integrity/integrity_audit.c | 2 +-
> security/ipe/audit.c | 2 +-
> security/lsm_audit.c | 10 +++++-----
> security/selinux/hooks.c | 4 ++--
> security/smack/smack_lsm.c | 12 ++++++------
> 6 files changed, 17 insertions(+), 17 deletions(-)
...
> diff --git a/security/lsm_audit.c b/security/lsm_audit.c
> index 7d623b00495c14b079e10e963c21a9f949c11f07..737f5a263a8f79416133315edf363ece3d79c722 100644
> --- a/security/lsm_audit.c
> +++ b/security/lsm_audit.c
Everything in security/lsm_audit.c looks okay.
> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index d8224ea113d1ac273aac1fb52324f00b3301ae75..150ea86ebc1f7c7f8391af4109a3da82b12d00d2 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -1400,7 +1400,7 @@ static int inode_doinit_use_xattr(struct inode *inode, struct dentry *dentry,
> if (rc < 0) {
> kfree(context);
> if (rc != -ENODATA) {
> - pr_warn("SELinux: %s: getxattr returned %d for dev=%s ino=%ld\n",
> + pr_warn("SELinux: %s: getxattr returned %d for dev=%s ino=%lld\n",
> __func__, -rc, inode->i_sb->s_id, inode->i_ino);
> return rc;
> }
Additionally, later in this function there are pr_notice_ratelimited()
and pr_warn() calls that print inode numbers and need to be updated.
--
paul-moore.com
^ permalink raw reply
* Re: [PATCH v3 5/5] mm: add tracepoints for zone lock
From: Andrew Morton @ 2026-02-26 21:25 UTC (permalink / raw)
To: Shakeel Butt
Cc: Dmitry Ilvokhin, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Axel Rasmussen, Yuanchu Xie,
Wei Xu, Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
Brendan Jackman, Johannes Weiner, Zi Yan, Oscar Salvador,
Qi Zheng, linux-kernel, linux-mm, linux-trace-kernel, linux-cxl,
kernel-team, Benjamin Cheatham
In-Reply-To: <aaCbMwGNuUO1SbUb@linux.dev>
On Thu, 26 Feb 2026 11:14:52 -0800 Shakeel Butt <shakeel.butt@linux.dev> wrote:
> On Thu, Feb 26, 2026 at 06:26:22PM +0000, Dmitry Ilvokhin wrote:
> > Add tracepoint instrumentation to zone lock acquire/release operations
> > via the previously introduced wrappers.
> >
> > The implementation follows the mmap_lock tracepoint pattern: a
> > lightweight inline helper checks whether the tracepoint is enabled and
> > calls into an out-of-line helper when tracing is active. When
> > CONFIG_TRACING is disabled, helpers compile to empty inline stubs.
> >
> > The fast path is unaffected when tracing is disabled.
> >
> > Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
>
> ...
>
> > +void __zone_lock_do_trace_start_locking(struct zone *zone)
> > +{
> > + trace_zone_lock_start_locking(zone);
> > +}
> > +EXPORT_SYMBOL(__zone_lock_do_trace_start_locking);
>
> No reason to not have these as EXPORT_SYMBOL_GPL (& below)
Do we need the exports at all?
include/linux/mmzone.h
include/linux/zone_lock.h
include/trace/events/zone_lock.h
MAINTAINERS
mm/compaction.c
mm/internal.h
mm/Makefile
mm/memory_hotplug.c
mm/mm_init.c
mm/page_alloc.c
mm/page_isolation.c
mm/page_owner.c
mm/page_reporting.c
mm/show_mem.c
mm/vmscan.c
mm/vmstat.c
mm/zone_lock.c
^ permalink raw reply
* Re: [PATCH v3 5/5] mm: add tracepoints for zone lock
From: Shakeel Butt @ 2026-02-26 21:31 UTC (permalink / raw)
To: Andrew Morton
Cc: Dmitry Ilvokhin, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Axel Rasmussen, Yuanchu Xie,
Wei Xu, Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
Brendan Jackman, Johannes Weiner, Zi Yan, Oscar Salvador,
Qi Zheng, linux-kernel, linux-mm, linux-trace-kernel, linux-cxl,
kernel-team, Benjamin Cheatham
In-Reply-To: <20260226132501.5b70914daf9438a1103189ee@linux-foundation.org>
On Thu, Feb 26, 2026 at 01:25:01PM -0800, Andrew Morton wrote:
> On Thu, 26 Feb 2026 11:14:52 -0800 Shakeel Butt <shakeel.butt@linux.dev> wrote:
>
> > On Thu, Feb 26, 2026 at 06:26:22PM +0000, Dmitry Ilvokhin wrote:
> > > Add tracepoint instrumentation to zone lock acquire/release operations
> > > via the previously introduced wrappers.
> > >
> > > The implementation follows the mmap_lock tracepoint pattern: a
> > > lightweight inline helper checks whether the tracepoint is enabled and
> > > calls into an out-of-line helper when tracing is active. When
> > > CONFIG_TRACING is disabled, helpers compile to empty inline stubs.
> > >
> > > The fast path is unaffected when tracing is disabled.
> > >
> > > Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
> >
> > ...
> >
> > > +void __zone_lock_do_trace_start_locking(struct zone *zone)
> > > +{
> > > + trace_zone_lock_start_locking(zone);
> > > +}
> > > +EXPORT_SYMBOL(__zone_lock_do_trace_start_locking);
> >
> > No reason to not have these as EXPORT_SYMBOL_GPL (& below)
>
> Do we need the exports at all?
Very good point and we don't. I think this might just be copying the mmap_lock
tracepoint wrappers which might need the exports as some drivers might be taking
the mmap_lock.
Dmitry, please confirm (test) and let us know.
^ permalink raw reply
* Re: [PATCH v3 4/5] mm: rename zone->lock to zone->_lock
From: kernel test robot @ 2026-02-26 21:48 UTC (permalink / raw)
To: Dmitry Ilvokhin, Andrew Morton, David Hildenbrand,
Lorenzo Stoakes, Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Axel Rasmussen, Yuanchu Xie,
Wei Xu, Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
Brendan Jackman, Johannes Weiner, Zi Yan, Oscar Salvador,
Qi Zheng, Shakeel Butt
Cc: oe-kbuild-all, Linux Memory Management List, linux-kernel,
linux-trace-kernel, linux-cxl, kernel-team, Benjamin Cheatham,
Dmitry Ilvokhin
In-Reply-To: <1221b8e7fa9f5694f3c4e411f01581b5aba9bc63.1772129168.git.d@ilvokhin.com>
Hi Dmitry,
kernel test robot noticed the following build errors:
[auto build test ERROR on linus/master]
[also build test ERROR on v7.0-rc1 next-20260226]
[cannot apply to akpm-mm/mm-everything rppt-memblock/for-next rppt-memblock/fixes]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Dmitry-Ilvokhin/mm-introduce-zone-lock-wrappers/20260227-022914
base: linus/master
patch link: https://lore.kernel.org/r/1221b8e7fa9f5694f3c4e411f01581b5aba9bc63.1772129168.git.d%40ilvokhin.com
patch subject: [PATCH v3 4/5] mm: rename zone->lock to zone->_lock
config: microblaze-randconfig-r073-20260227 (https://download.01.org/0day-ci/archive/20260227/202602270508.8MKXotxZ-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 11.5.0
smatch version: v0.5.0-8994-gd50c5a4c
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260227/202602270508.8MKXotxZ-lkp@intel.com/reproduce)
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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602270508.8MKXotxZ-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:8,
from mm/shuffle.c:4:
mm/shuffle.c: In function '__shuffle_zone':
>> mm/shuffle.c:88:31: error: 'struct zone' has no member named 'lock'; did you mean '_lock'?
88 | spin_lock_irqsave(&z->lock, flags);
| ^~~~
include/linux/spinlock.h:244:48: note: in definition of macro 'raw_spin_lock_irqsave'
244 | flags = _raw_spin_lock_irqsave(lock); \
| ^~~~
mm/shuffle.c:88:9: note: in expansion of macro 'spin_lock_irqsave'
88 | spin_lock_irqsave(&z->lock, flags);
| ^~~~~~~~~~~~~~~~~
mm/shuffle.c:141:52: error: 'struct zone' has no member named 'lock'; did you mean '_lock'?
141 | spin_unlock_irqrestore(&z->lock, flags);
| ^~~~
| _lock
In file included from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:8,
from mm/shuffle.c:4:
mm/shuffle.c:143:47: error: 'struct zone' has no member named 'lock'; did you mean '_lock'?
143 | spin_lock_irqsave(&z->lock, flags);
| ^~~~
include/linux/spinlock.h:244:48: note: in definition of macro 'raw_spin_lock_irqsave'
244 | flags = _raw_spin_lock_irqsave(lock); \
| ^~~~
mm/shuffle.c:143:25: note: in expansion of macro 'spin_lock_irqsave'
143 | spin_lock_irqsave(&z->lock, flags);
| ^~~~~~~~~~~~~~~~~
mm/shuffle.c:146:36: error: 'struct zone' has no member named 'lock'; did you mean '_lock'?
146 | spin_unlock_irqrestore(&z->lock, flags);
| ^~~~
| _lock
vim +88 mm/shuffle.c
e900a918b0984e Dan Williams 2019-05-14 3
e900a918b0984e Dan Williams 2019-05-14 @4 #include <linux/mm.h>
e900a918b0984e Dan Williams 2019-05-14 5 #include <linux/init.h>
e900a918b0984e Dan Williams 2019-05-14 6 #include <linux/mmzone.h>
e900a918b0984e Dan Williams 2019-05-14 7 #include <linux/random.h>
e900a918b0984e Dan Williams 2019-05-14 8 #include <linux/moduleparam.h>
e900a918b0984e Dan Williams 2019-05-14 9 #include "internal.h"
e900a918b0984e Dan Williams 2019-05-14 10 #include "shuffle.h"
e900a918b0984e Dan Williams 2019-05-14 11
e900a918b0984e Dan Williams 2019-05-14 12 DEFINE_STATIC_KEY_FALSE(page_alloc_shuffle_key);
e900a918b0984e Dan Williams 2019-05-14 13
e900a918b0984e Dan Williams 2019-05-14 14 static bool shuffle_param;
e900a918b0984e Dan Williams 2019-05-14 15
85a34107eba913 Liu Shixin 2022-09-09 16 static __meminit int shuffle_param_set(const char *val,
e900a918b0984e Dan Williams 2019-05-14 17 const struct kernel_param *kp)
e900a918b0984e Dan Williams 2019-05-14 18 {
85a34107eba913 Liu Shixin 2022-09-09 19 if (param_set_bool(val, kp))
85a34107eba913 Liu Shixin 2022-09-09 20 return -EINVAL;
85a34107eba913 Liu Shixin 2022-09-09 21 if (*(bool *)kp->arg)
839195352d8235 David Hildenbrand 2020-08-06 22 static_branch_enable(&page_alloc_shuffle_key);
e900a918b0984e Dan Williams 2019-05-14 23 return 0;
e900a918b0984e Dan Williams 2019-05-14 24 }
85a34107eba913 Liu Shixin 2022-09-09 25
85a34107eba913 Liu Shixin 2022-09-09 26 static const struct kernel_param_ops shuffle_param_ops = {
85a34107eba913 Liu Shixin 2022-09-09 27 .set = shuffle_param_set,
85a34107eba913 Liu Shixin 2022-09-09 28 .get = param_get_bool,
85a34107eba913 Liu Shixin 2022-09-09 29 };
85a34107eba913 Liu Shixin 2022-09-09 30 module_param_cb(shuffle, &shuffle_param_ops, &shuffle_param, 0400);
e900a918b0984e Dan Williams 2019-05-14 31
e900a918b0984e Dan Williams 2019-05-14 32 /*
e900a918b0984e Dan Williams 2019-05-14 33 * For two pages to be swapped in the shuffle, they must be free (on a
e900a918b0984e Dan Williams 2019-05-14 34 * 'free_area' lru), have the same order, and have the same migratetype.
e900a918b0984e Dan Williams 2019-05-14 35 */
4a93025cbe4a0b David Hildenbrand 2020-08-06 36 static struct page * __meminit shuffle_valid_page(struct zone *zone,
4a93025cbe4a0b David Hildenbrand 2020-08-06 37 unsigned long pfn, int order)
e900a918b0984e Dan Williams 2019-05-14 38 {
4a93025cbe4a0b David Hildenbrand 2020-08-06 39 struct page *page = pfn_to_online_page(pfn);
e900a918b0984e Dan Williams 2019-05-14 40
e900a918b0984e Dan Williams 2019-05-14 41 /*
e900a918b0984e Dan Williams 2019-05-14 42 * Given we're dealing with randomly selected pfns in a zone we
e900a918b0984e Dan Williams 2019-05-14 43 * need to ask questions like...
e900a918b0984e Dan Williams 2019-05-14 44 */
e900a918b0984e Dan Williams 2019-05-14 45
4a93025cbe4a0b David Hildenbrand 2020-08-06 46 /* ... is the page managed by the buddy? */
4a93025cbe4a0b David Hildenbrand 2020-08-06 47 if (!page)
e900a918b0984e Dan Williams 2019-05-14 48 return NULL;
e900a918b0984e Dan Williams 2019-05-14 49
4a93025cbe4a0b David Hildenbrand 2020-08-06 50 /* ... is the page assigned to the same zone? */
4a93025cbe4a0b David Hildenbrand 2020-08-06 51 if (page_zone(page) != zone)
e900a918b0984e Dan Williams 2019-05-14 52 return NULL;
e900a918b0984e Dan Williams 2019-05-14 53
e900a918b0984e Dan Williams 2019-05-14 54 /* ...is the page free and currently on a free_area list? */
e900a918b0984e Dan Williams 2019-05-14 55 if (!PageBuddy(page))
e900a918b0984e Dan Williams 2019-05-14 56 return NULL;
e900a918b0984e Dan Williams 2019-05-14 57
e900a918b0984e Dan Williams 2019-05-14 58 /*
e900a918b0984e Dan Williams 2019-05-14 59 * ...is the page on the same list as the page we will
e900a918b0984e Dan Williams 2019-05-14 60 * shuffle it with?
e900a918b0984e Dan Williams 2019-05-14 61 */
ab130f9108dcf2 Matthew Wilcox (Oracle 2020-10-15 62) if (buddy_order(page) != order)
e900a918b0984e Dan Williams 2019-05-14 63 return NULL;
e900a918b0984e Dan Williams 2019-05-14 64
e900a918b0984e Dan Williams 2019-05-14 65 return page;
e900a918b0984e Dan Williams 2019-05-14 66 }
e900a918b0984e Dan Williams 2019-05-14 67
e900a918b0984e Dan Williams 2019-05-14 68 /*
e900a918b0984e Dan Williams 2019-05-14 69 * Fisher-Yates shuffle the freelist which prescribes iterating through an
e900a918b0984e Dan Williams 2019-05-14 70 * array, pfns in this case, and randomly swapping each entry with another in
e900a918b0984e Dan Williams 2019-05-14 71 * the span, end_pfn - start_pfn.
e900a918b0984e Dan Williams 2019-05-14 72 *
e900a918b0984e Dan Williams 2019-05-14 73 * To keep the implementation simple it does not attempt to correct for sources
e900a918b0984e Dan Williams 2019-05-14 74 * of bias in the distribution, like modulo bias or pseudo-random number
e900a918b0984e Dan Williams 2019-05-14 75 * generator bias. I.e. the expectation is that this shuffling raises the bar
e900a918b0984e Dan Williams 2019-05-14 76 * for attacks that exploit the predictability of page allocations, but need not
e900a918b0984e Dan Williams 2019-05-14 77 * be a perfect shuffle.
e900a918b0984e Dan Williams 2019-05-14 78 */
e900a918b0984e Dan Williams 2019-05-14 79 #define SHUFFLE_RETRY 10
e900a918b0984e Dan Williams 2019-05-14 80 void __meminit __shuffle_zone(struct zone *z)
e900a918b0984e Dan Williams 2019-05-14 81 {
e900a918b0984e Dan Williams 2019-05-14 82 unsigned long i, flags;
e900a918b0984e Dan Williams 2019-05-14 83 unsigned long start_pfn = z->zone_start_pfn;
e900a918b0984e Dan Williams 2019-05-14 84 unsigned long end_pfn = zone_end_pfn(z);
e900a918b0984e Dan Williams 2019-05-14 85 const int order = SHUFFLE_ORDER;
e900a918b0984e Dan Williams 2019-05-14 86 const int order_pages = 1 << order;
e900a918b0984e Dan Williams 2019-05-14 87
e900a918b0984e Dan Williams 2019-05-14 @88 spin_lock_irqsave(&z->lock, flags);
e900a918b0984e Dan Williams 2019-05-14 89 start_pfn = ALIGN(start_pfn, order_pages);
e900a918b0984e Dan Williams 2019-05-14 90 for (i = start_pfn; i < end_pfn; i += order_pages) {
e900a918b0984e Dan Williams 2019-05-14 91 unsigned long j;
e900a918b0984e Dan Williams 2019-05-14 92 int migratetype, retry;
e900a918b0984e Dan Williams 2019-05-14 93 struct page *page_i, *page_j;
e900a918b0984e Dan Williams 2019-05-14 94
e900a918b0984e Dan Williams 2019-05-14 95 /*
e900a918b0984e Dan Williams 2019-05-14 96 * We expect page_i, in the sub-range of a zone being added
e900a918b0984e Dan Williams 2019-05-14 97 * (@start_pfn to @end_pfn), to more likely be valid compared to
e900a918b0984e Dan Williams 2019-05-14 98 * page_j randomly selected in the span @zone_start_pfn to
e900a918b0984e Dan Williams 2019-05-14 99 * @spanned_pages.
e900a918b0984e Dan Williams 2019-05-14 100 */
4a93025cbe4a0b David Hildenbrand 2020-08-06 101 page_i = shuffle_valid_page(z, i, order);
e900a918b0984e Dan Williams 2019-05-14 102 if (!page_i)
e900a918b0984e Dan Williams 2019-05-14 103 continue;
e900a918b0984e Dan Williams 2019-05-14 104
e900a918b0984e Dan Williams 2019-05-14 105 for (retry = 0; retry < SHUFFLE_RETRY; retry++) {
e900a918b0984e Dan Williams 2019-05-14 106 /*
e900a918b0984e Dan Williams 2019-05-14 107 * Pick a random order aligned page in the zone span as
e900a918b0984e Dan Williams 2019-05-14 108 * a swap target. If the selected pfn is a hole, retry
e900a918b0984e Dan Williams 2019-05-14 109 * up to SHUFFLE_RETRY attempts find a random valid pfn
e900a918b0984e Dan Williams 2019-05-14 110 * in the zone.
e900a918b0984e Dan Williams 2019-05-14 111 */
e900a918b0984e Dan Williams 2019-05-14 112 j = z->zone_start_pfn +
e900a918b0984e Dan Williams 2019-05-14 113 ALIGN_DOWN(get_random_long() % z->spanned_pages,
e900a918b0984e Dan Williams 2019-05-14 114 order_pages);
4a93025cbe4a0b David Hildenbrand 2020-08-06 115 page_j = shuffle_valid_page(z, j, order);
e900a918b0984e Dan Williams 2019-05-14 116 if (page_j && page_j != page_i)
e900a918b0984e Dan Williams 2019-05-14 117 break;
e900a918b0984e Dan Williams 2019-05-14 118 }
e900a918b0984e Dan Williams 2019-05-14 119 if (retry >= SHUFFLE_RETRY) {
e900a918b0984e Dan Williams 2019-05-14 120 pr_debug("%s: failed to swap %#lx\n", __func__, i);
e900a918b0984e Dan Williams 2019-05-14 121 continue;
e900a918b0984e Dan Williams 2019-05-14 122 }
e900a918b0984e Dan Williams 2019-05-14 123
e900a918b0984e Dan Williams 2019-05-14 124 /*
e900a918b0984e Dan Williams 2019-05-14 125 * Each migratetype corresponds to its own list, make sure the
e900a918b0984e Dan Williams 2019-05-14 126 * types match otherwise we're moving pages to lists where they
e900a918b0984e Dan Williams 2019-05-14 127 * do not belong.
e900a918b0984e Dan Williams 2019-05-14 128 */
e900a918b0984e Dan Williams 2019-05-14 129 migratetype = get_pageblock_migratetype(page_i);
e900a918b0984e Dan Williams 2019-05-14 130 if (get_pageblock_migratetype(page_j) != migratetype) {
e900a918b0984e Dan Williams 2019-05-14 131 pr_debug("%s: migratetype mismatch %#lx\n", __func__, i);
e900a918b0984e Dan Williams 2019-05-14 132 continue;
e900a918b0984e Dan Williams 2019-05-14 133 }
e900a918b0984e Dan Williams 2019-05-14 134
e900a918b0984e Dan Williams 2019-05-14 135 list_swap(&page_i->lru, &page_j->lru);
e900a918b0984e Dan Williams 2019-05-14 136
e900a918b0984e Dan Williams 2019-05-14 137 pr_debug("%s: swap: %#lx -> %#lx\n", __func__, i, j);
e900a918b0984e Dan Williams 2019-05-14 138
e900a918b0984e Dan Williams 2019-05-14 139 /* take it easy on the zone lock */
e900a918b0984e Dan Williams 2019-05-14 140 if ((i % (100 * order_pages)) == 0) {
e900a918b0984e Dan Williams 2019-05-14 141 spin_unlock_irqrestore(&z->lock, flags);
e900a918b0984e Dan Williams 2019-05-14 142 cond_resched();
e900a918b0984e Dan Williams 2019-05-14 143 spin_lock_irqsave(&z->lock, flags);
e900a918b0984e Dan Williams 2019-05-14 144 }
e900a918b0984e Dan Williams 2019-05-14 145 }
e900a918b0984e Dan Williams 2019-05-14 146 spin_unlock_irqrestore(&z->lock, flags);
e900a918b0984e Dan Williams 2019-05-14 147 }
e900a918b0984e Dan Williams 2019-05-14 148
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply
* Re: [PATCH v3 4/5] mm: rename zone->lock to zone->_lock
From: Andrew Morton @ 2026-02-26 22:08 UTC (permalink / raw)
To: kernel test robot
Cc: Dmitry Ilvokhin, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Axel Rasmussen, Yuanchu Xie,
Wei Xu, Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
Brendan Jackman, Johannes Weiner, Zi Yan, Oscar Salvador,
Qi Zheng, Shakeel Butt, oe-kbuild-all,
Linux Memory Management List, linux-kernel, linux-trace-kernel,
linux-cxl, kernel-team, Benjamin Cheatham
In-Reply-To: <202602270508.8MKXotxZ-lkp@intel.com>
On Fri, 27 Feb 2026 05:48:05 +0800 kernel test robot <lkp@intel.com> wrote:
> Hi Dmitry,
>
> kernel test robot noticed the following build errors:
>
> mm/shuffle.c: In function '__shuffle_zone':
yep, thanks. And kernel/power/snapshot.c. I've added fixups.
^ permalink raw reply
* Re: [PATCH 50/61] zonefs: update format strings for u64 i_ino
From: Damien Le Moal @ 2026-02-26 22:45 UTC (permalink / raw)
To: Jeff Layton, Alexander Viro, Christian Brauner, Jan Kara,
Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers, Dan Williams,
Matthew Wilcox, Eric Biggers, Theodore Y. Ts'o, Muchun Song,
Oscar Salvador, David Hildenbrand, David Howells, Paulo Alcantara,
Andreas Dilger, Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust,
Anna Schumaker, Chuck Lever, NeilBrown, Olga Kornievskaia,
Dai Ngo, Tom Talpey, Steve French, Ronnie Sahlberg,
Shyam Prasad N, Bharath SM, Alexander Aring, Ryusuke Konishi,
Viacheslav Dubeyko, Eric Van Hensbergen, Latchesar Ionkov,
Dominique Martinet, Christian Schoenebeck, David Sterba,
Marc Dionne, Ian Kent, Luis de Bethencourt, Salah Triki,
Tigran A. Aivazian, Ilya Dryomov, Alex Markuze, Jan Harkes, coda,
Nicolas Pitre, Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Naohiro Aota, Johannes Thumshirn, John Johansen,
Paul Moore, James Morris, Serge E. Hallyn, Mimi Zohar,
Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25
In-Reply-To: <20260226-iino-u64-v1-50-ccceff366db9@kernel.org>
On 2/27/26 00:55, Jeff Layton wrote:
> Update format strings and local variable types in zonefs for the
> i_ino type change from unsigned long to u64.
>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
Acked-by: Damien Le Moal <dlemoal@kernel.org>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply
* Re: [LSF/MM/BPF TOPIC][RFC PATCH v4 00/27] Private Memory Nodes (w/ Compressed RAM)
From: Gregory Price @ 2026-02-26 22:49 UTC (permalink / raw)
To: Alistair Popple
Cc: lsf-pc, linux-kernel, linux-cxl, cgroups, linux-mm,
linux-trace-kernel, damon, kernel-team, gregkh, rafael, dakr,
dave, jonathan.cameron, dave.jiang, alison.schofield,
vishal.l.verma, ira.weiny, dan.j.williams, longman, akpm, david,
lorenzo.stoakes, Liam.Howlett, vbabka, rppt, surenb, mhocko,
osalvador, ziy, matthew.brost, joshua.hahnjy, rakie.kim,
byungchul, ying.huang, axelrasmussen, yuanchu, weixugc,
yury.norov, linux, mhiramat, mathieu.desnoyers, tj, hannes,
mkoutny, jackmanb, sj, baolin.wang, npache, ryan.roberts,
dev.jain, baohua, lance.yang, muchun.song, xu.xin16,
chengming.zhou, jannh, linmiaohe, nao.horiguchi, pfalcato,
rientjes, shakeel.butt, riel, harry.yoo, cl, roman.gushchin,
chrisl, kasong, shikemeng, nphamcs, bhe, zhengqi.arch,
terry.bowman
In-Reply-To: <aZ_gALm7aE3d4IcP@gourry-fedora-PF4VCD3F>
On Thu, Feb 26, 2026 at 12:54:08AM -0500, Gregory Price wrote:
> On Thu, Feb 26, 2026 at 02:27:24PM +1100, Alistair Popple wrote:
>
> > > If NUMA is the interface we want, then NODE_DATA is the right direction
> > > regardless of struct page's future or what zone it lives in.
> > >
> > > There's no reason to keep per-page pgmap w/ device-to-node mappings.
> >
> > In reality I suspect that's already the case today. I'm not sure we need
> > per-page pgmap.
> >
>
> Probably, and maybe there's a good argument for stealing 80-90% of the
> common surface here, shunting ZONE_DEVICE to use this instead of pgmap
> before we go all the way to private nodes.
>
Out of curiosity i went digging through existing users, and it seems
like the average driver has 1-8 discrete pgmaps, with Nouveau being an
outliar that does ad-hoc registering in 256MB chunks, with the relevant
annoyance being the percpu_ref it uses to track lifetime of the pgmap,
and the fact that they can be non-contiguous.
tl;dr here: a 1-to-1 mapping of node-to-pgmap isn't realistic for most
existing ZONE_DEVICE users, meaning a 1-op lookup (page->pgmap) turns
into a multi-op pointer chase on and range comparison.
Not sure that turns out well for anyone (only on ZONE_DEVICE / managed
node users, all traditional nodes still have a simple pgdat or page->flag
lookup to check membership).
There's an argument for trying to do this just for the sake of getting
pgmap out of struct page/folio, but this only deals with the problem on
NUMA systems.
For non-numa systems the pgmap still probably ends up in folio_ext
(assuming we get there), but even that might not be sufficient get LRU
back. Might need Willy's opinion here.
~Gregory
^ permalink raw reply
* Re: [PATCH 03/61] trace: update VFS-layer trace events for u64 i_ino
From: Damien Le Moal @ 2026-02-26 22:51 UTC (permalink / raw)
To: Jeff Layton, Alexander Viro, Christian Brauner, Jan Kara,
Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers, Dan Williams,
Matthew Wilcox, Eric Biggers, Theodore Y. Ts'o, Muchun Song,
Oscar Salvador, David Hildenbrand, David Howells, Paulo Alcantara,
Andreas Dilger, Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust,
Anna Schumaker, Chuck Lever, NeilBrown, Olga Kornievskaia,
Dai Ngo, Tom Talpey, Steve French, Ronnie Sahlberg,
Shyam Prasad N, Bharath SM, Alexander Aring, Ryusuke Konishi,
Viacheslav Dubeyko, Eric Van Hensbergen, Latchesar Ionkov,
Dominique Martinet, Christian Schoenebeck, David Sterba,
Marc Dionne, Ian Kent, Luis de Bethencourt, Salah Triki,
Tigran A. Aivazian, Ilya Dryomov, Alex Markuze, Jan Harkes, coda,
Nicolas Pitre, Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Naohiro Aota, Johannes Thumshirn, John Johansen,
Paul Moore, James Morris, Serge E. Hallyn, Mimi Zohar,
Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25
In-Reply-To: <20260226-iino-u64-v1-3-ccceff366db9@kernel.org>
On 2/27/26 00:55, Jeff Layton wrote:
> Update trace event definitions in VFS-layer trace headers to use u64
> instead of ino_t/unsigned long for inode number fields, and change
> format strings from %lu/%lx to %llu/%llx to match.
>
> This is needed because i_ino is now u64. Changing trace event field
> types changes the binary trace format, but the self-describing format
> metadata handles this transparently for modern trace-cmd and perf.
>
> Files updated:
> - cachefiles.h, filelock.h, filemap.h, fs_dax.h, fsverity.h,
> hugetlbfs.h, netfs.h, readahead.h, timestamp.h, writeback.h
>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
[...]
> @@ -726,7 +726,7 @@ TRACE_EVENT(balance_dirty_pages,
> __entry->pause, /* ms */
> __entry->period, /* ms */
> __entry->think, /* ms */
> - (unsigned long)__entry->cgroup_ino
> + (unsigned long long)__entry->cgroup_ino
Do we really need this cast here ? (same comment for the following events).
Other than this, this looks OK to me.
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply
* Re: [PATCH 01/61] vfs: widen inode hash/lookup functions to u64
From: Damien Le Moal @ 2026-02-26 22:56 UTC (permalink / raw)
To: Jeff Layton, Alexander Viro, Christian Brauner, Jan Kara,
Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers, Dan Williams,
Matthew Wilcox, Eric Biggers, Theodore Y. Ts'o, Muchun Song,
Oscar Salvador, David Hildenbrand, David Howells, Paulo Alcantara,
Andreas Dilger, Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust,
Anna Schumaker, Chuck Lever, NeilBrown, Olga Kornievskaia,
Dai Ngo, Tom Talpey, Steve French, Ronnie Sahlberg,
Shyam Prasad N, Bharath SM, Alexander Aring, Ryusuke Konishi,
Viacheslav Dubeyko, Eric Van Hensbergen, Latchesar Ionkov,
Dominique Martinet, Christian Schoenebeck, David Sterba,
Marc Dionne, Ian Kent, Luis de Bethencourt, Salah Triki,
Tigran A. Aivazian, Ilya Dryomov, Alex Markuze, Jan Harkes, coda,
Nicolas Pitre, Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Naohiro Aota, Johannes Thumshirn, John Johansen,
Paul Moore, James Morris, Serge E. Hallyn, Mimi Zohar,
Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25
In-Reply-To: <20260226-iino-u64-v1-1-ccceff366db9@kernel.org>
On 2/27/26 00:55, Jeff Layton wrote:
> Change the inode hash/lookup VFS API functions to accept u64 parameters
> instead of unsigned long for inode numbers and hash values. This is
> preparation for widening i_ino itself to u64, which will allow
> filesystems to store full 64-bit inode numbers on 32-bit architectures.
>
> Since unsigned long implicitly widens to u64 on all architectures, this
> change is backward-compatible with all existing callers.
>
> Functions updated:
> - hash(), find_inode_fast(), find_inode_by_ino_rcu(), test_inode_iunique()
> - __insert_inode_hash(), iget_locked(), iget5_locked(), iget5_locked_rcu()
> - ilookup(), ilookup5(), ilookup5_nowait()
> - find_inode_nowait(), find_inode_rcu()
> - inode_insert5(), insert_inode_locked4()
> - insert_inode_locked() (local variable)
> - dump_mapping() (local variable and format string)
>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
[...]
> -int insert_inode_locked4(struct inode *inode, unsigned long hashval,
> +int insert_inode_locked4(struct inode *inode, u64 hashval,
> int (*test)(struct inode *, void *), void *data)
> {
> struct inode *old;
> @@ -2642,7 +2642,7 @@ void init_special_inode(struct inode *inode, umode_t mode, dev_t rdev)
> break;
> default:
> printk(KERN_DEBUG "init_special_inode: bogus i_mode (%o) for"
> - " inode %s:%lu\n", mode, inode->i_sb->s_id,
> + " inode %s:%llu\n", mode, inode->i_sb->s_id,
Hmmm. the type of ino in struct inode is changed in patch 2, not this patch. So
this feels incorrect. Why not just squash patch 2 in here ?
While at it, maybe you could change this to use pr_debug() too ?
--
Damien Le Moal
Western Digital Research
^ permalink raw reply
* Re: [PATCH v3 4/5] mm: rename zone->lock to zone->_lock
From: kernel test robot @ 2026-02-26 23:13 UTC (permalink / raw)
To: Dmitry Ilvokhin, Andrew Morton, David Hildenbrand,
Lorenzo Stoakes, Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Axel Rasmussen, Yuanchu Xie,
Wei Xu, Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
Brendan Jackman, Johannes Weiner, Zi Yan, Oscar Salvador,
Qi Zheng, Shakeel Butt
Cc: oe-kbuild-all, Linux Memory Management List, linux-kernel,
linux-trace-kernel, linux-cxl, kernel-team, Benjamin Cheatham,
Dmitry Ilvokhin
In-Reply-To: <1221b8e7fa9f5694f3c4e411f01581b5aba9bc63.1772129168.git.d@ilvokhin.com>
Hi Dmitry,
kernel test robot noticed the following build errors:
[auto build test ERROR on linus/master]
[also build test ERROR on v7.0-rc1 next-20260226]
[cannot apply to akpm-mm/mm-everything rppt-memblock/for-next rppt-memblock/fixes]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Dmitry-Ilvokhin/mm-introduce-zone-lock-wrappers/20260227-022914
base: linus/master
patch link: https://lore.kernel.org/r/1221b8e7fa9f5694f3c4e411f01581b5aba9bc63.1772129168.git.d%40ilvokhin.com
patch subject: [PATCH v3 4/5] mm: rename zone->lock to zone->_lock
config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20260227/202602270740.0RL1uwsV-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260227/202602270740.0RL1uwsV-lkp@intel.com/reproduce)
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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602270740.0RL1uwsV-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from include/linux/sched.h:37,
from include/linux/percpu.h:12,
from arch/x86/include/asm/msr.h:16,
from arch/x86/include/asm/tsc.h:11,
from arch/x86/include/asm/timex.h:6,
from include/linux/timex.h:67,
from include/linux/time32.h:13,
from include/linux/time.h:60,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from kernel/power/snapshot.c:14:
kernel/power/snapshot.c: In function 'mark_free_pages':
>> kernel/power/snapshot.c:1254:34: error: 'struct zone' has no member named 'lock'; did you mean '_lock'?
1254 | spin_lock_irqsave(&zone->lock, flags);
| ^~~~
include/linux/spinlock.h:244:48: note: in definition of macro 'raw_spin_lock_irqsave'
244 | flags = _raw_spin_lock_irqsave(lock); \
| ^~~~
kernel/power/snapshot.c:1254:9: note: in expansion of macro 'spin_lock_irqsave'
1254 | spin_lock_irqsave(&zone->lock, flags);
| ^~~~~~~~~~~~~~~~~
kernel/power/snapshot.c:1287:39: error: 'struct zone' has no member named 'lock'; did you mean '_lock'?
1287 | spin_unlock_irqrestore(&zone->lock, flags);
| ^~~~
| _lock
vim +1254 kernel/power/snapshot.c
31a1b9d7fe768d Kefeng Wang 2023-05-16 1243
31a1b9d7fe768d Kefeng Wang 2023-05-16 1244 static void mark_free_pages(struct zone *zone)
31a1b9d7fe768d Kefeng Wang 2023-05-16 1245 {
31a1b9d7fe768d Kefeng Wang 2023-05-16 1246 unsigned long pfn, max_zone_pfn, page_count = WD_PAGE_COUNT;
31a1b9d7fe768d Kefeng Wang 2023-05-16 1247 unsigned long flags;
31a1b9d7fe768d Kefeng Wang 2023-05-16 1248 unsigned int order, t;
31a1b9d7fe768d Kefeng Wang 2023-05-16 1249 struct page *page;
31a1b9d7fe768d Kefeng Wang 2023-05-16 1250
31a1b9d7fe768d Kefeng Wang 2023-05-16 1251 if (zone_is_empty(zone))
31a1b9d7fe768d Kefeng Wang 2023-05-16 1252 return;
31a1b9d7fe768d Kefeng Wang 2023-05-16 1253
31a1b9d7fe768d Kefeng Wang 2023-05-16 @1254 spin_lock_irqsave(&zone->lock, flags);
31a1b9d7fe768d Kefeng Wang 2023-05-16 1255
31a1b9d7fe768d Kefeng Wang 2023-05-16 1256 max_zone_pfn = zone_end_pfn(zone);
312eca8a14c5f5 David Woodhouse 2025-04-23 1257 for_each_valid_pfn(pfn, zone->zone_start_pfn, max_zone_pfn) {
31a1b9d7fe768d Kefeng Wang 2023-05-16 1258 page = pfn_to_page(pfn);
31a1b9d7fe768d Kefeng Wang 2023-05-16 1259
31a1b9d7fe768d Kefeng Wang 2023-05-16 1260 if (!--page_count) {
31a1b9d7fe768d Kefeng Wang 2023-05-16 1261 touch_nmi_watchdog();
31a1b9d7fe768d Kefeng Wang 2023-05-16 1262 page_count = WD_PAGE_COUNT;
31a1b9d7fe768d Kefeng Wang 2023-05-16 1263 }
31a1b9d7fe768d Kefeng Wang 2023-05-16 1264
31a1b9d7fe768d Kefeng Wang 2023-05-16 1265 if (page_zone(page) != zone)
31a1b9d7fe768d Kefeng Wang 2023-05-16 1266 continue;
31a1b9d7fe768d Kefeng Wang 2023-05-16 1267
31a1b9d7fe768d Kefeng Wang 2023-05-16 1268 if (!swsusp_page_is_forbidden(page))
31a1b9d7fe768d Kefeng Wang 2023-05-16 1269 swsusp_unset_page_free(page);
31a1b9d7fe768d Kefeng Wang 2023-05-16 1270 }
31a1b9d7fe768d Kefeng Wang 2023-05-16 1271
31a1b9d7fe768d Kefeng Wang 2023-05-16 1272 for_each_migratetype_order(order, t) {
31a1b9d7fe768d Kefeng Wang 2023-05-16 1273 list_for_each_entry(page,
31a1b9d7fe768d Kefeng Wang 2023-05-16 1274 &zone->free_area[order].free_list[t], buddy_list) {
31a1b9d7fe768d Kefeng Wang 2023-05-16 1275 unsigned long i;
31a1b9d7fe768d Kefeng Wang 2023-05-16 1276
31a1b9d7fe768d Kefeng Wang 2023-05-16 1277 pfn = page_to_pfn(page);
31a1b9d7fe768d Kefeng Wang 2023-05-16 1278 for (i = 0; i < (1UL << order); i++) {
31a1b9d7fe768d Kefeng Wang 2023-05-16 1279 if (!--page_count) {
31a1b9d7fe768d Kefeng Wang 2023-05-16 1280 touch_nmi_watchdog();
31a1b9d7fe768d Kefeng Wang 2023-05-16 1281 page_count = WD_PAGE_COUNT;
31a1b9d7fe768d Kefeng Wang 2023-05-16 1282 }
31a1b9d7fe768d Kefeng Wang 2023-05-16 1283 swsusp_set_page_free(pfn_to_page(pfn + i));
31a1b9d7fe768d Kefeng Wang 2023-05-16 1284 }
31a1b9d7fe768d Kefeng Wang 2023-05-16 1285 }
31a1b9d7fe768d Kefeng Wang 2023-05-16 1286 }
31a1b9d7fe768d Kefeng Wang 2023-05-16 1287 spin_unlock_irqrestore(&zone->lock, flags);
31a1b9d7fe768d Kefeng Wang 2023-05-16 1288 }
31a1b9d7fe768d Kefeng Wang 2023-05-16 1289
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply
* Re: [PATCH v4 3/3] ring-buffer: Skip invalid sub-buffers when validating persistent ring buffer
From: Masami Hiramatsu @ 2026-02-26 23:29 UTC (permalink / raw)
To: Steven Rostedt; +Cc: Mathieu Desnoyers, linux-kernel, linux-trace-kernel
In-Reply-To: <20260226123655.4d2ca691@gandalf.local.home>
On Thu, 26 Feb 2026 12:36:55 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:
> On Thu, 26 Feb 2026 21:58:33 +0900
> Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
>
> > > --- a/kernel/trace/ring_buffer.c
> > > +++ b/kernel/trace/ring_buffer.c
> > > @@ -2058,17 +2058,18 @@ static void rb_meta_validate_events(struct ring_buffer_per_cpu *cpu_buffer)
> > > if (ret < 0) {
> > > pr_info("Ring buffer meta [%d] invalid buffer page\n",
> > > cpu_buffer->cpu);
> >
> > This pr_info() should be removed too, because multiple pages
> > can be discarded.
>
> I wouldn't discard it, but instead add a "once" variable, where it shows it
> only once per CPU.
OK, let me update it.
Thanks!
>
> -- Steve
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
^ permalink raw reply
* Re: [PATCH v3 1/5] mm: introduce zone lock wrappers
From: SeongJae Park @ 2026-02-27 0:31 UTC (permalink / raw)
To: Dmitry Ilvokhin
Cc: SeongJae Park, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Axel Rasmussen, Yuanchu Xie,
Wei Xu, Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
Brendan Jackman, Johannes Weiner, Zi Yan, Oscar Salvador,
Qi Zheng, Shakeel Butt, linux-kernel, linux-mm,
linux-trace-kernel, linux-cxl, kernel-team, Benjamin Cheatham
In-Reply-To: <5bcc39cd3a227944d0fbe75ff86cdac92b38d4ca.1772129168.git.d@ilvokhin.com>
On Thu, 26 Feb 2026 18:26:18 +0000 Dmitry Ilvokhin <d@ilvokhin.com> wrote:
> Add thin wrappers around zone lock acquire/release operations. This
> prepares the code for future tracepoint instrumentation without
> modifying individual call sites.
>
> Centralizing zone lock operations behind wrappers allows future
> instrumentation or debugging hooks to be added without touching
> all users.
>
> No functional change intended. The wrappers are introduced in
> preparation for subsequent patches and are not yet used.
>
> Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
> Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
> ---
> MAINTAINERS | 1 +
> include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++
> 2 files changed, 39 insertions(+)
> create mode 100644 include/linux/zone_lock.h
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 55af015174a5..61e3d1f5bf43 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h
> F: include/linux/ptdump.h
> F: include/linux/vmpressure.h
> F: include/linux/vmstat.h
> +F: include/linux/zone_lock.h
> F: kernel/fork.c
> F: mm/Kconfig
> F: mm/debug.c
> diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h
> new file mode 100644
> index 000000000000..c531e26280e6
> --- /dev/null
> +++ b/include/linux/zone_lock.h
> @@ -0,0 +1,38 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _LINUX_ZONE_LOCK_H
> +#define _LINUX_ZONE_LOCK_H
> +
> +#include <linux/mmzone.h>
> +#include <linux/spinlock.h>
I'm bit worried if I will think this as a file for another general locking, not
the mm specific one. I hence think renaming it to more clearly saying the
fact, say, mmzone_lock.h, might be less confusing. Or, putting things in
mmzone.h might also be an option? What do you think?
Thanks,
SJ
[...]
^ permalink raw reply
* Re: [PATCH v3 1/5] mm: introduce zone lock wrappers
From: SeongJae Park @ 2026-02-27 0:38 UTC (permalink / raw)
To: Dmitry Ilvokhin
Cc: SeongJae Park, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Axel Rasmussen, Yuanchu Xie,
Wei Xu, Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
Brendan Jackman, Johannes Weiner, Zi Yan, Oscar Salvador,
Qi Zheng, Shakeel Butt, linux-kernel, linux-mm,
linux-trace-kernel, linux-cxl, kernel-team, Benjamin Cheatham
In-Reply-To: <5bcc39cd3a227944d0fbe75ff86cdac92b38d4ca.1772129168.git.d@ilvokhin.com>
I should sent this together with the previous reply, but I forgot as usual,
sorry.
On Thu, 26 Feb 2026 18:26:18 +0000 Dmitry Ilvokhin <d@ilvokhin.com> wrote:
> Add thin wrappers around zone lock acquire/release operations. This
> prepares the code for future tracepoint instrumentation without
> modifying individual call sites.
>
> Centralizing zone lock operations behind wrappers allows future
> instrumentation or debugging hooks to be added without touching
> all users.
>
> No functional change intended. The wrappers are introduced in
> preparation for subsequent patches and are not yet used.
>
> Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
> Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
> ---
[...]
> --- /dev/null
> +++ b/include/linux/zone_lock.h
> @@ -0,0 +1,38 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _LINUX_ZONE_LOCK_H
> +#define _LINUX_ZONE_LOCK_H
> +
> +#include <linux/mmzone.h>
> +#include <linux/spinlock.h>
> +
> +static inline void zone_lock_init(struct zone *zone)
> +{
> + spin_lock_init(&zone->lock);
> +}
> +
> +#define zone_lock_irqsave(zone, flags) \
> +do { \
> + spin_lock_irqsave(&(zone)->lock, flags); \
> +} while (0)
checkpatch.pl complains as below. Should be ok to ignore, but, may better to
kindly make it silence?
WARNING: Single statement macros should not use a do {} while (0) loop
#116: FILE: include/linux/zone_lock.h:13:
+#define zone_lock_irqsave(zone, flags) \
+do { \
+ spin_lock_irqsave(&(zone)->lock, flags); \
+} while (0)
Thanks,
SJ
[...]
^ permalink raw reply
* Re: [PATCH v3 2/5] mm: convert zone lock users to wrappers
From: SeongJae Park @ 2026-02-27 0:40 UTC (permalink / raw)
To: Dmitry Ilvokhin
Cc: SeongJae Park, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Axel Rasmussen, Yuanchu Xie,
Wei Xu, Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
Brendan Jackman, Johannes Weiner, Zi Yan, Oscar Salvador,
Qi Zheng, Shakeel Butt, linux-kernel, linux-mm,
linux-trace-kernel, linux-cxl, kernel-team, Benjamin Cheatham
In-Reply-To: <e5324d64361f86d930d940a5b49235f7996efe53.1772129168.git.d@ilvokhin.com>
On Thu, 26 Feb 2026 18:26:19 +0000 Dmitry Ilvokhin <d@ilvokhin.com> wrote:
> Replace direct zone lock acquire/release operations with the
> newly introduced wrappers.
>
> The changes are purely mechanical substitutions. No functional change
> intended. Locking semantics and ordering remain unchanged.
>
> The compaction path is left unchanged for now and will be
> handled separately in the following patch due to additional
> non-trivial modifications.
>
> Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
> Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Reviewed-by: SeongJae Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply
* Re: [PATCH v3 3/5] mm: convert compaction to zone lock wrappers
From: SeongJae Park @ 2026-02-27 0:45 UTC (permalink / raw)
To: Dmitry Ilvokhin
Cc: SeongJae Park, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Axel Rasmussen, Yuanchu Xie,
Wei Xu, Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
Brendan Jackman, Johannes Weiner, Zi Yan, Oscar Salvador,
Qi Zheng, Shakeel Butt, linux-kernel, linux-mm,
linux-trace-kernel, linux-cxl, kernel-team, Benjamin Cheatham
In-Reply-To: <01729baf359e4c6612aead53f1fcb644f782d1de.1772129168.git.d@ilvokhin.com>
On Thu, 26 Feb 2026 18:26:20 +0000 Dmitry Ilvokhin <d@ilvokhin.com> wrote:
> Compaction uses compact_lock_irqsave(), which currently operates
> on a raw spinlock_t pointer so it can be used for both zone->lock
> and lruvec->lru_lock. Since zone lock operations are now wrapped,
> compact_lock_irqsave() can no longer directly operate on a
> spinlock_t when the lock belongs to a zone.
>
> Split the helper into compact_zone_lock_irqsave() and
> compact_lruvec_lock_irqsave(), duplicating the small amount of
> shared logic. As there are only two call sites and both statically
> know the lock type, this avoids introducing additional abstraction
> or runtime dispatch in the compaction path.
>
> No functional change intended.
>
> Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
> ---
> mm/compaction.c | 33 ++++++++++++++++++++++++---------
> 1 file changed, 24 insertions(+), 9 deletions(-)
>
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 47b26187a5df..9f7997e827bd 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -503,19 +503,36 @@ static bool test_and_set_skip(struct compact_control *cc, struct page *page)
> *
> * Always returns true which makes it easier to track lock state in callers.
> */
> -static bool compact_lock_irqsave(spinlock_t *lock, unsigned long *flags,
> - struct compact_control *cc)
> - __acquires(lock)
> +static bool compact_zone_lock_irqsave(struct zone *zone,
> + unsigned long *flags,
> + struct compact_control *cc)
> +__acquires(&zone->lock)
Nit. Why don't you keep the indentation?
My impression based on below output is that mm code prefer indenting
__acquires().
$ git grep __acquires mm
mm/compaction.c:__acquires(&zone->_lock)
mm/compaction.c:__acquires(&lruvec->lru_lock)
mm/khugepaged.c: __acquires(&khugepaged_mm_lock)
mm/userfaultfd.c: __acquires(ptl1)
mm/userfaultfd.c: __acquires(ptl2)
Thanks,
SJ
[...]
^ permalink raw reply
* Re: [PATCH v3 4/5] mm: rename zone->lock to zone->_lock
From: SeongJae Park @ 2026-02-27 0:49 UTC (permalink / raw)
To: Dmitry Ilvokhin
Cc: SeongJae Park, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Axel Rasmussen, Yuanchu Xie,
Wei Xu, Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
Brendan Jackman, Johannes Weiner, Zi Yan, Oscar Salvador,
Qi Zheng, Shakeel Butt, linux-kernel, linux-mm,
linux-trace-kernel, linux-cxl, kernel-team, Benjamin Cheatham
In-Reply-To: <1221b8e7fa9f5694f3c4e411f01581b5aba9bc63.1772129168.git.d@ilvokhin.com>
On Thu, 26 Feb 2026 18:26:21 +0000 Dmitry Ilvokhin <d@ilvokhin.com> wrote:
> This intentionally breaks direct users of zone->lock at compile time so
> all call sites are converted to the zone lock wrappers. Without the
> rename, present and future out-of-tree code could continue using
> spin_lock(&zone->lock) and bypass the wrappers and tracing
> infrastructure.
>
> No functional change intended.
>
> Suggested-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
Acked-by: SeongJae Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply
* Re: [PATCH v3 1/5] mm: introduce zone lock wrappers
From: Steven Rostedt @ 2026-02-27 0:53 UTC (permalink / raw)
To: SeongJae Park
Cc: Dmitry Ilvokhin, Andrew Morton, David Hildenbrand,
Lorenzo Stoakes, Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Axel Rasmussen, Yuanchu Xie,
Wei Xu, Masami Hiramatsu, Mathieu Desnoyers, Brendan Jackman,
Johannes Weiner, Zi Yan, Oscar Salvador, Qi Zheng, Shakeel Butt,
linux-kernel, linux-mm, linux-trace-kernel, linux-cxl,
kernel-team, Benjamin Cheatham
In-Reply-To: <20260227003856.83271-1-sj@kernel.org>
On Thu, 26 Feb 2026 16:38:55 -0800
SeongJae Park <sj@kernel.org> wrote:
> checkpatch.pl complains as below. Should be ok to ignore, but, may better to
> kindly make it silence?
>
> WARNING: Single statement macros should not use a do {} while (0) loop
Hmm, why is this an issue?
> #116: FILE: include/linux/zone_lock.h:13:
> +#define zone_lock_irqsave(zone, flags) \
> +do { \
> + spin_lock_irqsave(&(zone)->lock, flags); \
> +} while (0)
>
I know this is checkpatch and not you complaining about it, but I really
think it's a useless complaint. I can see it better as a do { } while (0)
because it is creating a "function" like feature but can't be inline due to
flags.
This is one of the reasons I still never use checkpatch.pl :-(
-- Steve
^ permalink raw reply
* Re: [PATCH v3 1/5] mm: introduce zone lock wrappers
From: SeongJae Park @ 2026-02-27 1:01 UTC (permalink / raw)
To: Steven Rostedt
Cc: SeongJae Park, Dmitry Ilvokhin, Andrew Morton, David Hildenbrand,
Lorenzo Stoakes, Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Axel Rasmussen, Yuanchu Xie,
Wei Xu, Masami Hiramatsu, Mathieu Desnoyers, Brendan Jackman,
Johannes Weiner, Zi Yan, Oscar Salvador, Qi Zheng, Shakeel Butt,
linux-kernel, linux-mm, linux-trace-kernel, linux-cxl,
kernel-team, Benjamin Cheatham
In-Reply-To: <20260226195355.611ec7f3@gandalf.local.home>
On Thu, 26 Feb 2026 19:53:55 -0500 Steven Rostedt <rostedt@goodmis.org> wrote:
> On Thu, 26 Feb 2026 16:38:55 -0800
> SeongJae Park <sj@kernel.org> wrote:
>
> > checkpatch.pl complains as below. Should be ok to ignore, but, may better to
> > kindly make it silence?
> >
> > WARNING: Single statement macros should not use a do {} while (0) loop
>
> Hmm, why is this an issue?
>
> > #116: FILE: include/linux/zone_lock.h:13:
> > +#define zone_lock_irqsave(zone, flags) \
> > +do { \
> > + spin_lock_irqsave(&(zone)->lock, flags); \
> > +} while (0)
> >
>
> I know this is checkpatch and not you complaining about it, but I really
> think it's a useless complaint. I can see it better as a do { } while (0)
> because it is creating a "function" like feature but can't be inline due to
> flags.
>
> This is one of the reasons I still never use checkpatch.pl :-(
Makes sense to me, thank you Steve :)
Thanks,
SJ
[...]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox