[Intel-gfx] [RFC 01/12] drm/i915: Expose list of clients in sysfs

Chris Wilson chris at chris-wilson.co.uk
Tue Mar 10 17:59:40 UTC 2020


Quoting Tvrtko Ursulin (2020-03-09 18:31:18)
> +struct i915_drm_clients {
> +       struct mutex lock;
> +       struct xarray xarray;
> +       u32 next_id;
> +
> +       struct kobject *root;
> +};
> +
> +struct i915_drm_client {
> +       struct kref kref;
> +
> +       struct rcu_head rcu;
> +
> +       unsigned int id;
> +       struct pid *pid;
> +       char *name;
> +       bool closed;

After spending a couple of days with kcsan, I can predict you will want
to mark this up with WRITE_ONCE/READ_ONCE or switch to set_bit/test_bit.

I haven't spotted anything else to complain about, and you already
suggested splitting out the attr setup :)
-Chris


More information about the Intel-gfx mailing list