add logic to stack lcow layers on a single VPMEM device#930
add logic to stack lcow layers on a single VPMEM device#930anmaxvl merged 1 commit intomicrosoft:masterfrom
Conversation
f3ddb24 to
5459050
Compare
9c8e6fe to
3c00b47
Compare
710fdcb to
bca9a89
Compare
bca9a89 to
a98df30
Compare
|
It might be good if you could make an issue on hcsshim for this and describe the memory allocation method and any other additional big changes proposed here. |
5a41352 to
727b0ac
Compare
internal/memory/pool.go
Outdated
| target := 4 * GigaByte | ||
| for offset := range pi.free { | ||
| if offset < target { | ||
| target = offset | ||
| } | ||
| } | ||
| return mc, target, nil |
There was a problem hiding this comment.
does this mean we could potentially return that the next offset is at offset 4GBs? Is that valid?
There was a problem hiding this comment.
we should never have a pool that will have an offset of 4GB, since 4GB is the maximum size of memory block. I can add a check though? 4GB should probably be a const at this point.
727b0ac to
a5cb324
Compare
katiewasnothere
left a comment
There was a problem hiding this comment.
couple of non blocking nits, otherwise LGTM
d26f6ea to
026c3f9
Compare
katiewasnothere
left a comment
There was a problem hiding this comment.
Thanks for the fixes, LGTM again :)
add VirtualPMemMapping schema and update gcs types add memory allocator interface and implementation VPMem multi-mapping support has been added in 19H1, which enables packing multiple VHDs onto a single VPMem device. This feature enables an optimization, where multiple LCOW container layers can be packed onto a single VPMem device. This change uses memory allocator introduced above to keep track of the VPMem surface allocation. Additionally, introduce new structs to keep track of the internal state of each mapped LCOW layer VHD and update HCS/GCS calls accordingly. The optimization is enabled by default on supported systems and fall-back to old behavior otherwise. add CRI tests Signed-off-by: Maksim An <maksiman@microsoft.com>
|
The force push was fixing some edgecases I think you said this morning? |
yeah, I added one more test case to cover rootfs.vhd vs initrd (it was defaulting to only do rootfs) |
This PR adds logic to reuse an existing VPMEM device and stack multiple LCOW layers onto it.
The change depends on microsoft/opengcs#389
More background in #940
Signed-off-by: Maksim An maksiman@microsoft.com