From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: dri-devel@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
intel-gfx@lists.freedesktop.org, swati.dhingra@intel.com
Subject: Re: [RFC 0/4] Introduce drmfs pseudo filesystem for drm subsystem
Date: Tue, 20 Dec 2016 03:15:49 +0200 [thread overview]
Message-ID: <27992573.ny0BXXvPOU@avalon> (raw)
In-Reply-To: <1482144146-31605-1-git-send-email-swati.dhingra@intel.com>
Hi Swati,
On Monday 19 Dec 2016 16:12:22 swati.dhingra@intel.com wrote:
> From: Swati Dhingra <swati.dhingra@intel.com>
>
> Currently, we don't have a stable ABI which can be used for the purpose of
> providing output debug/loggging/crc and other such data from DRM.
> The ABI in current use (filesystems, ioctls, et al.) have their own
> constraints and are intended to output a particular type of data.
> Few cases in point:
> sysfs - stable ABI, but constrained to one textual value per file
> debugfs - unstable ABI, free-for-all
> ioctls - not as suitable to many single purpose continuous data
> dumping, we would very quickly run out ioctl space; requires more
> userspace support than "cat"
> device nodes - a real possibilty, kernel instantiation is more tricky,
> requires udev (+udev.rules) or userspace discovery of the
> dynamic major:minor (via sysfs) [mounting a registered
> filesystem is easy in comparison]
> netlink - stream based, therefore involves numerous copies.
>
> Debugfs is the lesser among the evils here, thereby we have grown used to
> the convenience and flexibility in presentation that debugfs gives us
> (including relayfs inodes) that we want some of that hierachy in stable user
> ABI form.
Seriously, why ? A subsystem growing its own file system sounds so wrong. It
seems that you want to have all the benefits of a stable ABI without going
through the standardization effort that this requires. I can see so many ways
that drmfs could be abused, with drivers throwing in new data with little or
no review. You'll need very compelling arguments to convince me.
> Due to these limitations, there is a need for a new pseudo filesytem, that
> would act as a stable 'free-for-all' ABI, with the heirarchial structure and
> thus convenience of debugfs. This will be managed by drm, thus named
> 'drmfs'. DRM would register this filesystem to manage a canonical
> mountpoint, but this wouldn't limit everyone to only using that pseudofs
> underneath.
>
> This can serve to hold various kinds of output data from Linux DRM
> subsystems, for the files which can't truely fit anywhere else with
> existing ABI's but present so, for the lack of a better place.
>
> In this patch series, we have introduced a pseudo filesystem named as
> 'drmfs' for now. The filesystem is introduced in the first patch, and the
> subsequent patches make use of the filesystem interfaces, in drm driver,
> and making them available for use by the drm subsystem components, one of
> which is i915. We've moved the location of i915 GuC logs from debugfs to
> drmfs in the last patch. Subsequently, more such files such as pipe_crc,
> error states, memory stats, etc. can be move to this filesystem, if the
> idea introduced here is acceptable per se. The filesystem introduced is
> being used to house the data generated by i915 driver in this patch series,
> but will hopefully be generic enough to provide scope for usage by any
> other drm subsystem component.
>
> The patch series is being floated as RFC to gather feedback on the idea and
> infrastructure proposed here and it's suitability to address the specific
> problem statement/use case.
>
> v2: fix the bat failures caused due to missing config check
>
> v3: Changes made:
> - Move the location of drmfs from fs/ to drivers/gpu/drm/ (Chris)
> - Moving config checks to header (Chris,Daniel)
>
> v4: Added the kernel Documentaion (using Sphinx).
>
> Sourab Gupta (4):
> drm: Introduce drmfs pseudo filesystem interfaces
> drm: Register drmfs filesystem from drm init
> drm: Create driver specific root directory inside drmfs
> drm/i915: Creating guc log file in drmfs instead of debugfs
>
> Documentation/gpu/drm-uapi.rst | 76 ++++
> drivers/gpu/drm/Kconfig | 9 +
> drivers/gpu/drm/Makefile | 1 +
> drivers/gpu/drm/drm_drv.c | 26 ++
> drivers/gpu/drm/drmfs.c | 566 ++++++++++++++++++++++++++
> drivers/gpu/drm/i915/i915_guc_submission.c | 33 +-
> include/drm/drm_drv.h | 3 +
> include/drm/drmfs.h | 77 ++++
> include/uapi/linux/magic.h | 3 +
> 9 files changed, 773 insertions(+), 21 deletions(-)
> create mode 100644 drivers/gpu/drm/drmfs.c
> create mode 100644 include/drm/drmfs.h
--
Regards,
Laurent Pinchart
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-12-20 1:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-19 10:42 [RFC 0/4] Introduce drmfs pseudo filesystem for drm subsystem swati.dhingra
2016-12-19 10:42 ` [RFC 1/4] drm: Introduce drmfs pseudo filesystem interfaces swati.dhingra
2016-12-19 10:42 ` [RFC 2/4] drm: Register drmfs filesystem from drm init swati.dhingra
2016-12-19 10:42 ` [RFC 3/4] drm: Create driver specific root directory inside drmfs swati.dhingra
2016-12-19 10:42 ` [RFC 4/4] drm/i915: Creating guc log file in drmfs instead of debugfs swati.dhingra
2016-12-19 12:53 ` ✗ Fi.CI.BAT: warning for Introduce drmfs pseudo filesystem for drm subsystem (rev4) Patchwork
2016-12-20 1:15 ` Laurent Pinchart [this message]
2016-12-20 9:44 ` [RFC 0/4] Introduce drmfs pseudo filesystem for drm subsystem Jani Nikula
2016-12-20 15:15 ` Sean Paul
2017-02-09 10:05 ` sourab gupta
2017-02-09 11:49 ` Jani Nikula
2017-02-10 6:02 ` sourab gupta
-- strict thread matches above, loose matches on Subject: below --
2016-12-05 11:06 swati.dhingra
2016-12-12 6:14 ` sourab gupta
2016-12-12 15:33 ` Alex Deucher
2016-12-14 8:49 ` sourab gupta
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=27992573.ny0BXXvPOU@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=swati.dhingra@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