Repository navigation
Add a uapi16 crate and stream manifests through it #19
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
Changes from all commits
d96a18e
798eb7a
e5e23d3
93fb679
2b6be68
8ecdc41
ca5fa81
244d2b5
22dbfe5
562c8c7
c9bcc12
7c79614
7f707d6
c9b15b0
0efb1bf
8fbc347
3882d91
eda5196
0acc72b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,7 +71,7 @@ RAW=$OUT/compare.tsv | |
| # valgrind. Inputs depend on FILES and UKI only, and are built once. | ||
| make_inputs() { | ||
| local stamp=$IN/.ready-$FILES-$UKI | ||
| [ -e "$stamp" ] && return | ||
| [ -e "$stamp" ] && [ -e "$IN/wide.manifest" ] && return | ||
| say "building inputs under $IN (FILES=$FILES UKI=$UKI)" | ||
| rm -rf "$IN"; mkdir -p "$IN" | ||
| # A subshell that stops at the first failure, so the stamp is only set | ||
|
|
@@ -116,6 +116,8 @@ make_inputs() { | |
| tr '\036' '\n' < "$IN/esp.manifest" | grep '"size":' | sed -E 's/.*"name":"([^"]*)".*/\1/' | | ||
| while IFS= read -r n; do cat "$e/$n"; done > "$IN/esp.blob" | ||
| [ -s "$IN/esp.blob" ] || { say "empty blob"; exit 1; } | ||
| # The manifest of the wide tree, for a plan that reads nothing else. | ||
| "$HEAD" manifest "$IN/wide" > "$IN/wide.manifest" | ||
| # An empty file system of 256 MiB, the target of populate, and one | ||
| # holding the wide tree, the input of check. Both are made once, by | ||
| # the head binary, so that both binaries see the same bytes. | ||
|
|
@@ -140,9 +142,11 @@ fresh_image() { cp --sparse=always "$IN/empty.img" "$IMG/target.img"; } | |
| no_image() { rm -f "$IMG/target.img"; } | ||
| empty_image() { rm -f "$IMG/target.img" && : > "$IMG/target.img"; } | ||
| nothing() { :; } | ||
| ASM=(assemble --create --sector-size 512 --identifier 1234abcd --label ESP) | ||
| # The file systems get a size: one both binaries make the same way whether | ||
| # or not they size to fit on their own. | ||
| ASM=(assemble --create --size 64M --sector-size 512 --identifier 1234abcd --label ESP) | ||
| POPULATE='{"image":{"fileDescriptor":0},"path":"/","content":{"sourceFileDescriptor":1}}' | ||
| ASSEMBLE='{"image":{"fileDescriptor":0},"content":{"manifest":{"fileDescriptor":1},"sourceFileDescriptor":2},"options":{"sectorSize":512,"identifier":"1234-ABCD","label":"ESP"}}' | ||
| ASSEMBLE='{"image":{"fileDescriptor":0,"size":67108864},"content":{"manifest":{"fileDescriptor":1},"sourceFileDescriptor":2},"options":{"sectorSize":512,"identifier":"1234-ABCD","label":"ESP"}}' | ||
| workloads() { | ||
| local r=$1 | ||
| $r assemble/esp no_image -- @UFAT@ "${ASM[@]}" "$IMG/target.img" "$IN/esp" | ||
|
|
@@ -153,6 +157,7 @@ workloads() { | |
| $r check/wide nothing -- @UFAT@ check "$IN/wide.img" | ||
| $r manifest/esp nothing -- @UFAT@ manifest "$IN/esp" | ||
| $r manifest/wide nothing -- @UFAT@ manifest "$IN/wide" | ||
| $r plan/wide-manifest nothing -- @UFAT@ assemble --plan --sector-size 512 --manifest "$IN/wide.manifest" | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not for this series, but for later: what this series is for, a large manifest streamed through a pipe while the volume is written, isn't benchmarked. The only streamed assembly is assemble/esp-stream with a few dozen records, and this plan reads a regular file and writes nothing. An assemble/wide-manifest-stream workload (the wide tree's manifest and its contents through pipes like the ESP case) and a check that runs it at two sizes, say FILES=10000 and FILES=100000, and fails when the peak RSS grows with the number of records would cover it. At 10000 records memory that grows per record doesn't show. |
||
| $r varlink/Populate-wide fresh_image --ufat @UFAT@ --method org.uapi-group.FileSystem.Populate \ | ||
| --fd "rw:$IMG/target.img" --fd "$IN/wide" --params "$POPULATE" | ||
| $r varlink/Assemble-esp-stream empty_image --ufat @UFAT@ --method org.uapi-group.FileSystem.Assemble \ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.