Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
e8779ce
feat(fs): add LoongArch vda2 device alias
a6d9a6m Jun 27, 2026
63fd74c
feat(vfs): add clean page cache
a6d9a6m Jun 27, 2026
8e3abc5
fix(tmpfs): harden page storage semantics
a6d9a6m Jun 27, 2026
dc5e04e
feat(ext4): use VFS page cache for reads
a6d9a6m Jun 27, 2026
1686ee9
fix(ext4): invalidate page cache on mutations
a6d9a6m Jun 27, 2026
aa8d52a
test(mm): cover file-backed mmap page cache
a6d9a6m Jun 27, 2026
e37e2f0
perf(vfs): improve directory iteration for cp -r
a6d9a6m Jun 27, 2026
26002e8
fix(syscall): support fchmodat compatibility
a6d9a6m Jun 27, 2026
ef3606a
merge(cache): merge feat/cache-dev into ccy-dev02
a6d9a6m Jun 27, 2026
c34306d
refactor(vfs): split cached page storage from cache index
a6d9a6m Jun 27, 2026
284bcf0
feat(vfs): add frame-backed cached page type
a6d9a6m Jun 27, 2026
f906adc
feat(vfs): add get-or-fill clean page API
a6d9a6m Jun 27, 2026
2403342
test(vfs): cover frame-backed page cache boundaries
a6d9a6m Jun 27, 2026
85f7e45
feat(ext4): fill clean page cache frames on read miss
a6d9a6m Jun 27, 2026
8b35ea2
fix(ext4): preserve frame-backed cache invalidation
a6d9a6m Jun 27, 2026
4d4b164
test(mm): keep mmap file load coherent with frame cache
a6d9a6m Jun 27, 2026
c8b9ad5
perf(vfs): expose page cache frame stats
a6d9a6m Jun 27, 2026
54a30f3
test(vfs): pin page cache range invalidation boundaries
a6d9a6m Jun 27, 2026
af784ac
feat(vfs): refresh clean cached page ranges
a6d9a6m Jun 27, 2026
4ba7811
feat(ext4): refresh clean cache after successful write
a6d9a6m Jun 27, 2026
6e2cd70
test(ext4): cover precise cached write coherence
a6d9a6m Jun 27, 2026
859d244
feat(ext4): invalidate truncate cache ranges precisely
a6d9a6m Jun 27, 2026
5018c47
test(ext4): cover cached truncate resizing
a6d9a6m Jun 27, 2026
0ddfc28
test(ext4): cover inode lifecycle cache coherence
a6d9a6m Jun 27, 2026
b4f9ee0
fix(task): avoid wait4 sleep when there are no children
a6d9a6m Jun 27, 2026
95e09b6
test(mm): keep mmap sync coherent with precise write cache
a6d9a6m Jun 27, 2026
0db5364
merge(cache): merge feat/cache-dev into ccy-dev02
a6d9a6m Jun 27, 2026
230841e
fix(oscomp): align test image boot paths
a6d9a6m Jun 27, 2026
6236827
fix(wait): encode signal exits in wait status
a6d9a6m Jun 27, 2026
6d4345d
fix(mm): add memlock syscall compatibility
a6d9a6m Jun 27, 2026
5257d33
fix(compat): add cyclictest compatibility hooks
a6d9a6m Jun 27, 2026
aac06ba
test(ltp): run full LTP wrapper from rcS
a6d9a6m Jun 27, 2026
0038e83
fix(net): return Linux bind address errors
a6d9a6m Jun 28, 2026
6ab12f6
fix(libc): improve syscall compatibility
a6d9a6m Jun 28, 2026
40969bf
merge(libc): merge fix-libc-test-scripts into ccy-dev02
a6d9a6m Jun 28, 2026
11ea465
net: drop task lock before Unix socket bind
a6d9a6m Jun 28, 2026
596741b
net: return EOPNOTSUPP for accept on UDP sockets
a6d9a6m Jun 28, 2026
f96f58f
procfs: add writable dynamic proc inode support
a6d9a6m Jun 28, 2026
6e7bfd4
procfs: implement per-process oom_score_adj
a6d9a6m Jun 28, 2026
fb7c405
procfs: implement per-process oom_score
a6d9a6m Jun 28, 2026
a2e1b9d
fix:确定不卡死的脚本范围
a6d9a6m Jun 28, 2026
84850e7
fix(net): drop task lock before bind address parsing
a6d9a6m Jun 28, 2026
91cae25
fix(vfs): honor dup_from minimum fd
a6d9a6m Jun 28, 2026
06ce0ed
fix(vfs): invalidate clean page cache on writes
a6d9a6m Jun 28, 2026
6694f27
fix(procfs): align oom score accounting
a6d9a6m Jun 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ LOCAL_TESTIMG_DIR ?= ../CCYOS
TESTIMG_RV ?= $(firstword $(wildcard $(LOCAL_TESTIMG_DIR)/sdcard-rv.img sdcard-rv.img))
TESTIMG_LA ?= $(firstword $(wildcard $(LOCAL_TESTIMG_DIR)/sdcard-la.img sdcard-la.img))
RV_TEST_DRIVE := -drive file=$(TESTIMG_RV)$(COMMA)if=none$(COMMA)format=raw$(COMMA)id=test0 -device virtio-blk-device$(COMMA)drive=test0$(COMMA)bus=virtio-mmio-bus.0
LA_TEST_DRIVE := -drive file=$(TESTIMG_LA)$(COMMA)if=none$(COMMA)format=raw$(COMMA)id=test0 -device virtio-blk-pci$(COMMA)drive=test0
LA_TEST_DRIVE := -drive file=$(TESTIMG_LA)$(COMMA)if=none$(COMMA)format=raw$(COMMA)id=x0 -device virtio-blk-pci$(COMMA)drive=x0

# 评测构建 profile:默认 release(提交用)。本地调试可 `make all PROFILE=debug`。
PROFILE ?= release
Expand Down Expand Up @@ -141,11 +141,11 @@ disk-la.img: kernel-la $(VFAT_IMG) $(ASSEMBLE_DISK)
@$(ASSEMBLE_DISK) $(OS_DIR)/fs-loongarch.img $(VFAT_IMG) $@

# ------------------------------------------------------------
# 本地运行评测形态:我们的 MBR 分区盘作为 /dev/vda(vda1=rootfs,vda2=VFAT);
# 官方测试盘作为额外裸 ext4 块设备 /dev/vdb,由 rcS 挂载到 /tests。
# 本地运行评测形态:官方测试盘作为额外裸 ext4 块设备,由 rcS 挂载到 /tests。
# RISC-V virtio-mmio 设备树按高地址先探测,因此我们的分区盘放 bus.1,
# 官方测试盘放 bus.0,注册出来才是 vda=disk、vdb=sdcard。
# 设备型号对齐 os/qemu-run.sh(riscv: virtio-mmio)与 os/qemu-loongarch-run.sh(loongarch: pci)。
# LoongArch 评测命令先挂官方测试盘、后挂 disk-la.img,因此 la 下是
# vda=sdcard-la.img、vdb=disk-la.img、vdb1=rootfs。
# ------------------------------------------------------------
run-rv: kernel-rv disk.img
@if [ -z "$(TESTIMG_RV)" ]; then \
Expand All @@ -165,12 +165,12 @@ run-la: kernel-la disk-la.img
echo "Error: no LoongArch test image found. Set TESTIMG_LA=/path/to/sdcard-la.img" >&2; \
exit 1; \
fi
@echo "[Run] 运行 LoongArch QEMU(内核盘:vda1 rootfs,vda2 VFAT;测试盘:vdb)"
@echo "[Run] 运行 LoongArch QEMU(测试盘:vda;内核盘:vdb1 rootfs,vdb2 VFAT)"
qemu-system-loongarch64 -machine virt -kernel kernel-la -m $(LA_MEM) -nographic \
-smp $(LA_SMP) -no-reboot -rtc base=utc \
-drive file=disk-la.img,if=none,format=raw,id=x0 \
-device virtio-blk-pci,drive=x0 \
$(LA_TEST_DRIVE) \
-drive file=disk-la.img,if=none,format=raw,id=x1 \
-device virtio-blk-pci,drive=x1 \
-device virtio-net-pci,netdev=net0 \
-netdev user,id=net0,hostfwd=tcp::5555-:5555,hostfwd=udp::5555-:5555

Expand Down
8 changes: 4 additions & 4 deletions data/loongarch_musl/etc/init.d/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ mount_official_test_image_if_present() {

# Official test images are raw ext4 filesystems whose root contains
# /musl and /glibc. Mounting one at /tests exposes /tests/musl.
dev="/dev/vdb"
dev="/dev/vda"
[ -e "$dev" ] || return 1

echo "[Tests] probing official test image on $dev"
Expand All @@ -71,8 +71,8 @@ mount_official_test_image_if_present() {
/bin/umount /tests 2>/dev/null || true
fi

# Old multi-device probe disabled. The run scripts attach the official
# input image at /dev/vdb; our own partitioned kernel disk is /dev/vda.
# Old multi-device probe disabled. The LoongArch judge attaches the official
# input image at /dev/vda; our own partitioned kernel disk is /dev/vdb.
# for dev in \
# /dev/vdb \
# /dev/vda \
Expand Down Expand Up @@ -116,7 +116,7 @@ stage_musl_tests_to_tmpfs() {
;;
esac

if ! /bin/cp -a "$entry" "$dst/"; then
if ! /bin/cp -R "$entry" "$dst/"; then
echo "[Tests] failed to stage $entry"
/bin/rm -rf "$dst"
return 1
Expand Down
15 changes: 8 additions & 7 deletions data/risc-v_musl/etc/init.d/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ stage_musl_tests_to_tmpfs() {
;;
esac

if ! /bin/cp -a "$entry" "$dst/"; then
if ! /bin/cp -R "$entry" "$dst/"; then
echo "[Tests] failed to stage $entry"
/bin/rm -rf "$dst"
return 1
Expand All @@ -127,8 +127,8 @@ stage_musl_tests_to_tmpfs() {
}

run_musl_tests_if_present() {
# 官方测试镜像挂载到 /tests 后,自动扫描并运行 musl 下的全部测试脚本;
# glibc 分组保留在测试镜像中,后续需要时直接调整本脚本
# 官方测试镜像挂载到 /tests 后,自动扫描 musl 下的全部测试脚本;
# 需要排除的脚本维护在 skip-list 中
mount_official_test_image_if_present || true
[ -d /tests/musl ] || return 1

Expand All @@ -143,9 +143,9 @@ run_musl_tests_if_present() {
echo "[Tests] detected musl test scripts; running in rcS"

if [ -n "$staged_musl_dir" ]; then
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:$staged_musl_dir:/tests/musl"
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:$staged_musl_dir:/tests/musl:/tests/musl/ltp/testcases/bin"
else
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/tests/musl"
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/tests/musl:/tests/musl/ltp/testcases/bin"
fi
export TMPDIR="/tmp"
export HOME="/"
Expand All @@ -155,8 +155,9 @@ run_musl_tests_if_present() {

base="${src_f##*/}"
case "$base" in
unixbench_testcode.sh|lmbench_testcode.sh|libcbench_testcode.sh|libctest_testcode.sh)
echo "[Tests] skipping already-validated $src_f"
ltp_testcode.sh|\
unixbench_testcode.sh)
echo "[Tests] skipping $src_f"
continue
;;
esac
Expand Down
2 changes: 1 addition & 1 deletion os/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub const USER_SIGRETURN_TRAMPOLINE: usize =
align_down(<ArchImpl as VirtualMemory>::USER_TOP, PAGE_SIZE);

/// Maximum heap size (prevent OOM)
pub const MAX_USER_HEAP_SIZE: usize = 64 * 1024 * 1024; // 64MB
pub const MAX_USER_HEAP_SIZE: usize = 128 * 1024 * 1024; // 128MB

pub const DEFAULT_MAX_FDS: usize = 256;

Expand Down
Loading
Loading