Skip to content

Commit 8e5a5dc

Browse files
committed
drm/xe: Add modparam for SVM notifier size
Useful to experiment with notifier size and how it affects performance. v3: - Pull missing changes including in following patch (Thomas) v5: - Spell out power of 2 (Thomas) Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250306012657.3505757-31-matthew.brost@intel.com
1 parent d92eabb commit 8e5a5dc

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

drivers/gpu/drm/xe/xe_module.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@ struct xe_modparam xe_modparam = {
2222
.guc_log_level = 3,
2323
.force_probe = CONFIG_DRM_XE_FORCE_PROBE,
2424
.wedged_mode = 1,
25+
.svm_notifier_size = 512,
2526
/* the rest are 0 by default */
2627
};
2728

29+
module_param_named(svm_notifier_size, xe_modparam.svm_notifier_size, uint, 0600);
30+
MODULE_PARM_DESC(svm_notifier_size, "Set the svm notifier size(in MiB), must be power of 2");
31+
2832
module_param_named_unsafe(force_execlist, xe_modparam.force_execlist, bool, 0444);
2933
MODULE_PARM_DESC(force_execlist, "Force Execlist submission");
3034

drivers/gpu/drm/xe/xe_module.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ struct xe_modparam {
2222
unsigned int max_vfs;
2323
#endif
2424
int wedged_mode;
25+
u32 svm_notifier_size;
2526
};
2627

2728
extern struct xe_modparam xe_modparam;

drivers/gpu/drm/xe/xe_svm.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "xe_bo.h"
77
#include "xe_gt_tlb_invalidation.h"
88
#include "xe_migrate.h"
9+
#include "xe_module.h"
910
#include "xe_pt.h"
1011
#include "xe_svm.h"
1112
#include "xe_ttm_vram_mgr.h"
@@ -607,7 +608,8 @@ int xe_svm_init(struct xe_vm *vm)
607608

608609
err = drm_gpusvm_init(&vm->svm.gpusvm, "Xe SVM", &vm->xe->drm,
609610
current->mm, xe_svm_devm_owner(vm->xe), 0,
610-
vm->size, SZ_512M, &gpusvm_ops, fault_chunk_sizes,
611+
vm->size, xe_modparam.svm_notifier_size * SZ_1M,
612+
&gpusvm_ops, fault_chunk_sizes,
611613
ARRAY_SIZE(fault_chunk_sizes));
612614
if (err)
613615
return err;

0 commit comments

Comments
 (0)