Quoting Tvrtko Ursulin (2019-12-16 13:28:18) > > On 16/12/2019 13:17, Chris Wilson wrote: > > Quoting Tvrtko Ursulin (2019-12-16 12:07:01) > >> From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> > >> > >> Expose a list of clients with open file handles in sysfs. > >> > >> This will be a basis for a top-like utility showing per-client and per- > >> engine GPU load. > >> > >> Currently we only expose each client's pid and name under opaque numbered > >> directories in /sys/class/drm/card0/clients/. > >> > >> For instance: > >> > >> /sys/class/drm/card0/clients/3/name: Xorg > >> /sys/class/drm/card0/clients/3/pid: 5664 > > > > Should we even bother having the name here? And just have a link to pid > > instead? Contemplating even pidfd for ultramodern. > > I haven't looked at what symlink creation facilities sysfs would allow. > But even then, I don't see how we could link to proc from sysfs. > > I had a quick read on pidfd and don't see how it fits. What did you have > in mind? Just thinking if we should do something like pidfd = open(/.../clients/3/pid); Ok, looking at pidfd_fops, it doesn't provide anything useful like being able to safely acquire the pid->comm. Shame. -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx