Chengjun Chen

Results 51 comments of Chengjun Chen

> A more appropriate strategy would be to initially establish a modest-sized mapping for the user heap, specifically USER_HEAP_INIT_SIZE, and directly resize this mapping as needed during 'brk' operations, with...

# Membench evaluated in commit https://github.com/jinzhao-dev/jinux/commit/f540345bfdee8eb372c8926603beddb25d793e58 - mmap_latency (the bar indicates the map size each time) mmap times = 1   | 4M | 16M | 64M -- | -- |...

Currently some tests (in ltp tests and gvisor tests) will be blocked due to the schedule and workqueue strategies. e.g. ```c // set a timer to send signals, which will...

> I think the core problem is that our writer (.fill(0)) is slow, which initializes a byte array at a time and do copy. I agree, the modification to take...

> Could you please try .fill(0u8) instead of .fill(0)? The former will be optimized to a single memset(ptr, 0, 4096) call, while the latter is a loop of memcpy(dst, src,...

> I was saying that in the absence of this PR, that is, only changing fill(0) to fill(0u8) is enough to enable SIMD optimization. It can be observed in objdump...

@junyang-zh After reading some articles, I think the zeroed page is needed and is not quite the same scenario as KSM. See the example provided in https://lwn.net/Articles/517465/ : ```c posix_memalign((void...

I have tried various versions of modifications. Now I agree with @junyang-zh perspective on the initialization of `VmFrame`. The current implementation of the `fill` method, although still noticeably slower than...

> Would it be better to use [is_aligned](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.is_aligned-1)? I agree. `aligned` only uses bit operations so it will be faster. The size of `T` will meets the requirement of `aligned`...

> It's too strict to ensure that self.cursor is aligned to size_of. For example, consider a type T with size 24 and alignment 8, it's OK to write 16 bytes...