public inbox for linux-coco@lists.linux.dev
 help / color / mirror / Atom feed
From: <dan.j.williams@intel.com>
To: Xu Yilun <yilun.xu@linux.intel.com>, <dan.j.williams@intel.com>
Cc: <linux-coco@lists.linux.dev>, <linux-pci@vger.kernel.org>,
	<yilun.xu@intel.com>, <baolu.lu@linux.intel.com>,
	<zhenzhong.duan@intel.com>, <linux-kernel@vger.kernel.org>,
	<yi1.lai@intel.com>, <helgaas@kernel.org>
Subject: Re: [PATCH v2] PCI/IDE: Fix duplicate stream symlink names for TSM class devices
Date: Thu, 22 Jan 2026 21:07:49 -0800	[thread overview]
Message-ID: <6973022580c68_309510049@dwillia2-mobl4.notmuch> (raw)
In-Reply-To: <aXLtILY85oMU5qlb@yilunxu-OptiPlex-7050>

Xu Yilun wrote:
> On Thu, Jan 22, 2026 at 05:07:01PM -0800, dan.j.williams@intel.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.

  reply	other threads:[~2026-01-23  5:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-05  9:35 [PATCH v2] PCI/IDE: Fix duplicate stream symlink names for TSM class devices Xu Yilun
2026-01-05 10:13 ` Jonathan Cameron
2026-01-06  1:59   ` Xu Yilun
2026-01-23  1:01 ` dan.j.williams
2026-01-23  1:07   ` dan.j.williams
2026-01-23  3:38     ` Xu Yilun
2026-01-23  5:07       ` dan.j.williams [this message]
2026-01-23  6:40   ` Xu Yilun

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=6973022580c68_309510049@dwillia2-mobl4.notmuch \
    --to=dan.j.williams@intel.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=helgaas@kernel.org \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=yi1.lai@intel.com \
    --cc=yilun.xu@intel.com \
    --cc=yilun.xu@linux.intel.com \
    --cc=zhenzhong.duan@intel.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