[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250917104859-6d38cb60-b638-4e5f-bf67-22683a441ae6@linutronix.de>
Date: Wed, 17 Sep 2025 10:52:35 +0200
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Krzysztof Wilczyński <kw@...ux.com>
Cc: Keith Busch <kbusch@...nel.org>, Bjorn Helgaas <helgaas@...nel.org>,
Matthew Wood <thepacketgeek@...il.com>, Bjorn Helgaas <bhelgaas@...gle.com>,
Mario Limonciello <superm1@...nel.org>, Jonathan Cameron <Jonathan.Cameron@...wei.com>,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Subject: Re: [RESEND PATCH v7 1/1] PCI/sysfs: Expose PCIe device serial number
On Wed, Sep 17, 2025 at 05:34:22PM +0900, Krzysztof Wilczyński wrote:
(...)
> > It's a waste of resources to provide a handle just to say the capability
> > doesn't exist when the handle could just not exist instead.
>
> I haven't checked how the kernfs side looks like, admittedly, but I think
> whether an attribute is visible or not, it does not unload and/or de-allocate
> any space for the accompanying kernfs object... So, the resources saving
> here might not be in any way significant.
If I read the sysfs code correctly (create_files() in fs/sysfs/group.c),
the kernfs node should not even be allocated for invisible files.
Thomas
Powered by blists - more mailing lists