lkml.org 
[lkml]   [2015]   [May]   [7]   [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

* Jerome Glisse <j.glisse@gmail.com> wrote:

> > So I think the main value of struct page is if everyone on the
> > system sees the same struct page for the same pfn - not just the
> > temporary IO instance.
> >
> > The idea of having very temporary struct page arrays misses the
> > point I think: if struct page is used as essentially an IO sglist
> > then most of the synchronization properties are lost: then we
> > might as well use the real deal in that case and skip the dynamic
> > allocation and use pfns directly and avoid the dynamic allocation
> > overhead.
> >
> > Stable, global page-struct descriptors are a given for real RAM,
> > where we allocate a struct page for every page in nice, large,
> > mostly linear arrays.
> >
> > We'd really need that for pmem too, to get the full power of
> > struct page: and that means allocating them in nice, large,
> > predictable places - such as on the device itself ...
>
> Is handling kernel pagefault on the vmemmap completely out of the
> picture ? So we would carveout a chunck of kernel address space for
> those pfn and use it for vmemmap and handle pagefault on it.

That's pretty clever. The page fault doesn't even have to do remote
TLB shootdown, because it only establishes mappings - so it's pretty
atomic, a bit like the minor vmalloc() area faults we are doing.

Some sort of LRA (least recently allocated) scheme could unmap the
area in chunks if it's beyond a certain size, to keep a limit on size.
Done from the same context and would use remote TLB shootdown.

The only limitation I can see is that such faults would have to be
able to sleep, to do the allocation. So pfn_to_page() could not be
used in arbitrary contexts.

> Again here i think that GPU folks would like a solution where they
> can have a page struct but it would not be PMEM just device memory.
> So if we can come up with something generic enough to server both
> purpose that would be better in my view.

Yes.

Thanks,

Ingo


\
 
 \ /
  Last update: 2015-05-07 22:01    [W:0.134 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site