From: Jeremy Linton <jeremy.linton@arm.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Wathsala Vithanage <wathsala.vithanage@arm.com>,
linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org,
acpica-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
lenb@kernel.org, robert.moore@intel.com, bhelgaas@google.com,
wei.huang2@amd.com, honnappa.nagarahalli@arm.com,
dhruv.tripathi@arm.com, rob.herring@arm.com
Subject: Re: [RFC 0/2] GENL interface for ACPI _DSM methods
Date: Wed, 8 Jan 2025 13:59:35 -0600 [thread overview]
Message-ID: <d35924de-a560-40aa-a99d-7278009c5ff3@arm.com> (raw)
In-Reply-To: <20250107174842.GN5556@nvidia.com>
Hi,
On 1/7/25 11:48 AM, Jason Gunthorpe wrote:
> On Tue, Jan 07, 2025 at 11:37:01AM -0600, Jeremy Linton wrote:
>> Hi,
>>
>> On 1/6/25 12:01 PM, Jonathan Cameron wrote:
>>> On Mon, 6 Jan 2025 16:30:43 +0000
>>> Wathsala Vithanage <wathsala.vithanage@arm.com> wrote:
>>>
>>>> Linux v6.13-rc1 added support for PCIe TPH and direct cache injection.
>>>> As already described in the patch set[1] that introduced this feature,
>>>> the cache injection in supported hardware allows optimal utilization of
>>>> platform resources for specific requests on the PCIe bus. However, the
>>>> patch set [1] implements the functionality for usage within the kernel.
>>>> But certain user space applications, especially those whose performance
>>>> is sensitive to the latency of inbound writes as seen by a CPU core, may
>>>> benefit from using this information (E.g., the DPDK cache stashing
>>>> feature discussed in RFC [2]).
>
> There is no way for userspace to program TPH information into a PCI
> device without going through a kernel driver, and the kernel driver
> must be the exclusive owner of the steering tag configuration or chaos
> would ensue. Having a way for sysfs to override this seems very wrong
> to me, and I think you should not go in this direction.
>
> DPDK runs on VFIO or RDMA. It would natural to have an VFIO native API
> to manipulate the steering tags, and we are already discussing what
> RDMA support for steering tag would look like.
>
>>> Superficially this feels like another potential interface that could be wrapped
>>> up under appropriate fwctl. Jason, what do you think?
>
> As above, I think this very squarely belongs under the appropriate
> subsystems that are providing the kernel drivers for the device. There
> is no reasonable way to share steering tags with unrelated userspace
> through any mechanism. Basically it fails the independence test of
> fwctl.
>
>> I think this was similar to a conversation we had internally, which was
>> basically to detect the PCIe extended capability and export a 'steering'
>> entry in sysfs on each PCIe device which can take a logical cpu/cache value,
>> translate those on write to the ACPI cpu/cache id's, make the firmware call,
>> then directly update the PCIe device's capability with the result.
>
> Seems wrong, driver must do this. If the driver was already using that
> entry for something else you've just wrecked it.
Can you clarify what you mean by 'wrecked'? AFAIK a valid, if poorly
chosen, steering tag is going to be sub-optimal performance.
I'm under the impression this is a similar problem to cpu/irq/numa
affinity where the driver/subsystem should be making the choice, but the
user is provided the opportunity to override the defaults if they think
there is benefit in their environment. Again AFAIK, the whole
OS/software stashing is already well down the 'I know better than the HW
where to store this data' rabbit hole.
Thanks,
next prev parent reply other threads:[~2025-01-08 19:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-06 16:30 [RFC 0/2] GENL interface for ACPI _DSM methods Wathsala Vithanage
2025-01-06 16:30 ` [RFC PATCH 1/2] ACPI: Add support for invoking select _DSM methods from user space Wathsala Vithanage
2025-01-06 16:30 ` [RFC PATCH 2/2] PCI: Add generic netlink interface to TPH _DSM Wathsala Vithanage
2025-01-06 18:01 ` [RFC 0/2] GENL interface for ACPI _DSM methods Jonathan Cameron
2025-01-07 17:37 ` Jeremy Linton
2025-01-07 17:48 ` Jason Gunthorpe
2025-01-08 19:59 ` Jeremy Linton [this message]
2025-01-08 20:50 ` Jason Gunthorpe
2025-01-09 0:34 ` Wathsala Wathawana Vithanage
2025-01-09 13:38 ` Jason Gunthorpe
2025-01-09 13:42 ` Wathsala Wathawana Vithanage
2025-01-09 13:46 ` Jason Gunthorpe
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=d35924de-a560-40aa-a99d-7278009c5ff3@arm.com \
--to=jeremy.linton@arm.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=acpica-devel@lists.linux.dev \
--cc=bhelgaas@google.com \
--cc=dhruv.tripathi@arm.com \
--cc=honnappa.nagarahalli@arm.com \
--cc=jgg@nvidia.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=rob.herring@arm.com \
--cc=robert.moore@intel.com \
--cc=wathsala.vithanage@arm.com \
--cc=wei.huang2@amd.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