lkml.org 
[lkml]   [2015]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 00/10] evacuate struct page from the block layer, introduce __pfn_t
On Fri, May 08, 2015 at 07:37:59AM +0200, Ingo Molnar wrote:

> same as iov_iter_get_pages(), except that pages array is allocated
> (kmalloc if possible, vmalloc if that fails) and left for caller to
> free. Lustre and NFS ->direct_IO() switched to it.
>
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
>
> So if code does iov_iter_get_pages_alloc() on a user address that has
> a real struct page behind it - and some other code does a regular
> get_user_pages() on it, we'll have two sets of struct page
> descriptors, the 'real' one, and a fake allocated one, right?

Huh? iov_iter_get_pages() is given an array of pointers to struct page,
which it fills with what it finds. iov_iter_get_pages_alloc() *allocates*
such an array, fills that with what it finds and gives the allocated array
to caller.

We are not allocating any struct page instances in either of those.


\
 
 \ /
  Last update: 2015-05-08 11:41    [W:0.082 / U:4.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site