On 28.07.20 11:15, Marco Solieri wrote:
On Mon, Jul 27, 2020 at 11:39:48PM +0200, Jan Kiszka wrote:
On 27.07.20 23:13, Marco Solieri wrote:
If we understand correctly your
implementation, you are mapping the entire memory region and then
copying blocks of the binary image using what you called "colored
offset" function.  That was very similar to our first (unpublished)
attempt to implement "colored loading", and we soon discovered it is not
very efficient.  Loading time grows considerably and could impede
scaling up to larger images (e.g. an Ubuntu-like rootfs).  We think that
a better alternative is closer to what we proposed in the last patchset,
that is:
- create a colored mapping,
- perform a "virtually" contiguous copy of the image.

We understand that this logic has to be moved outside the hypervisor, so
we would like to move it to the driver, exploiting Linux virtual addres
space to create the colored mapping.  What do you think about it?

Did you examine what was causing this slowdown? It seems highly
counter-intuitive to me, given that we are only copying from memory to
memory in 4K chunks, just using different virtual addresses - that' all.

I think you are right, indeed.  Doublechecking our old (and slow)
prototype, we discovered we were actually not just copying at each
iteration step, but we were also been ioremapping.  That was most
probably the cause of the slowdown.

That leaves only a design point in favour of the contiguous virtual
mapping.  It makes the implementation more robust and elegant, since it
enables the copy operation to be independent from coloring and thus
reusable.  This is enough for us to favour this approach.


To my understanding, the choice is between:

for_each_colored_chunk
    copy_chunk

and

for_each_colored_chunk
    remap_chunk
copy_whole image
drop_mapping

As the first option can be reused for uncolored images as well, I do not really see the value of option 2. Prove me wrong by code ;).

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

--
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/ee0c4b0a-9ea3-4978-43fd-fe38a1321e9c%40siemens.com.

Reply via email to