Repository navigation
Conversation
开机后的宿主调度调优多做一步:对实例的 qemu 进程调用 SetProcessInformation(ProcessPowerThrottling),ControlMask 设 EXECUTION_SPEED、StateMask 清零,告诉 Windows 不要按后台任务降速(大小核 上会优先排到大核)。系统不支持(没有这个调用或返回 ERROR_INVALID_PARAMETER 之类)时记一句跳过,不算失败。MODAVD_QOS_BOOST=off 时跳过这一步,照 MODAVD_SYNC_IO、MODAVD_DL_DISK 的写法。结果进「宿主调度」那一行。 开机日志另记一行「宿主处理器核」,问题包加一节「处理器核的效率等级(大小核)」: GetLogicalProcessorInformationEx(RelationProcessorCore) 里各效率等级各有几个 核、几个逻辑处理器。处理器型号问题包「本机」一节已经有,不重复。 不改优先级、X3D 绑核,也不用处理器集合限制 vCPU(等数据)。 Refs ModAVD/ModAVD#290
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs ModAVD/ModAVD#290
改了什么
开机后的宿主调度调优里加一步:对实例的 qemu 进程调用
SetProcessInformation(ProcessPowerThrottling),ControlMask = EXECUTION_SPEED、StateMask = 0,明确告诉 Windows 不要对它做后台降速。优先级和 X3D 按缓存组绑核的逻辑没动。MODAVD_QOS_BOOST=off(和MODAVD_SYNC_IO=off、MODAVD_DL_DISK=off同一个约定)。为什么
转译 arm64 游戏吃的是单线程速度。模拟器经常无头或不在前台运行,Windows 11 对这类进程会降低调度的服务质量等级,在大小核处理器上倾向排到小核。现在管理器只处理了 X3D,没处理大小核。
这一条在大小核机器上还没有实测过:手上没有这种机器。这个 PR 做的是「不让系统降速」这一步和「把核的类型记进日志和问题包」,效果要等有大小核的人对比。
测试
go test ./...全过,go vet ./...、gofmt -l .干净;GOOS=linux、GOOS=darwin只做了编译检查。GetProcessInformation读回,确认从「未设置」变成「受控、不节流」;进程已退出时报错且不算「不支持」;环境变量开关和「不支持」时的降级;效率等级的汇总(单一等级、两个等级、多处理器组)。processthreadsapi.h、winnt.h核过。上机
没有单独上机。这一步在所有实例的开机路径上,放进下一版的发版回归一起测,看三处:
实例 N 宿主调度: 优先级高于正常,已关进程节流…和下一行实例 N 宿主处理器核: …。MODAVD_QOS_BOOST=off再开一次,那行变成「按 MODAVD_QOS_BOOST=off 不关进程节流」。没做的