All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: "Zhuo, Qiuxu" <qiuxu.zhuo@intel.com>
Cc: "Weiny, Ira" <ira.weiny@intel.com>,
	"Williams, Dan J" <dan.j.williams@intel.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	"Gregory Price" <gregory.price@memverge.com>,
	"Li, Ming4" <ming4.li@intel.com>,
	"Verma, Vishal L" <vishal.l.verma@intel.com>,
	Lukas Wunner <lukas@wunner.de>,
	"Schofield, Alison" <alison.schofield@intel.com>,
	"linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH] PCI/DOE: Remove asynchronous task support
Date: Mon, 21 Nov 2022 11:07:14 +0000	[thread overview]
Message-ID: <20221121110714.0000720a@Huawei.com> (raw)
In-Reply-To: <IA1PR11MB6171B27750AB469AFE47CD5E890A9@IA1PR11MB6171.namprd11.prod.outlook.com>

On Mon, 21 Nov 2022 02:01:32 +0000
"Zhuo, Qiuxu" <qiuxu.zhuo@intel.com> wrote:

> > From: Ira Weiny <ira.weiny@intel.com>  
> > ...
> > 
> > @@ -423,25 +399,13 @@ struct pci_doe_mb
> > *pcim_doe_create_mb(struct pci_dev *pdev, u16 cap_offset)
> >  	doe_mb->pdev = pdev;
> >  	doe_mb->cap_offset = cap_offset;
> >  	init_waitqueue_head(&doe_mb->wq);
> > +	mutex_init(&doe_mb->exec_lock);  
> 
> In real world, not sure whether there is a case that pcim_doe_create_mb() is invoked by 
> multiple drivers to create multiple DOE mailbox instances? If there is such a case, we may 
> need to ensure there is only one DOE mailbox instance for a physical DOE of pdev @cap_offset.

I think if that happened we'd have a lot of mess.  The main PCI driver for a given
EP, switch port etc needs to handle this part.

Sub drivers can then do similar to
https://elixir.bootlin.com/linux/latest/source/drivers/cxl/core/pci.c#L465
to find a DOE instance that supports what they need and use it.
The DOE code 'should' work fine when doing this - the request/response pairs
will be serialized.

We have discussed moving that 'find' logic and the xarray into the PCI core
and that will need to happen to support CMA etc. For the first submission it
was easier to just do it in the CXL drivers..

Jonathan

> 
> -Qiuxu


  reply	other threads:[~2022-11-21 11:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-19 22:25 [PATCH] PCI/DOE: Remove asynchronous task support ira.weiny
     [not found] ` <20221120022735.4671-1-hdanton@sina.com>
2022-11-20 13:57   ` Ira Weiny
2022-11-21 17:52     ` Jonathan Cameron
2022-11-21  1:39 ` Li, Ming
2022-11-21  2:07   ` Li, Ming
2022-11-21 22:59     ` Ira Weiny
2022-11-22  9:46       ` Jonathan Cameron
2022-11-22 15:55         ` Ira Weiny
2022-11-21  2:01 ` Zhuo, Qiuxu
2022-11-21 11:07   ` Jonathan Cameron [this message]
2022-11-21 14:17     ` Zhuo, Qiuxu
2022-11-21 17:41       ` Jonathan Cameron
2022-11-22 19:48         ` Lukas Wunner
2022-11-21 11:19 ` Jonathan Cameron
2022-11-22 19:28   ` Lukas Wunner
2022-11-22 20:12     ` Dan Williams
2022-11-21 15:24 ` Dan Williams
2022-11-21 17:19   ` Davidlohr Bueso

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=20221121110714.0000720a@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=alison.schofield@intel.com \
    --cc=bhelgaas@google.com \
    --cc=dan.j.williams@intel.com \
    --cc=gregory.price@memverge.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=ming4.li@intel.com \
    --cc=qiuxu.zhuo@intel.com \
    --cc=vishal.l.verma@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.