From: Hans Verkuil <hverkuil@xs4all.nl>
To: Jan Kara <jack@suse.cz>, linux-media@vger.kernel.org
Cc: Hans Verkuil <hans.verkuil@cisco.com>, Davidlohr Bueso <dbueso@suse.com>
Subject: Re: Use of mmap_sem in __qbuf_userptr()
Date: Fri, 06 Mar 2015 10:17:13 +0100 [thread overview]
Message-ID: <54F97099.7050601@xs4all.nl> (raw)
In-Reply-To: <20150305142735.GA16869@quack.suse.cz>
Hi Jan,
On 03/05/2015 03:27 PM, Jan Kara wrote:
> Hello,
>
> so after a long pause I've got back to my simplification patches around
> get_user_pages(). After the simplification done by commit f035eb4e976ef5
> (videobuf2: fix lockdep warning) it seems unnecessary to take mmap_sem
> already when calling __qbuf_userptr(). As far as I understand what
> __qbuf_userptr() does, the only thing where mmap_sem is needed is for
> get_userptr and possibly put_userptr memops. So it should be possible to
> push mmap_sem locking down into these memops, shouldn't it? Or am I missing
> something in __qbuf_userptr() for which mmap_sem is also necessary?
No, you are correct. The mmap_sem can be pushed down, either to __qbuf_userptr
or all the way to the videobuf2-dma/vmalloc get/put_userptr ops.
> If I'm right, I can prepare patches to do that (and then on top of those
> rebase patches which will make v4l2 core use some mm helper functions so
> they don't have to care about details of mm locking, vmas, etc.).
That would be really nice.
Regards,
Hans
prev parent reply other threads:[~2015-03-06 9:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-05 14:27 Use of mmap_sem in __qbuf_userptr() Jan Kara
2015-03-06 9:17 ` Hans Verkuil [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=54F97099.7050601@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=dbueso@suse.com \
--cc=hans.verkuil@cisco.com \
--cc=jack@suse.cz \
--cc=linux-media@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.