linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Jan Kara <jack@suse.cz>,
	linux-mm@kvack.org, linux-media@vger.kernel.org,
	Hans Verkuil <hverkuil@xs4all.nl>,
	dri-devel@lists.freedesktop.org, Pawel Osciak <pawel@osciak.com>,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	mgorman@suse.de, Marek Szyprowski <m.szyprowski@samsung.com>,
	linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH 2/9] mm: Provide new get_vaddr_frames() helper
Date: Tue, 2 Jun 2015 17:23:00 +0200	[thread overview]
Message-ID: <20150602152300.GD17315@quack.suse.cz> (raw)
In-Reply-To: <20150528162402.19a0a26a5b9eae36aa8050e5@linux-foundation.org>

[-- Attachment #1: Type: text/plain, Size: 1227 bytes --]

On Thu 28-05-15 16:24:02, Andrew Morton wrote:
> On Wed, 13 May 2015 15:08:08 +0200 Jan Kara <jack@suse.cz> wrote:
> 
> > Provide new function get_vaddr_frames().  This function maps virtual
> > addresses from given start and fills given array with page frame numbers of
> > the corresponding pages. If given start belongs to a normal vma, the function
> > grabs reference to each of the pages to pin them in memory. If start
> > belongs to VM_IO | VM_PFNMAP vma, we don't touch page structures. Caller
> > must make sure pfns aren't reused for anything else while he is using
> > them.
> > 
> > This function is created for various drivers to simplify handling of
> > their buffers.
> > 
> > Acked-by: Mel Gorman <mgorman@suse.de>
> > Acked-by: Vlastimil Babka <vbabka@suse.cz>
> > Signed-off-by: Jan Kara <jack@suse.cz>
> > ---
> >  include/linux/mm.h |  44 +++++++++++
> >  mm/gup.c           | 226 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> 
> That's a lump of new code which many kernels won't be needing.  Can we
> put all this in a new .c file and select it within drivers/media
> Kconfig?
  So the attached patch should do what you had in mind. OK?

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

[-- Attachment #2: 0001-mm-Move-get_vaddr_frames-behind-a-config-option.patch --]
[-- Type: text/x-patch, Size: 0 bytes --]



  parent reply	other threads:[~2015-06-02 15:23 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-13 13:08 [PATCH 0/9 v5] Helper to abstract vma handling in media layer Jan Kara
2015-05-13 13:08 ` [PATCH 1/9] [media] vb2: Push mmap_sem down to memops Jan Kara
2015-05-13 13:08 ` [PATCH 2/9] mm: Provide new get_vaddr_frames() helper Jan Kara
2015-05-28 23:24   ` Andrew Morton
2015-06-01 12:40     ` Jan Kara
2015-06-01 13:02       ` Hans Verkuil
2015-06-02 15:23     ` Jan Kara [this message]
2015-06-02 22:29       ` Andrew Morton
2015-06-03  9:34         ` Jan Kara
2015-05-13 13:08 ` [PATCH 3/9] media: omap_vout: Convert omap_vout_uservirt_to_phys() to use get_vaddr_pfns() Jan Kara
2015-05-13 13:08 ` [PATCH 4/9] vb2: Provide helpers for mapping virtual addresses Jan Kara
2015-05-13 13:08 ` [PATCH 5/9] media: vb2: Convert vb2_dma_sg_get_userptr() to use frame vector Jan Kara
2015-05-13 13:08 ` [PATCH 6/9] media: vb2: Convert vb2_vmalloc_get_userptr() " Jan Kara
2015-05-13 13:08 ` [PATCH 7/9] media: vb2: Convert vb2_dc_get_userptr() " Jan Kara
2015-05-13 13:08 ` [PATCH 8/9] media: vb2: Remove unused functions Jan Kara
2015-05-13 13:08 ` [PATCH 9/9] drm/exynos: Convert g2d_userptr_get_dma_addr() to use get_vaddr_frames() Jan Kara
2015-05-14 10:51   ` Inki Dae
2015-05-14 11:39     ` Jan Kara
2015-06-10  9:07   ` Hans Verkuil
2015-05-25 11:37 ` [PATCH 0/9 v5] Helper to abstract vma handling in media layer Hans Verkuil
2015-05-25 13:55   ` Jan Kara
  -- strict thread matches above, loose matches on Subject: below --
2015-07-13 14:55 [PATCH 0/9 v7] " Jan Kara
2015-07-13 14:55 ` [PATCH 2/9] mm: Provide new get_vaddr_frames() helper Jan Kara
2015-07-17 10:23   ` Hans Verkuil
2015-07-17 20:26     ` Andrew Morton
2015-05-06  7:28 [PATCH 0/9 v4] Helper to abstract vma handling in media layer Jan Kara
2015-05-06  7:28 ` [PATCH 2/9] mm: Provide new get_vaddr_frames() helper Jan Kara
2015-05-06 10:45   ` Vlastimil Babka
2015-05-06 14:58     ` Jan Kara
2015-05-08 14:49   ` Mel Gorman
2015-05-11 14:00     ` Jan Kara
2015-05-11 14:47       ` Mel Gorman
2015-05-05 16:01 [PATCH 0/9 v3] Helper to abstract vma handling in media layer Jan Kara
2015-05-05 16:01 ` [PATCH 2/9] mm: Provide new get_vaddr_frames() helper Jan Kara

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=20150602152300.GD17315@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mchehab@osg.samsung.com \
    --cc=mgorman@suse.de \
    --cc=pawel@osciak.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;
as well as URLs for NNTP newsgroup(s).