tangruize

Results 29 comments of tangruize

The new scheduler also causes `cpu_affinity` to fail (Maybe we can add a cpu affinity regression ktest). Test patch (run with `make run SMP=2`): ```diff diff --git a/kernel/src/lib.rs b/kernel/src/lib.rs index...

I tried to add a testcase, but it requires making some methods in `wait.rs` public. Below is the testcase patch: Click to show the testcase ```diff commit b4d176e29c050693af2d3d9e4ddd9e46b682ecf0 Author: Ruize...

`wake_all()` when dropping an upgradable reader can be replaced with `wake_one()`. This is because if there are waiters, they are either writers or upgradable readers. Regular readers have already been...

@lrh2000 Agreed, it seems overkill for this simple fix.

`vmo/mod.rs` triggers the assertion: https://github.com/asterinas/asterinas/blob/4658b62f90ec326fa4a0054f3a44e8ab70b1e7f7/kernel/src/vm/vmo/mod.rs#L157 A spinlock is held here: https://github.com/asterinas/asterinas/blob/4658b62f90ec326fa4a0054f3a44e8ab70b1e7f7/kernel/src/vm/vmar/vm_mapping.rs#L346 Logs ```txt [ 8.617] ERROR: Uncaught panic: This function might break atomic mode (preempt_count = 3, is_local_irq_enabled = true)...

I wrote a simple script to analyze and find potential mutex misuses (too naive for now): 1. https://github.com/asterinas/asterinas/blob/96a153dfc5fda6ac8652c1da149562037200939b/kernel/src/fs/procfs/pid/fd.rs#L66-L67 2. https://github.com/asterinas/asterinas/blob/96a153dfc5fda6ac8652c1da149562037200939b/ostd/src/arch/x86/irq.rs#L152-L154

### To reproduce ``` git apply patch.diff cd ostd cargo osdk test test_rwmutex_upreader_drop_lost_wakeup ``` Click to show the `patch.diff` file ```diff diff --git a/ostd/src/sync/rwmutex.rs b/ostd/src/sync/rwmutex.rs index 31b34bb5..bc72dcec 100644 --- a/ostd/src/sync/rwmutex.rs...

I reproduced this issue and issue #18: 1. Apply this patch to `raft.tla` (adds two properties from [Microsoft CCF](https://github.com/microsoft/CCF/blob/44904a3d2aa706ede510363810e734cbfcbb62e6/tla/consensus/ccfraft.tla#L1555-L1572) project for issue 18 and issue 19, and comments out `Dup`/`Drop`/`Restart`...