Skip to content

[Arista][pmem] create persistent memory on RAM for safe warm-reboot on arista_7060_cx32s #18080

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

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

vdahiya12
Copy link
Contributor

@vdahiya12 vdahiya12 commented Feb 9, 2024

This change does the following things for x86_64-arista_7060_cx32s

  • Creates a pmem partition of 1G on the RAM which will be used a persistent memory storage for warmboot files
  • It adds modules to iniramfs to mount pmem partition /dev/pmem0 and makes sure to mount /dev/pmem0 partition to ${rootmnt}/pmem only if it is not formatted/mounted already

Why I did it

Work item tracking
  • Microsoft ADO (number only):

How I did it

How to verify it

tested by custom building and deploying the changes on a arista_7060_cx32s DUT/testbed

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305
  • [ x] 202311

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@vdahiya12 vdahiya12 requested a review from lguohan as a code owner February 9, 2024 23:37
@vdahiya12 vdahiya12 marked this pull request as draft February 9, 2024 23:38
@prgeor prgeor changed the title [pmem] create a emuated persistent memory on RAM for safe warm-reboot [pmem] create persistent memory on RAM for safe warm-reboot Feb 9, 2024
@@ -38,6 +39,9 @@ for x in $(cat /proc/cmdline); do
logs_inram=on)
logs_inram=true
;;
mount_pmem=on)
Copy link
Contributor

Choose a reason for hiding this comment

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

@vdahiya12 adding memmap=* is sufficient.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@@ -494,6 +494,8 @@ write_platform_specific_cmdline() {
if in_array "$sid" "Upperlake" "UpperlakeES" "UpperlakeElite"; then
aboot_machine=arista_7060_cx32s
flash_size=3700
cmdline_add memmap=512M!4G
cmdline_add mount_pmem=on
Copy link
Contributor

@prgeor prgeor Feb 9, 2024

Choose a reason for hiding this comment

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

@vdahiya12 don't need this new parameter mount_pmem, see below comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Signed-off-by: vaibhav-dahiya <[email protected]>
@prgeor
Copy link
Contributor

prgeor commented May 7, 2024

@vdahiya12 please add more description,

  1. PMEM size
  2. Platform tested
  3. How was this tested

@vdahiya12 vdahiya12 marked this pull request as ready for review May 7, 2024 22:06
vdahiya12 added 2 commits May 7, 2024 22:37
Signed-off-by: vaibhav-dahiya <[email protected]>
Signed-off-by: vaibhav-dahiya <[email protected]>
@vdahiya12 vdahiya12 changed the title [pmem] create persistent memory on RAM for safe warm-reboot [pmem] create persistent memory on RAM for safe warm-reboot on arista_7060_cx32s May 8, 2024
@vdahiya12 vdahiya12 changed the title [pmem] create persistent memory on RAM for safe warm-reboot on arista_7060_cx32s [Arista][pmem] create persistent memory on RAM for safe warm-reboot on arista_7060_cx32s May 8, 2024
@saiarcot895 saiarcot895 requested a review from Staphylo May 8, 2024 20:19
@@ -235,6 +241,19 @@ else
fi
fi

# check the fstype of pmem if not ext4 fformat and mount
Copy link
Contributor

@saiarcot895 saiarcot895 May 8, 2024

Choose a reason for hiding this comment

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

Typo and run-on sentence here.

@vdahiya12 vdahiya12 marked this pull request as draft May 10, 2024 20:48
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.

3 participants