From: Vinod Koul <vkoul@kernel.org>
To: Fenghua Yu <fenghua.yu@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>,
dmaengine@vger.kernel.org,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 00/16] Enable DSA 2.0 Event Log and completion record faulting features
Date: Wed, 12 Apr 2023 22:48:47 +0530 [thread overview]
Message-ID: <ZDbn9322i2DVpnQs@matsya> (raw)
In-Reply-To: <20230407203143.2189681-1-fenghua.yu@intel.com>
On 07-04-23, 13:31, Fenghua Yu wrote:
> Applications can send 64B descriptors to the DSA device via CPU
> instructions MOVDIR64B or ENQCMD. The application can choose to have
> the device write back a completion record (CR) in system memory to
> indicate the status of the descriptor submitted on completion.
>
> With the DSA hardware, the device is able to do on demand paging through
> the hardware by faulting in the user pages that do not have physical memory
> page backing with assistance from IOMMU. In the spec this was designated as
> the block on fault feature. While this hardware feature made operation
> simpler, it also stalls the device engines while the memory pages are being
> faulted in through Page Request Service (PRS). For applications sharing the
> same workqueue (wq) or wqs in the same group, operations are stalled if
> there are no free engines. To avoid slowing the performance of all other
> running applications sharing the same device engine(s), PRS can to be
> disabled and software can deal with partial completion.
>
> The block on fault feature on DSA 1.0 can be disabled for the wq. However,
> PRS is not completely disabled for the whole path. It is not disabled for
> CRs or batch list for a batch operation.
>
> The other issue is the DSA 1.0 error reporting mechanism, SWERROR register.
> The SWERROR register can only report a single error at a time until the
> driver reads and acknowledges the error. The follow on errors cannot be
> reported until the current error is "cleared" by the software by writing
> a bit to the SWERR register. If a large number of faults arrive and the
> software cannot clear them fast enough, overflowed errors will be dropped
> by the device.
>
> A CR is the optional 32 bytes (DSA) or 64 bytes (IAA) status that is
> written back for a submitted descriptor. If the address for the CR faults,
> the error is reported to the SWERROR register instead.
>
> With DSA 2.0 hardware [1], the event log feature is added. All errors are
> reported as an entry in a circular buffer reside in the system memory.
> The system admin is responsible to configure the size of the circular
> buffer large enough per device to handle the potential errors that may be
> reported. If the buffer is full and another error needs to be reported,
> the device engine will block until there's a free slot in the buffer.
> An event log entry for a faulted CR will contain the error information,
> the CR address that faulted, and the expected CR content the device had
> originally intended to write.
>
> DSA 2.0 also introduces per wq PRS disable knob. This will disable all PRS
> operations for the specific wq. The device will still have Address
> Translation Service (ATS) on. When ATS fails on a memory address for a CR,
> an eventlog entry will be written by the hardware into the event log
> ring buffer. The driver software is expected to parse the event log entry,
> fault in the address of the CR, and the write the content of the CR to
> the memory address.
>
> This patch series will implement the DSA 2 event log support. The support
> for the handling of the faulted user CR is added. The driver is also
> adding the same support for batch operation descriptors. With a batch
> operation the handling of the event log entry is a bit more complex.
> The faulting CR could be for the batch descriptor or any of the operation
> descriptors within the batch. The hardware generates a batch identifier
> that is used by the driver software to correlate the event log entries for
> the relevant descriptors of that batch.
>
> The faulting of source and destination addresses for the operation is not
> handled by the driver. That is left to be handled by the user application
> by faulting in the memory and re-submit the remaining operation.
Applied, thanks
--
~Vinod
next prev parent reply other threads:[~2023-04-12 17:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-07 20:31 [PATCH v4 00/16] Enable DSA 2.0 Event Log and completion record faulting features Fenghua Yu
2023-04-07 20:31 ` [PATCH v4 01/16] dmaengine: idxd: make misc interrupt one shot Fenghua Yu
2023-04-07 20:31 ` [PATCH v4 02/16] dmaengine: idxd: add event log size sysfs attribute Fenghua Yu
2023-04-07 20:31 ` [PATCH v4 03/16] dmaengine: idxd: setup event log configuration Fenghua Yu
2023-04-07 20:31 ` [PATCH v4 04/16] dmaengine: idxd: add interrupt handling for event log Fenghua Yu
2023-04-07 20:31 ` [PATCH v4 05/16] dmanegine: idxd: add debugfs for event log dump Fenghua Yu
2023-04-07 20:31 ` [PATCH v4 06/16] dmaengine: idxd: add per DSA wq workqueue for processing cr faults Fenghua Yu
2023-04-07 20:31 ` [PATCH v4 07/16] dmaengine: idxd: create kmem cache for event log fault items Fenghua Yu
2023-04-07 20:31 ` [PATCH v4 08/16] dmaengine: idxd: add idxd_copy_cr() to copy user completion record during page fault handling Fenghua Yu
2023-04-07 20:31 ` [PATCH v4 09/16] dmaengine: idxd: process user page faults for completion record Fenghua Yu
2023-04-07 20:31 ` [PATCH v4 10/16] dmaengine: idxd: add descs_completed field " Fenghua Yu
2023-04-07 20:31 ` [PATCH v4 11/16] dmaengine: idxd: process batch descriptor completion record faults Fenghua Yu
2023-04-07 20:31 ` [PATCH v4 12/16] dmaengine: idxd: add per file user counters for " Fenghua Yu
2023-04-07 20:31 ` [PATCH v4 13/16] dmaengine: idxd: add a device to represent the file opened Fenghua Yu
2023-04-07 20:31 ` [PATCH v4 14/16] dmaengine: idxd: expose fault counters to sysfs Fenghua Yu
2023-04-07 20:31 ` [PATCH v4 15/16] dmaengine: idxd: add pid to exported sysfs attribute for opened file Fenghua Yu
2023-04-07 20:31 ` [PATCH v4 16/16] dmaengine: idxd: add per wq PRS disable Fenghua Yu
2023-04-12 17:18 ` Vinod Koul [this message]
2023-04-12 17:49 ` [PATCH v4 00/16] Enable DSA 2.0 Event Log and completion record faulting features Fenghua Yu
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=ZDbn9322i2DVpnQs@matsya \
--to=vkoul@kernel.org \
--cc=dave.jiang@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=fenghua.yu@intel.com \
--cc=linux-kernel@vger.kernel.org \
/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