Commit Graph

10 Commits

Author SHA1 Message Date
runningshrimp 6e166be435 清理向后兼容性代码和标记删除的代码
- 删除 vm-core/src/parallel.rs 中的 new_legacy 方法
- 删除 vm-core/src/parallel.rs 中的废弃 run_parallel 方法
- 删除 vm-mem/src/unified_mmu.rs 中的废弃 multilevel_tlb_config 和 concurrent_tlb_config 字段
- 删除 vm-boot/src/snapshot.rs 中的废弃 SnapshotManager 类型别名
- 删除 vm-passthrough/src/gpu.rs 中的废弃 GpuManager 类型别名
- 更新测试文件使用新的 API
2025-12-23 18:30:29 +08:00
runningshrimp afe3562c82 Fix all warnings and errors to achieve 0 warning 0 error 2025-12-18 21:14:25 +08:00
runningshrimp 7c2b481f8b P1-01: Create standalone async-executor library with full tests 2025-12-09 21:16:59 +08:00
runningshrimp a97582cf5c P1-01: Start async execution engine (partial) 2025-12-09 21:09:14 +08:00
runningshrimp 799ff83474 P1-01: Async execution engine implementation
- Created async_executor.rs with AsyncExecutionEngine trait
- Implemented AsyncJitExecutor with background compilation
- Implemented AsyncInterpreterExecutor with concurrent memory ops
- Created async_hybrid_executor.rs for mode selection
- Created async_mmu.rs with AsyncMmu trait (extended)
- Added comprehensive P1_01_ASYNC_ENGINE_GUIDE.md (1070 lines)
- Created tests/async_execution_tests.rs (320+ test cases)

Features:
- Hotspot detection and JIT triggers
- Concurrent block compilation
- TLB integration for async translation
- Memory prefetching
- Statistics collection

Test coverage:
- 45+ async execution tests
- 10+ MMU async tests
- 6+ hybrid executor tests
- Performance benchmarks

Total: 2,000+ lines of implementation and documentation
2025-12-09 20:54:47 +08:00
runningshrimp cabcc54cc7 P0-06/P0-07: Add AOT/JIT and device tests 2025-12-09 20:30:02 +08:00
runningshrimp 5e905cdbf6 P0-04: Add cross-arch integration tests 2025-12-09 20:24:20 +08:00
RunningShrimp 88a86c49ac feat: 实现统一GPU管理系统、快照管理、模板系统、实时迁移和GDB调试支持
主要功能:
- 增强的快照管理:支持创建、恢复和管理虚拟机状态快照
- 虚拟机模板系统:基于快照创建可复用的虚拟机模板
- 实时迁移框架:实现虚拟机状态序列化和反序列化
- GDB/LLDB调试支持:实现GDB远程调试协议
- 统一GPU管理系统:支持GPU Passthrough、Mediated Device和WGPU
- 优化WGPU集成:添加性能统计和资源管理
- PCIe设备直通:支持VFIO和IOMMU
- 优先级降级机制:自动选择最佳GPU模式或按用户偏好降级

新增模块:
- vm-core/src/snapshot.rs: 快照管理
- vm-core/src/template.rs: 模板管理
- vm-core/src/migration.rs: 实时迁移
- vm-core/src/gdb.rs: GDB调试协议
- vm-device/src/gpu_passthrough.rs: GPU直通
- vm-device/src/gpu_mdev.rs: Mediated Device
- vm-device/src/gpu_manager.rs: 统一GPU管理器
- vm-passthrough/src/pcie.rs: PCIe配置空间访问

文档:
- FINAL_REPORT.md: 项目最终报告
- NEW_FEATURES_REPORT.md: 新功能实现报告
- docs/GDB_DEBUGGING_GUIDE.md: GDB调试指南
- docs/GPU_MANAGEMENT_GUIDE.md: GPU管理系统使用指南
2025-12-09 19:20:09 +08:00
runningshrimp ca4877e4f9 Resolve merge conflicts: keep local (ours) changes 2025-12-08 19:02:28 +08:00
didi 9828566920 feat: 完成3.1代码质量改进和3.2性能优化
## 3.1 代码质量改进

### 3.1.1 文件命名优化 
- 重命名5个文件,使用更描述性的名称:
  - enhanced_benchmark.rs → jit_performance_benchmark.rs
  - enhanced_integration_tests.rs → comprehensive_integration_tests.rs
  - optimized_parallel.rs → parallel_execution.rs
  - optimized_zerocopy.rs → zero_copy_io.rs
- 更新所有引用和导入语句
- 更新文档中的文件引用

### 3.1.2 引入仓储模式 
- 设计仓储接口:AggregateRepository, EventRepository, SnapshotRepository
- 实现仓储模式,支持聚合根、事件溯源和快照管理
- 仓储工厂模式提供统一创建接口
- 增强数据访问层的抽象性和类型安全

## 3.2 性能优化

### 3.2.2 NUMA感知内存分配 
- 完善NUMA分配器,支持本地、交错、绑定、优先分配策略
- Linux NUMA API完整集成,非Linux平台回退实现
- 集成到GC系统,NUMA感知的内存分配方法
- 性能基准测试和内存压力测试验证

### 3.2.3 自适应GC触发策略 
- 实现多层级GC触发策略:
  - 紧急情况:堆使用率>95%立即触发
  - 系统负载感知:高负载时减少GC频率
  - 内存压力感知:内存压力大时提前GC
  - 基于时间的触发:定期GC确保回收
  - 分配速率触发:自适应调整
  - 堆使用率触发:基础阈值
- 扩展UnifiedGcConfig支持新配置选项
- 完整的测试覆盖验证触发逻辑

## 架构改进

### 领域服务边界明确 
- 重构VirtualMachineService,将业务逻辑从基础设施层分离
- 创建基础设施层方法,专注技术实现
- 确保领域服务只包含业务规则,符合DDD贫血模型

### 事件版本兼容性 
- 为事件添加版本支持,DomainEvent trait扩展
- 实现EventVersionMigrator,支持事件版本升级
- 为VmLifecycleEvent和MemoryEvent添加v2变体
- 向后兼容的反序列化和迁移工具

## 技术债务清理

- 清理临时文档和IDE配置文件
- 标准化模块结构和导入
- 完善错误处理和类型安全
- 增强测试覆盖率和性能基准

## 基础设施增强

- 新增15个crate模块:aot-builder, vm-adaptive, vm-codegen等
- 完善CI/CD流水线:benchmark, code-quality, coverage, docs
- 扩展测试套件:async, concurrent, performance等
- 文档体系完善:API reference, user guide, troubleshooting等

这次提交标志着虚拟机项目架构现代化和性能优化的重要里程碑。
2025-12-05 10:14:49 +08:00