[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6973022580c68_309510049@dwillia2-mobl4.notmuch>
Date: Thu, 22 Jan 2026 21:07:49 -0800
From: <dan.j.williams@...el.com>
To: Xu Yilun <yilun.xu@...ux.intel.com>, <dan.j.williams@...el.com>
CC: <linux-coco@...ts.linux.dev>, <linux-pci@...r.kernel.org>,
<yilun.xu@...el.com>, <baolu.lu@...ux.intel.com>, <zhenzhong.duan@...el.com>,
<linux-kernel@...r.kernel.org>, <yi1.lai@...el.com>, <helgaas@...nel.org>
Subject: Re: [PATCH v2] PCI/IDE: Fix duplicate stream symlink names for TSM
class devices
Xu Yilun wrote:
> On Thu, Jan 22, 2026 at 05:07:01PM -0800, dan.j.williams@...el.com wrote:
> > dan.j.williams@ wrote:
> > [..]
> > > However, after seeing Jonathan's feedback and noticing that he missed
> > > that 'H' 'R' and 'E' are documented in the host bridge ABI I think it
> > > would be better to simplify this to just a link back to the host bridge.
> > >
> > > /sys/class/tsm/tsmN/pciDDDD:BB => /sys/devices/pciDDDD:BB
> > >
> > > That achieves the same result and is easier to document as "When a TSM
> > > has a established any IDE stream it links to the host bridge. When the
> > > last stream is removed the link is removed." It achieves the goal of
> > > letting an admin do "ls /sys/class/tsm/tsmN/*/stream*" to get a survey
> > > of all consumed stream resources in the system.
> >
> > In fact it does not even need to be dynamic. At tsm_register() time when
> > @pci_ops is provided, link all host bridges. Unlink them at unregister
>
> I'm sort of supporting dynamic. My DUT has 40 host bridges registered,
> most of them has nothing to do with TSM/IDE, so I'm afraid if it is
> overkill to list them all, and bury the real TSM capable bridge in the
> noise.
>
> And if TSM always list all bridges then why we need these symlinks, we
> can just:
>
> ls -d /sys/devices/pci*\:*/stream*
>
>
> I assume the annoying part of dynamic is we need to refcount, which IMHO
> unnecessarily complex and you are trying to avoid, is it?
I am ok with a simple xarray of registered host bridges that gets
cleaned up when the last stream leaves.
The end goal is "ls /sys/class/tsm/tsmN/*/stream*" gives valuable signal to
the user, and yes 40 host bridges of noise should be avoided.
Powered by blists - more mailing lists