Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add logic to stack lcow layers on a single VPMEM device #930

Merged
merged 1 commit into from
Jun 23, 2021

Conversation

anmaxvl
Copy link
Contributor

@anmaxvl anmaxvl commented Jan 25, 2021

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

@anmaxvl anmaxvl requested a review from a team January 25, 2021 23:55
@anmaxvl anmaxvl force-pushed the user/maksiman/device-mapper branch 4 times, most recently from f3ddb24 to 5459050 Compare January 26, 2021 07:22
@anmaxvl anmaxvl force-pushed the user/maksiman/device-mapper branch 5 times, most recently from 9c8e6fe to 3c00b47 Compare February 2, 2021 18:43
@anmaxvl anmaxvl marked this pull request as ready for review February 3, 2021 04:50
@anmaxvl anmaxvl force-pushed the user/maksiman/device-mapper branch 3 times, most recently from 710fdcb to bca9a89 Compare February 4, 2021 17:40
@anmaxvl anmaxvl requested a review from a team February 4, 2021 18:03
@anmaxvl anmaxvl force-pushed the user/maksiman/device-mapper branch from bca9a89 to a98df30 Compare February 4, 2021 23:31
@katiewasnothere
Copy link
Contributor

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.

@anmaxvl anmaxvl force-pushed the user/maksiman/device-mapper branch from 727b0ac to a5cb324 Compare May 31, 2021 21:05
Copy link
Contributor

@katiewasnothere katiewasnothere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple of non blocking nits, otherwise LGTM

@anmaxvl anmaxvl force-pushed the user/maksiman/device-mapper branch 6 times, most recently from 4f78a97 to f29620b Compare June 3, 2021 07:31
Copy link
Contributor

@katiewasnothere katiewasnothere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes, LGTM again :)

@anmaxvl anmaxvl force-pushed the user/maksiman/device-mapper branch from f29620b to 59a90b5 Compare June 14, 2021 16:15
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>
@anmaxvl anmaxvl force-pushed the user/maksiman/device-mapper branch from 59a90b5 to 9ed9300 Compare June 14, 2021 20:05
@dcantah
Copy link
Contributor

dcantah commented Jun 15, 2021

The force push was fixing some edgecases I think you said this morning?

@anmaxvl
Copy link
Contributor Author

anmaxvl commented Jun 15, 2021

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)

@anmaxvl anmaxvl merged commit 1c8b91e into microsoft:master Jun 23, 2021
TBBle added a commit to TBBle/hcsshim that referenced this pull request Jul 14, 2021
This was left behind due to an unlucky conflict between microsoft#1004 and microsoft#930.

The file already existed with the same content at the new location, and
nothing was referencing this location, so a trivial deletion.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
@anmaxvl anmaxvl deleted the user/maksiman/device-mapper branch May 25, 2022 22:53
princepereira pushed a commit to princepereira/hcsshim that referenced this pull request Aug 29, 2024
…pper

add logic to stack lcow layers on a single VPMEM device
princepereira pushed a commit to princepereira/hcsshim that referenced this pull request Aug 29, 2024
This was left behind due to an unlucky conflict between microsoft#1004 and microsoft#930.

The file already existed with the same content at the new location, and
nothing was referencing this location, so a trivial deletion.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants