From: Stuart Summers <stuart.summers@intel.com>
Cc: matthew.brost@intel.com, John.C.Harrison@Intel.com,
brian.welty@intel.com, rodrigo.vivi@intel.com,
intel-xe@lists.freedesktop.org,
Stuart Summers <stuart.summers@intel.com>
Subject: [PATCH 3/3] drm/xe/guc: Bump the G2H queue size to account for page faults
Date: Fri, 19 Jul 2024 17:58:28 +0000 [thread overview]
Message-ID: <6a9eaa520c06e49b6f4b259f0447d17635bf6bc1.1721411802.git.stuart.summers@intel.com> (raw)
In-Reply-To: <cover.1721411802.git.stuart.summers@intel.com>
With the increase in the size of the recoverable page fault
queue, we want to ensure the initial messages from GuC in
the G2H buffer have space while we transfer those out to the
actual pf_queue. Bump the G2H queue size to account for this
increase in the pf_queue size.
Signed-off-by: Stuart Summers <stuart.summers@intel.com>
---
drivers/gpu/drm/xe/xe_guc_ct.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index 7d2e937da1d8..3135f5812827 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -105,11 +105,19 @@ ct_to_xe(struct xe_guc_ct *ct)
* enough space to avoid backpressure on the driver. We increase the size
* of the receive buffer (relative to the send) to ensure a G2H response
* CTB has a landing spot.
+ *
+ * In addition to submissions, the G2H buffer needs to be able to hold
+ * enough space for recoverable page fault notifications. The number of
+ * page faults is interrupt driven and can be as much as the number of
+ * compute resources available. However, most of the actual work for these
+ * is in a separate page fault worker thread. Therefore we only need to
+ * make sure the queue has enough space to handle all of the submissions
+ * and responses and an extra buffer for incoming page faults.
*/
#define CTB_DESC_SIZE ALIGN(sizeof(struct guc_ct_buffer_desc), SZ_2K)
#define CTB_H2G_BUFFER_SIZE (SZ_4K)
-#define CTB_G2H_BUFFER_SIZE (4 * CTB_H2G_BUFFER_SIZE)
+#define CTB_G2H_BUFFER_SIZE (16 * CTB_H2G_BUFFER_SIZE)
#define G2H_ROOM_BUFFER_SIZE (CTB_G2H_BUFFER_SIZE / 4)
/**
--
2.34.1
next prev parent reply other threads:[~2024-07-19 17:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-19 17:58 [PATCH 0/3] Update page fault queue size calculation Stuart Summers
2024-07-19 17:58 ` [PATCH 1/3] drm/xe: Fix missing workqueue destroy in xe_gt_pagefault Stuart Summers
2024-07-19 17:58 ` [PATCH 2/3] drm/xe: Use topology to determine page fault queue size Stuart Summers
2024-07-19 18:12 ` Matthew Brost
2024-07-19 17:58 ` Stuart Summers [this message]
2024-07-19 18:10 ` [PATCH 3/3] drm/xe/guc: Bump the G2H queue size to account for page faults Matthew Brost
2024-07-19 19:00 ` Summers, Stuart
2024-07-19 18:03 ` ✓ CI.Patch_applied: success for Update page fault queue size calculation (rev3) Patchwork
2024-07-19 18:03 ` ✓ CI.checkpatch: " Patchwork
2024-07-19 18:04 ` ✗ CI.KUnit: failure " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2024-07-19 19:06 [PATCH 0/3] Update page fault queue size calculation Stuart Summers
2024-07-19 19:06 ` [PATCH 3/3] drm/xe/guc: Bump the G2H queue size to account for page faults Stuart Summers
2024-07-19 23:59 ` Matthew Brost
2024-07-23 14:13 ` Summers, Stuart
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=6a9eaa520c06e49b6f4b259f0447d17635bf6bc1.1721411802.git.stuart.summers@intel.com \
--to=stuart.summers@intel.com \
--cc=John.C.Harrison@Intel.com \
--cc=brian.welty@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=rodrigo.vivi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox