From: Al Viro <viro@ZenIV.linux.org.uk>
To: David Herrmann <dh.herrmann@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 1/2] anon_inodes: allow external inode allocations
Date: Wed, 9 Oct 2013 18:36:16 +0100 [thread overview]
Message-ID: <20131009173616.GI13318@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1380713066-32519-1-git-send-email-dh.herrmann@gmail.com>
On Wed, Oct 02, 2013 at 01:24:25PM +0200, David Herrmann wrote:
> DRM core shares a single address_space across all inodes that belong to
> the same DRM device. This allows efficient unmapping of user-space
> mappings during buffer eviction. However, there is no easy way to get a
> shared address_space for DRM devices during initialization. Therefore, we
> currently delay this step until the first ->open() and save the given
> inode for future use.
>
> This causes ugly delayed initialization throughout the DRM core. TTM
> devices end up without a dev_mapping pointer and we have to carefully
> respect any underlying filesystem implementation so we don't corrupt the
> inode->i_mapping and inode->i_data fields.
>
> We can avoid this if we were allowed to allocate an anonymous inode for
> each DRM device. We only have to set file->f_mapping during ->open()
> and no longer need to adjust inode mappings. As fs/anon_inodes.c already
> provides a minimal internal FS mount, we extend it to also provide
> anonymous inodes for use in drivers like DRM.
>
> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
> Wanted-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Told-to-stop-abusing-anon_inodes-by: Al Viro <viro@zeniv.linux.org.uk>
Note that anon_inode_getfile_private() is not going to survive - for exact
same reasons. It's already removed in vfs.git#experimental, shortly in
#for-next as well. Do NOT extend fs/anon_inodes.c; if you need a minimal
internal fs mount, just do what fs/aio.c does in the same branch.
prev parent reply other threads:[~2013-10-09 17:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-02 11:24 [PATCH v2 1/2] anon_inodes: allow external inode allocations David Herrmann
2013-10-02 11:24 ` [PATCH 2/2] DRM: use anon_inode instead of delayed inode init David Herrmann
2013-10-09 17:36 ` Al Viro [this message]
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=20131009173616.GI13318@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=dh.herrmann@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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;
as well as URLs for NNTP newsgroup(s).