qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron via <qemu-devel@nongnu.org>
To: Vikram Sethi <vsethi@nvidia.com>
Cc: "Alex Williamson" <alex.williamson@redhat.com>,
	"Jason Gunthorpe" <jgg@nvidia.com>,
	"Ankit Agrawal" <ankita@nvidia.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Cédric Le Goater" <clg@redhat.com>,
	"shannon.zhaosl@gmail.com" <shannon.zhaosl@gmail.com>,
	"peter.maydell@linaro.org" <peter.maydell@linaro.org>,
	"ani@anisinha.ca" <ani@anisinha.ca>,
	"Aniket Agashe" <aniketa@nvidia.com>, "Neo Jia" <cjia@nvidia.com>,
	"Kirti Wankhede" <kwankhede@nvidia.com>,
	"Tarun Gupta (SW-GPU)" <targupta@nvidia.com>,
	"Andy Currid" <ACurrid@nvidia.com>,
	"qemu-arm@nongnu.org" <qemu-arm@nongnu.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"Gavin Shan" <gshan@redhat.com>,
	"ira.weiny@intel.com" <ira.weiny@intel.com>,
	"navneet.singh@intel.com" <navneet.singh@intel.com>,
	"Dave Jiang" <dave.jiang@intel.com>
Subject: Re: [PATCH v1 0/4] vfio: report NUMA nodes for device memory
Date: Thu, 28 Sep 2023 17:04:15 +0100	[thread overview]
Message-ID: <20230928170415.00005190@Huawei.com> (raw)
In-Reply-To: <BYAPR12MB33369DCC79212D6040F00560BDC2A@BYAPR12MB3336.namprd12.prod.outlook.com>

On Wed, 27 Sep 2023 15:03:09 +0000
Vikram Sethi <vsethi@nvidia.com> wrote:

> > From: Alex Williamson <alex.williamson@redhat.com>
> > Sent: Wednesday, September 27, 2023 9:25 AM
> > To: Jason Gunthorpe <jgg@nvidia.com>
> > Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>; Ankit Agrawal
> > <ankita@nvidia.com>; David Hildenbrand <david@redhat.com>; Cédric Le
> > Goater <clg@redhat.com>; shannon.zhaosl@gmail.com;
> > peter.maydell@linaro.org; ani@anisinha.ca; Aniket Agashe
> > <aniketa@nvidia.com>; Neo Jia <cjia@nvidia.com>; Kirti Wankhede
> > <kwankhede@nvidia.com>; Tarun Gupta (SW-GPU) <targupta@nvidia.com>;
> > Vikram Sethi <vsethi@nvidia.com>; Andy Currid <ACurrid@nvidia.com>;
> > qemu-arm@nongnu.org; qemu-devel@nongnu.org; Gavin Shan
> > <gshan@redhat.com>; ira.weiny@intel.com; navneet.singh@intel.com
> > Subject: Re: [PATCH v1 0/4] vfio: report NUMA nodes for device memory
> > 
> > 
> > On Wed, 27 Sep 2023 10:53:36 -0300
> > Jason Gunthorpe <jgg@nvidia.com> wrote:
> >   
> > > On Wed, Sep 27, 2023 at 12:33:18PM +0100, Jonathan Cameron wrote:
> > >  
> > > > CXL accelerators / GPUs etc are a different question but who has one
> > > > of those anyway? :)  
> > >
> > > That's exactly what I mean when I say CXL will need it too. I keep
> > > describing this current Grace & Hopper as pre-CXL HW. You can easially
> > > imagine draping CXL around it. CXL doesn't solve the problem that
> > > motivates all this hackying - Linux can't dynamically create NUMA
> > > nodes.  
> > 
> > Why is that and why aren't we pushing towards a solution of removing that
> > barrier so that we don't require the machine topology to be configured to
> > support this use case and guest OS limitations?  Thanks,
> >  
> 
> Even if Linux could create NUMA nodes dynamically for coherent CXL or CXL type devices, 
> there is additional information FW knows that the kernel doesn't. For example,
> what the distance/latency between CPU and the device NUMA node is. While CXL devices
> present a CDAT table which gives latency type attributes within the device, there would still be some
> guesswork needed in the kernel as to what the end to end latency/distance is. 
FWIW

Shouldn't be guess work needed (for light load case anyway which is what would be
in HMAT). That's what the Generic Ports were added to SRAT for. Dave Jiang has a
patch set
https://lore.kernel.org/all/168695160531.3031571.4875512229068707023.stgit@djiang5-mobl3/
to do the maths...  For CXL there is no problem fully describing the access characteristics.

> It's probably not the best outcome to just consider this generically far memory" because 
> is it further than Intersocket memory access or not matters. 
> Pre CXL devices such as for this patchset don't even have CDAT so the kernel by itself has
> no idea if this latency/distance is less than or more than inter socket memory access latency
> even.

Just because I'm feeling cheeky - you could emulate a DOE and CDAT :)?
Though I suppose you don't want to teach the guest driver about it.

> So specially for devices present at boot, FW knows this information and should provide it. 
> Similarly, QEMU should pass along this information to VMs for the best outcomes.
No problem with the argument that FW has the info and should provide it,
just on the 'how' part.

Jonathan

> 
> Thanks
> > Alex  
> 



      parent reply	other threads:[~2023-09-28 16:05 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-15  2:45 [PATCH v1 0/4] vfio: report NUMA nodes for device memory ankita
2023-09-15  2:45 ` [PATCH v1 1/4] vfio: new command line params for device memory NUMA nodes ankita
2023-09-15 14:25   ` Jonathan Cameron via
2023-09-15 14:48     ` Igor Mammedov
2023-09-22  5:44       ` Ankit Agrawal
2023-09-25 14:08       ` Jonathan Cameron via
2023-09-15  2:45 ` [PATCH v1 2/4] vfio: assign default values to node params ankita
2023-09-15  2:45 ` [PATCH v1 3/4] hw/arm/virt-acpi-build: patch guest SRAT for NUMA nodes ankita
2023-09-15 14:37   ` Jonathan Cameron via
2023-09-22  5:49     ` Ankit Agrawal
2023-09-25 13:54       ` Jonathan Cameron via
2023-09-25 14:03         ` Jason Gunthorpe
2023-09-25 14:53           ` Jonathan Cameron via
2023-09-25 16:00             ` Jason Gunthorpe
2023-09-25 17:00               ` Jonathan Cameron via
2023-09-26 14:54                 ` Ankit Agrawal
2023-09-27  7:06                   ` Ankit Agrawal
2023-09-27 11:01                   ` Jonathan Cameron via
2023-09-15 14:52   ` Igor Mammedov
2023-09-15 15:49     ` David Hildenbrand
2023-09-15  2:45 ` [PATCH v1 4/4] acpi/gpex: patch guest DSDT for dev mem information ankita
2023-09-15 15:13   ` Igor Mammedov
2023-09-27 11:42   ` Jonathan Cameron via
2023-09-15 14:19 ` [PATCH v1 0/4] vfio: report NUMA nodes for device memory Cédric Le Goater
2023-09-15 14:47   ` Alex Williamson
2023-09-15 18:34     ` David Hildenbrand
2023-09-22  8:11       ` Ankit Agrawal
2023-09-22  8:15         ` David Hildenbrand
2023-09-26 14:52           ` Ankit Agrawal
2023-09-26 16:54             ` David Hildenbrand
2023-09-26 19:14               ` Alex Williamson
2023-09-27  7:14                 ` Ankit Agrawal
2023-09-27 11:33                   ` Jonathan Cameron via
2023-09-27 13:53                     ` Jason Gunthorpe
2023-09-27 14:24                       ` Alex Williamson
2023-09-27 15:03                         ` Vikram Sethi
2023-09-27 15:42                           ` Jason Gunthorpe
2023-09-28 16:15                             ` Jonathan Cameron via
2023-09-27 16:37                           ` Alex Williamson
2023-09-28 16:29                             ` Jonathan Cameron via
2023-09-28 16:04                           ` Jonathan Cameron via [this message]

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=20230928170415.00005190@Huawei.com \
    --to=qemu-devel@nongnu.org \
    --cc=ACurrid@nvidia.com \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=alex.williamson@redhat.com \
    --cc=ani@anisinha.ca \
    --cc=aniketa@nvidia.com \
    --cc=ankita@nvidia.com \
    --cc=cjia@nvidia.com \
    --cc=clg@redhat.com \
    --cc=dave.jiang@intel.com \
    --cc=david@redhat.com \
    --cc=gshan@redhat.com \
    --cc=ira.weiny@intel.com \
    --cc=jgg@nvidia.com \
    --cc=kwankhede@nvidia.com \
    --cc=navneet.singh@intel.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=shannon.zhaosl@gmail.com \
    --cc=targupta@nvidia.com \
    --cc=vsethi@nvidia.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;
as well as URLs for NNTP newsgroup(s).