STRUCT XE_FILE(9)
π NAME π
struct xe_file β the file handle for the Xe driver β¨
okay so real talk, this page lives in the Kernel API Manual, it's struct xe_file(9), and it's basically the little passport every open Xe file gets. Let's get into it π«Ά
π¦ SYNOPSIS π¦
struct xe_file {
struct xe_device *xe;
struct drm_file *drm;
struct {
struct xarray xa;
struct mutex lock;
} vm;
struct {
struct xarray xa;
struct mutex lock;
atomic_t pending_removal;
} exec_queue;
u64 run_ticks[XE_ENGINE_CLASS_MAX];
struct xe_drm_client *client;
char *process_name;
pid_t pid;
struct kref refcount;
};
π MEMBERS π
xeβ typexe DEVICE *. The Xe device this whole thing hangs off of, the main character fr πdrmβ the base DRM file. Like, the DRM-layer file that underpins this whole handle πvmβ the VM state for this file πΈvm.xaβ the xarray that stores the VMs ποΈvm.lockβ protects VM lookup + reference and removal from the file xarray. And listen: this is not intended to be an outer lock that does things while being held. Nope. Not that vibe π
exec_queueβ the submission exec queue state for this file πexec_queue.xaβ the xarray that stores the exec queues π¦exec_queue.lockβ protects exec queue lookup + reference and removal from the file xarray. Same rule as above, no cap: it is not intended to be an outer lock that does things while being held β οΈexec_queue.pending_removalβ items pending to be removed, so that the GPU state update stays in sync with an ongoing query π
run_ticksβ hw engine class run time in ticks for this drm client. Literally theu64 run_ticks[XE_ENGINE_CLASS_MAX], one per engine class β±οΈclientβ the drm client πprocess_nameβ process name for the file handle, used to safely output during error situations where the xe file can outlive the process π like, the process is gone but we still gotta print something nicepidβ pid for the file handle, used to safely output during error situations where the xe file can outlive the process π«Ά same energy, different fieldrefcountβ ref count of this xe file. Keep it alive, bestie π₯
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/xe/xe_device_types.henum xe_wedged_mode(9)enum xe_page_size_alloc_ctrl_mode(9)struct xe_device(9)
aaaand that's the whole page π go read those SEE ALSOs, iykyk π§
this one's from ./drivers/gpu/drm/xe, dated October 2026, page struct xe_file(9) β mwah, slay, periodt π
π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms