Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1380223

making a COW mapping on the fly from existing vma

From Dave Airlie <airlied@gmail.com>
Newsgroups linux.kernel
Subject making a COW mapping on the fly from existing vma
Date 2016-04-15 22:20 +0200
Message-ID <roinD-ks-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


This was just a random thought process I was having last night, and
wondered if it was possible.

We have a scenario with OpenGL where certain APIs hand large amounts
of data from the user to the API and when you return from the API call
the user can then free/overwrite/do whatever they want with the data
they gave you, which pretty much means you have to straight away
process the data.

Now there have been attempts at threading the GL API, but one thing
they usually hit is they have to do a lot of unthreaded processing for
these scenarios, so I was wondering could we do some COW magic with
the data.

More than likely the data will be anonymous mappings though maybe some
filebacked, and my idea would be you'd in the main thread create a new
readonly VMA from the old pages and set the original mapping to do COW
on all of its pages. Then the thread would pick up the readonly VMA
mapping and do whatever background processing it wants while the main
thread continues happily on its way.

I'm not sure if anyone who's done glthread has thought around this, or
if the kernel APIs are in place to do something like this so I just
thought I'd throw it out there.

Dave.

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

making a COW mapping on the fly from existing vma Dave Airlie <airlied@gmail.com> - 2016-04-15 22:20 +0200
  Re: making a COW mapping on the fly from existing vma Jerome Glisse <j.glisse@gmail.com> - 2016-04-18 16:00 +0200

csiph-web