Add downstream patch for wait ack in free page hinting#19
Add downstream patch for wait ack in free page hinting#19kalyazin wants to merge 5 commits intoe2b-dev:mainfrom
Conversation
PR SummaryMedium Risk Overview A new downstream patch for Reviewed by Cursor Bugbot for commit 1baa63b. Bugbot is set up for automated code reviews on this repo. Configure here. |
Four folded changes, all aimed at making the build loop safe to run when source files have been mutated by a previous iteration and producing clear errors when tag resolution fails: * Replace `git checkout <tag>` with `git reset --hard <tag>` followed by `git clean -fdx` (extracting the tag into a local variable). * Bail with a clear error if `get_tag` finds no matching tag, so the build doesn't fall through to `git reset --hard ""`. * Move the config copy to after the reset so it isn't clobbered by `git clean`. * Drop the now-redundant `make distclean || true` at the top of the script — `git clean -fdx` inside `build_version` strictly subsumes it. Behavior is identical for the no-patches case (the tag tree is unchanged so reset is a no-op). Prep work for applying out-of-tree patches. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Nikita Kalyazin <nikita.kalyazin@e2b.dev>
Add a `patches/<kernel-version>/` mechanism: any .patch files placed in that directory are applied with `git apply` after the source tree is reset to the kernel tag and the .config is copied into place, before `make olddefconfig`. Versions without a patch directory are built unmodified, so this commit is a no-op until patches are added. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Nikita Kalyazin <nikita.kalyazin@e2b.dev>
Pull in commit b90e190a95c2 ("virtio_balloon: Support wait on ACK for
hinting") by Jack Thomson <jackabt@amazon.com>. Adds a new virtio
feature flag VIRTIO_BALLOON_F_HINT_WAIT_ON_ACK that makes the driver
wait for device ACK before adding hinted ranges to the free_page_list,
enabling MADV_DONTNEED-based RSS reduction. Trades ~30% hinting
duration overhead for the synchronisation guarantee. Applied only to
6.1.158 (the only fc-kernels version we currently want this on).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Nikita Kalyazin <nikita.kalyazin@e2b.dev>
Reflow prose paragraphs and bullet items to ≤80 columns. No content changes; code blocks and URLs are left intact (the markdown link to model.go remains on a single line). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Nikita Kalyazin <nikita.kalyazin@e2b.dev>
Explain where out-of-tree patches live, when they are applied during the build, and the workflow for adding a new patch via `git format-patch`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Nikita Kalyazin <nikita.kalyazin@e2b.dev>
fixed in 7aba4fc |
In order to avoid potential corruption of guest pages due to a race condition under memory pressure in the guest, apply patch when building the kernel.