Skip to content

mass: return memory report to arvo#675

Merged
pkova merged 11 commits into
next/kelvin/410from
tinnus-mass
Aug 15, 2024
Merged

mass: return memory report to arvo#675
pkova merged 11 commits into
next/kelvin/410from
tinnus-mass

Conversation

@tinnus-napbus

@tinnus-napbus tinnus-napbus commented Jul 11, 2024

Copy link
Copy Markdown
Contributor

Dill can give Vere a [%quac ~] gift and vere returns a memory report in a [%quac p=(list quac)] where a quac is a [name=@t size=@ud quacs=(list quac)] nested memory report structure. Vere itself does not print the memory report in this case, but it still does when requested with the old |mass/%heft and grab from the command-line. Arvo will implement its own memory report printer for quacs.

Unlike the previous version that used a fake driver to inject the report, this does it properly through Dill's driver, using a %quiz plea/writ to query the serf for this info.

@tinnus-napbus tinnus-napbus requested a review from pkova July 11, 2024 14:54
@tinnus-napbus tinnus-napbus requested a review from a team as a code owner July 11, 2024 14:54
@jalehman jalehman requested review from joemfb and matthew-levan July 11, 2024 22:06
Comment thread pkg/noun/manage.h Outdated
Comment thread pkg/noun/jets.c Outdated
Comment thread pkg/noun/jets.c Outdated
Comment thread pkg/noun/manage.c Outdated
Comment thread pkg/vere/io/term.c Outdated
Comment thread pkg/vere/lord.c Outdated
Comment thread pkg/vere/main.c
// validate whether we can execute disk migration
if ( u3_Host.ops_u.nuu == c3n ) {
_cw_play_impl(0, 0, c3n, c3n, c3n);
signal(SIGTSTP, _stop_exit);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this an unintentional addition from a merge commit?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@pkova do you know where this came from? Should I remove this or is it from that thingy you merged in?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think maybe I accidentally squashed in something you merged. If it just manually remove the extra changes will it screw things up if you subsequently merge that thing into develop or wherever?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is fine to remove from this PR, it corresponds to this stuff that's already on develop:

vere/pkg/vere/main.c

Lines 3316 to 3325 in 58aa31c

// validate whether we can execute disk migration
if ( u3_Host.ops_u.nuu == c3n ) {
c3_i sat_i = _cw_play_fork(0, 0, c3n, c3n, c3n);
if ( sat_i ) {
fprintf(stderr, "play: replay failed\r\n");
exit(sat_i);
}
signal(SIGTSTP, _stop_exit);
// XX unmap loom, else parts of the snapshot could be left in memory
}

Comment thread pkg/vere/serf.c Outdated
/* _serf_quac: convert a quac to a noun.
*/
u3_noun
_serf_quac(quac* mas_u)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Perhaps you could condense _serf_quac and _serf_quacs to a single function that returns just a quac noun or a (list quac) depending on the len_w parameter?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm wary of a function that returns two different hoon types depending on its arg. Do you think that's ok?

Posting a bit of cleanup here rather than just submitting comments on
the PR.
Comment thread pkg/noun/allocate.c Outdated
- init len_w in quac, use null term'd list instead
- add spaces between arithmetic operators
- publicise _lord_writ_new() as u3_lord_writ_new()
- rename lord_writ_plan as u3_lord_writ_plan
- remove superfluous printfs
- misc tidying
@pkova pkova changed the base branch from develop to next/kelvin/410 August 13, 2024 10:46
@pkova pkova force-pushed the tinnus-mass branch 2 times, most recently from 3a32a21 to 4fa4d72 Compare August 13, 2024 15:56
@pkova pkova merged commit db15130 into next/kelvin/410 Aug 15, 2024
@pkova pkova deleted the tinnus-mass branch August 15, 2024 10:56
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