[PATCH Mach] kern: Comment fixed

2024-12-23 Thread Zhaoming Luo
Read also: https://mail.gnu.org/archive/html/bug-hurd/2024-12/msg00219.html Signed-off-by: Zhaoming Luo --- kern/mach_clock.c | 2 +- kern/mach_clock.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kern/mach_clock.c b/kern/mach_clock.c index 4b953650..24609353 100644 ---

[PATCH Mach] kern: Add a mach host operation which returns elapsed time since bootup

2024-12-23 Thread Zhaoming Luo
Add host_get_uptime64() mach interface operation. It can be used to get the time passed since the boot up. * doc/mach.texi: Add the documentation for the operation * include/mach/mach_host.defs: Add the interface * include/mach/time_value.h: Extend the mappable time variable * kern/mach_clock.c: O

[PATCH gnumach v1] Implement per task virtual memory limit

2024-12-23 Thread dnietoc
From: Diego Nieto Cid This is the first iteration of the patch. I incorporated the suggestions made by Sergey is his review. I also used the implementation of the vm_set_size_limit based on the host port being the reciever of the RPC (that Sergey sent to the other thread). There remains a TODO

Re: [RFC PATCH] Implement per task virtual memory limit

2024-12-23 Thread Diego Nieto Cid
On Mon, Dec 23, 2024 at 10:11:10AM +0300, Sergey Bugaev wrote: > > + > > + vm_map_lock(parent_task->map); > > + vm_map_copy_limits(parent_task->map, new_task->map); > > + vm_map_unlock(parent_task->map); > > Should this instead be done as a part of vm_map_

Re: [RFC PATCH] Implement per task virtual memory limit

2024-12-23 Thread Diego Nieto Cid
On Mon, Dec 23, 2024 at 10:09:35AM -0300, Diego Nieto Cid wrote: > > > > No, this would lock/unlock the map twice. Rather see if you can do the > > check after the map is already locked, perhaps right before "See > > whether we can avoid creating a new entry ...". > > > > At that point vm_map_fin