Arthur Paulino
6a67807fd0
Implement `IdSet::iter_in`
...
This patch enables more expressive ways to slice and iterate over
the `Id`s in an `IdSet` with `IdSet::iter_in`, which takes an arbitrary
`IdSetSlicer`.
`IdSet::iter_in` efficiently slices out unintended inner parts and
then, within the remaining parts, skips inactive bits by using
`BitSlice::iter_ones` from the `bitvec` crate.
It also delivers several implementations of `IdSetSlicer` so OSTD
consumers can represent `Id` ranges ergonomically.
In the Asterinas kernel, `CpuSet::iter_in` enables a cleaner way to
define an interator that cycles over the CPUs.
2025-10-25 11:23:13 +08:00
Arthur Paulino
01d9b61337
Enhanced per-CPU load stats
...
This patch creates a `PerCpuLoadStats` with slightly enhanced, enough
to serve load stats and the load-balancing algorithm. This struct can
be further enhanced for more elaborated load-balancing algorithms in
the future.
The load stats report has been fixed, as `SchedulerStats::nr_queued_and_running`
no longer includes idle threads in the queued total nor in the running
threads.
Furthemore, the load-balancing algorithm has been improved because it
no longer accounts with the idle threads when they're enqueued.
2025-10-25 10:38:59 +08:00
jiangjianfeng
fe39a6803d
Unshare VM during execve
2025-10-25 10:36:30 +08:00
jiangjianfeng
caeec3cdc1
Unshare signal handler during execve
2025-10-25 10:36:30 +08:00
jiangjianfeng
207bfe30e2
Support multithreaded execve
2025-10-25 10:36:30 +08:00
Chen Chengjun
0a80d55c95
Support mount bind a file
2025-10-24 11:13:09 +08:00
Chen Chengjun
53a1268e19
Add mountinfo files to proc filesystem
2025-10-24 11:12:16 +08:00
Chen Chengjun
7b68571290
Support generating the mount infomation
2025-10-24 11:12:16 +08:00
Tate, Hongliang Tian
c44e45ea78
Add the `IdSet<I>` utility type
2025-10-22 14:29:52 +08:00
Ruihan Li
7e7ba43cdf
Revise some error messages
2025-10-22 14:05:38 +08:00
Ruihan Li
9ac0e31981
Implement better FS path APIs
2025-10-22 14:05:38 +08:00
Chen Chengjun
a22935f4c6
Correct the errno of waitid when the input pidfd is negative
2025-10-20 21:07:28 +08:00
Ruihan Li
8be8397a67
Make network callbacks and names related
2025-10-20 20:56:55 +08:00
Ruihan Li
582812ac92
Reorder `new_loopback` and `new_virtio`
2025-10-20 20:56:55 +08:00
Ruihan Li
74f23ce23d
Fix some `kill`-related behavior
2025-10-20 14:05:45 +08:00
Ruihan Li
75edabc557
Construct `SignalSenderIds` from `Context`
2025-10-20 14:05:45 +08:00
Ruihan Li
43f50c5e2a
Fix futex return values
2025-10-20 11:24:48 +08:00
Ruihan Li
52ddbeaff8
Use the `Arc<Waker>` address as the futex ID
2025-10-20 11:24:48 +08:00
Ruihan Li
34b4ad5e9b
Clean up visibility in `futex.rs`
2025-10-20 11:24:48 +08:00
jiangjianfeng
600446e9e1
Cleanup ThreadName related code
2025-10-20 10:52:07 +08:00
Chen Chengjun
782301c239
Remove open-related APIs from FsResolver
2025-10-17 16:18:56 +08:00
Chen Chengjun
c2ab393d57
Cleanup the lookup APIs of FsResolver
2025-10-17 16:18:56 +08:00
Wang Siyuan
3f2c319e00
Support `/proc/[pid]/mem` and `/proc/[pid]/task/[tid]/mem`
2025-10-15 16:34:32 +08:00
Wang Siyuan
ef5e0060d7
Support reading `InitStack` across pages
2025-10-15 16:34:32 +08:00
Wang Siyuan
c2adcf9944
Support accessing user spaces of other processes
2025-10-15 16:34:32 +08:00
Qingsong Chen
257b0c63b1
Fix ext2 block groups count
2025-10-14 13:20:06 +09:00
Ruihan Li
7b212a6a25
Check capabilities instead of the root
2025-10-13 14:21:27 +08:00
Chen Chengjun
07d2d1db02
Support MS_PRIVATE flag for mount
2025-10-13 13:30:06 +08:00
Chen Chengjun
2b18c893a8
Implement fixed_point module to replace the usage of fixed crate
2025-10-13 12:34:01 +08:00
Chen Chengjun
d2b4664078
Add a configfs usage example in ktest
2025-10-09 17:38:08 +08:00
Chen Chengjun
fc69af3e95
Support the basic configfs
2025-10-09 17:38:08 +08:00
Chen Chengjun
537f08d7cf
Make the cgroup systree independent
2025-10-09 17:38:08 +08:00
Ruihan Li
7319a7b173
Add wakeups after moving children
2025-10-07 11:43:02 +08:00
Ruihan Li
d50155661c
Lock run queues with IRQ disabled
2025-10-07 11:43:02 +08:00
Ruihan Li
56d78ab649
Fix some minor style issues
2025-10-06 14:46:23 +08:00
Ruihan Li
b4f66ab379
Fix free memory value in `meminfo`
2025-10-06 14:46:23 +08:00
Ruihan Li
78ff1a689b
Fix wrong formats in `{uid,gid}_map`
2025-10-06 14:46:23 +08:00
jiangjianfeng
d75a2481bb
Support /proc/pid/uid_map and /proc/pid/gid_map
2025-09-30 16:42:54 +08:00
Ruihan Li
d43fbd8f89
Fix some `getrandom` behavior
2025-09-30 11:36:37 +08:00
Ruihan Li
36a38c3f04
Bump `rand` version to 0.9.2
2025-09-30 11:36:37 +08:00
Ruihan Li
75f95cc1da
Remove some unnecessary `cfg_if` uses
2025-09-30 11:36:37 +08:00
Ruihan Li
b606e3456c
Don't panic if `set_child_tid` is invalid
2025-09-30 09:54:40 +08:00
Ruihan Li
6336bb9fc8
Fix races when finding the reaper
2025-09-30 09:54:40 +08:00
Ruihan Li
8be5465ace
Add more checks for `clone`
2025-09-30 09:54:40 +08:00
Zejun Zhao
294c55d0df
Fix `semid_ds`'s layout on non-x86_64 platforms
2025-09-29 23:46:01 +08:00
jiangjianfeng
702aa7d9ee
Support CLONE_PARENT flag
2025-09-29 13:27:22 +08:00
Zejun Zhao
899db770f6
Fix parameter passing of `preadv/pwritev`-family syscalls
2025-09-28 22:18:53 +08:00
Zejun Zhao
b183f9c06d
Fix `epoll_event`'s layout on non-x86_64 platforms
2025-09-28 22:16:19 +08:00
jiangjianfeng
6c544053af
Set the default domainname as `(none)`
2025-09-28 09:35:39 +08:00
jiangjianfeng
882dea6125
Add syscall setdomainname
2025-09-28 09:35:39 +08:00