Linux filesystem development
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Jori Koolstra <jkoolstra@xs4all.nl>
Cc: Shakeel Butt <shakeel.butt@linux.dev>,
	Christian Brauner <brauner@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ian Kent <raven@themaw.net>,
	"T . J . Mercier" <tjmercier@google.com>,
	Meta kernel team <kernel-team@meta.com>,
	linux-fsdevel@vger.kernel.org, driver-core@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/6] kernfs: update a directory's times without kernfs_iattr_rwsem
Date: Thu, 03 Dec 2026 06:56:17 -1000	[thread overview]
Message-ID: <7479fc1c26c1ebd4e1e3934a475e7910@kernel.org> (raw)
In-Reply-To: <771874345.3709540.1796308167142@kpc.webmail.kpnmail.nl>

Hello, Jori.

On Thu, Dec 03, 2026 at 03:29:27PM +0100, Jori Koolstra wrote:
> I know this is not a change in behavior, but what is the reason we start
> to care about the a/c/mtime only after we have done a setattr. I understand
> that kernfs wants to be very stingy on memory use, but why not leave it out
> all together then? Is there anything that needs those times only when the
> attrs are not default?

I think it's historic. sysfs started out with a full inode for each node
and then got whittled down to sysfs_dirent, now kernfs_node, which is a lot
smaller. The separate iattrs allocation was a way to keep the behavior
unchanged as much as possible.

I don't know what the ramifications would be if we dropped the times and
showed e.g. the current time. Probably not much and maybe we should
experiment and find out, but these things can become subtle. If it isn't too
much trouble, carrying the behavior forward might be less friction.

Thanks.

--
tejun

  reply	other threads:[~2026-12-03 16:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 22:01 [PATCH 0/6] kernfs: stop taking kernfs_iattr_rwsem for writing in mkdir/rmdir Shakeel Butt
2026-11-18 22:01 ` [PATCH 1/6] kernfs: report times and link count from the node in getattr Shakeel Butt
2026-12-02 16:55   ` Jori Koolstra
2026-11-18 22:01 ` [PATCH 2/6] kernfs: don't copy times and link count into the inode on refresh Shakeel Butt
2026-12-02 17:02   ` Jori Koolstra
2026-11-18 22:01 ` [PATCH 3/6] kernfs: don't take kernfs_iattr_rwsem for the directory counters Shakeel Butt
2026-12-02 17:03   ` Jori Koolstra
2026-11-18 22:01 ` [PATCH 4/6] kernfs: don't take kernfs_iattr_rwsem to publish KERNFS_REMOVING Shakeel Butt
2026-11-20 18:57   ` T.J. Mercier
2026-12-02 17:03   ` Jori Koolstra
2026-11-18 22:01 ` [PATCH 5/6] kernfs: update a directory's times without kernfs_iattr_rwsem Shakeel Butt
2026-12-03 14:29   ` Jori Koolstra
2026-12-03 16:56     ` Tejun Heo [this message]
2026-11-18 22:01 ` [PATCH 6/6] kernfs: don't take kernfs_iattr_rwsem in __kernfs_remove() Shakeel Butt
2026-11-20 11:31 ` [PATCH 0/6] kernfs: stop taking kernfs_iattr_rwsem for writing in mkdir/rmdir Tejun Heo
2026-11-20 18:57 ` T.J. Mercier
2026-11-20 20:42 ` Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7479fc1c26c1ebd4e1e3934a475e7910@kernel.org \
    --to=tj@kernel.org \
    --cc=brauner@kernel.org \
    --cc=driver-core@lists.linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=jkoolstra@xs4all.nl \
    --cc=kernel-team@meta.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=raven@themaw.net \
    --cc=shakeel.butt@linux.dev \
    --cc=tjmercier@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox