All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: "Dai WeiBin (David Dai)" <david.dai@montage-tech.com>
Cc: <ben.widawsky@intel.com>, <linux-cxl@vger.kernel.org>,
	"'Jin LiZhi (Lynn Jin)'" <lynn.jin@montage-tech.com>
Subject: Re: CXL mailbox background command
Date: Thu, 29 Apr 2021 10:18:57 +0100	[thread overview]
Message-ID: <20210429101857.00002f3d@Huawei.com> (raw)
In-Reply-To: <008b01d73caf$ce11b7d0$6a352770$@montage-tech.com>

On Thu, 29 Apr 2021 12:26:20 +0800
"Dai WeiBin (David Dai)" <david.dai@montage-tech.com> wrote:

> Hi Ben,
> 
> When we think of cxl mailbox background command, we met a difficult issue, how to handle switching between a background command end and another background command start?
> 
> The flow is as below:
> 1. Host/caller sends a command to cxl device.
> 2. CXL device identifies the command as a background command, then cxl device returns background command started, background Operation is set to 1.
> 3. CXL device start to handle background command.
> 4. Host/caller can send other commands to cxl device when background command is ongoing on device side.
> 5. At a special point host/caller is sending a command to device when the background command just is finished, the new command will be handled as a background command by device.
> 6. That means the old background command ends, background Operation is set to 0, immediately the new background command is started, background Operation is set to 1 again at once.
> 7. So Host driver doesn’t have a chance to check the old background command has been finished, it still see “background Operation == 1”.
> 8. Mailbox Status Register and Background Command Status Register are both read-only, that results there is not a handshake between host and device.
> 9.How to guarantee exclusion between two background commands.
> 
> Do you have any suggestion about this?

Perhaps use the CEL to identify which commands are background commands and queue them up
in software?  So don't issue another one until previous is known to have completed.

Would that work?

Jonathan

> 
> Thanks,
> David
> 
> 


  reply	other threads:[~2021-04-29  9:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29  4:26 CXL mailbox background command Dai WeiBin (David Dai)
2021-04-29  9:18 ` Jonathan Cameron [this message]
2021-04-30  1:18   ` Dai WeiBin (David Dai)
2021-04-29 20:32 ` Dan Williams
2021-04-30  1:42   ` Dai WeiBin (David Dai)
  -- strict thread matches above, loose matches on Subject: below --
2021-04-29  1:24 Dai WeiBin (David Dai)

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=20210429101857.00002f3d@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=ben.widawsky@intel.com \
    --cc=david.dai@montage-tech.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=lynn.jin@montage-tech.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.