Page MenuHomeFreeBSD

cyril_freebsdfoundation.org (Cyril Zhang)
User

Projects

User does not belong to any projects.

User Details

User Since
May 3 2021, 7:40 PM (187 w, 15 h)

Recent Activity

Aug 20 2021

cyril_freebsdfoundation.org updated the diff for D31615: vmm: Add credential to /dev/vmm.io cdev.

Simplify code.

Aug 20 2021, 5:59 PM

Aug 19 2021

cyril_freebsdfoundation.org requested review of D31615: vmm: Add credential to /dev/vmm.io cdev.
Aug 19 2021, 8:06 PM

Aug 18 2021

cyril_freebsdfoundation.org updated the diff for D31570: vmm: Add memlock rlimit and racct limit.

Moved a calculation out of a locked area.

Aug 18 2021, 8:14 PM

Aug 16 2021

cyril_freebsdfoundation.org requested review of D31570: vmm: Add memlock rlimit and racct limit.
Aug 16 2021, 7:40 PM

Aug 12 2021

cyril_freebsdfoundation.org updated the diff for D31325: vmm: Add new device file that handles creation/destruction of VMs.

Add a "persistent" flag to allow some vmmctl-created VMs to not be automatically destroyed when the file descriptor is closed. This allows /dev/vmmctl to be used with bhyveload as well. I also added some padding to the ioctl structs for future-proofing.

Aug 12 2021, 9:52 PM
cyril_freebsdfoundation.org added a comment to D31326: bhyve: Use new /dev/vmmctl device file to create VM objects.

There is a problem with this revision. If you try to reboot a VM, the error message "vm_open: Device not configured" appears. The problem is that rebooting works as follows: The bhyve process exits with exit code 0, which tells the caller (such as vmrun.sh), to call bhyve again. Since the bhyve process exited, the VM is destroyed, but this is an asynchronous action. So when the bhyve process is called again almost instantly, the VM likely has not yet been destroyed, so a new VM cannot be created.

Aug 12 2021, 4:16 PM

Aug 3 2021

cyril_freebsdfoundation.org updated the diff for D31325: vmm: Add new device file that handles creation/destruction of VMs.

Fix some style issues, and update max length of VM name accordingly due to changes in commit df95cc76affb.

Aug 3 2021, 10:18 PM

Jul 30 2021

cyril_freebsdfoundation.org updated the diff for D31326: bhyve: Use new /dev/vmmctl device file to create VM objects.

To simplify code, do not try to create a vm in the non-bootrom case, since we expect it to be created already, so non-existence will be caught in the call to vm_open. Note that an error message has been removed; if it is still necessary then I can add an explicit check in the non-bootrom case.

Jul 30 2021, 8:15 PM
cyril_freebsdfoundation.org updated the diff for D31156: vmm: Add credential to cdev object.

Made a mistake in the last diff - accidentally omitted the test files.

Jul 30 2021, 6:23 PM
cyril_freebsdfoundation.org updated the diff for D31156: vmm: Add credential to cdev object.

Simplify the loop in vmmdev_lookup.

Jul 30 2021, 6:21 PM

Jul 29 2021

cyril_freebsdfoundation.org updated the diff for D31326: bhyve: Use new /dev/vmmctl device file to create VM objects.

Fallback to old method if /dev/vmmctl cannot be opened.

Jul 29 2021, 9:54 PM
cyril_freebsdfoundation.org updated the diff for D31325: vmm: Add new device file that handles creation/destruction of VMs.

Fix some style issues, fix bug where string from userspace was not strnlen'd, move device file setup, cleanup code into vmmdev_init and vmmdev_cleanup (which causes some code to be shifted around in the file).

Jul 29 2021, 9:11 PM

Jul 27 2021

cyril_freebsdfoundation.org retitled D30859: racct: Add racct_add_cred_checked from racct: Make racct_add_cred adhere to rctl limits to racct: Add racct_add_cred_checked.
Jul 27 2021, 9:02 PM
cyril_freebsdfoundation.org updated the diff for D30775: uipc_shm: Add racct support .

Use new racct_add_cred_checked function instead of racct_add on resize. This is the correct behaviour, since a process might be able to resize a shared memory object that was created by a different process.

Jul 27 2021, 9:00 PM
cyril_freebsdfoundation.org updated the diff for D30859: racct: Add racct_add_cred_checked.

Remove whitespace.

Jul 27 2021, 8:57 PM
cyril_freebsdfoundation.org updated the diff for D30949: racct: Add some tests.

Remove unnecessary quoting and ignore error messages.

Jul 27 2021, 8:53 PM
cyril_freebsdfoundation.org abandoned D30632: racct: Remove factor in pcpu estimate.

Closing this revision because it is incorrect.

Jul 27 2021, 7:58 PM
cyril_freebsdfoundation.org updated the summary of D31325: vmm: Add new device file that handles creation/destruction of VMs.
Jul 27 2021, 7:17 PM
cyril_freebsdfoundation.org requested review of D31326: bhyve: Use new /dev/vmmctl device file to create VM objects.
Jul 27 2021, 7:05 PM
cyril_freebsdfoundation.org requested review of D31325: vmm: Add new device file that handles creation/destruction of VMs.
Jul 27 2021, 7:01 PM

Jul 21 2021

cyril_freebsdfoundation.org updated the diff for D31225: vmm: Destroy associated VM objects when a jail is destroyed.

Fixed minor issues and merged test case files.

Jul 21 2021, 7:12 PM

Jul 19 2021

cyril_freebsdfoundation.org requested review of D31225: vmm: Destroy associated VM objects when a jail is destroyed.
Jul 19 2021, 11:24 PM
cyril_freebsdfoundation.org updated the diff for D31156: vmm: Add credential to cdev object.

Move the credential check to vmmdev_lookup. Note that this means the error code will be EINVAL in sysctl_vmm_destroy, rather than EPERM.

Jul 19 2021, 10:50 PM

Jul 16 2021

cyril_freebsdfoundation.org updated the diff for D31156: vmm: Add credential to cdev object.

Check that vmm module is loaded before running tests.

Jul 16 2021, 8:20 PM

Jul 14 2021

cyril_freebsdfoundation.org updated the diff for D31156: vmm: Add credential to cdev object.

Add copyright notices to test files.

Jul 14 2021, 7:45 PM
cyril_freebsdfoundation.org updated the diff for D30949: racct: Add some tests.

Adds copyright notices.

Jul 14 2021, 7:32 PM

Jul 13 2021

cyril_freebsdfoundation.org updated the diff for D31156: vmm: Add credential to cdev object.

Add a credential to the softc struct as well. Also add some basic tests.

Jul 13 2021, 9:26 PM

Jul 12 2021

cyril_freebsdfoundation.org requested review of D31156: vmm: Add credential to cdev object.
Jul 12 2021, 7:59 PM
cyril_freebsdfoundation.org added a reviewer for D31156: vmm: Add credential to cdev object: markj.
Jul 12 2021, 7:59 PM

Jul 6 2021

cyril_freebsdfoundation.org updated the diff for D30878: racct: New scheme for calculating pctcpu .

Addresses style issues. Also removes racct_propagate_pcpu, which was meant to update pcpu on process exit. Removes p_prev_runtime from the process struct, as it is no longer used. Also sets pcpu to zero on process exit (for zombie processes, carrying over behaviour from old pcpu scheme).

Jul 6 2021, 10:19 PM
cyril_freebsdfoundation.org updated the diff for D30949: racct: Add some tests.

I have added a test for cputime and pcpu which takes 4 seconds to complete. Since it is a loop that executes another process, the calculations involved are inexact (compared to a loop that simply spins) and we cannot expect a precise value for these measurements.

Jul 6 2021, 8:37 PM

Jul 4 2021

cyril_freebsdfoundation.org updated the diff for D30878: racct: New scheme for calculating pctcpu .

Addresses style issues and removes some now-unused code. The code for calculating pcpu on process exit is still left in, albeit commented out in case we want to experiment with it any further. Finally, there were situations in the previous scheme where pcpu was explicitly set to 0. I believe this is no longer necessary as the runtime value should not increase, but should we carry over this behaviour to ensure that pcpu is exactly 0 in these cases?

Jul 4 2021, 7:41 PM

Jun 29 2021

cyril_freebsdfoundation.org requested review of D30949: racct: Add some tests.
Jun 29 2021, 10:58 PM

Jun 28 2021

cyril_freebsdfoundation.org updated the diff for D30859: racct: Add racct_add_cred_checked.

Adds a new checked version of racct_add_cred instead of adding the checks into racct_add_cred. Also factors the individual handlers out of rctl_enforce so that they can be re-used for rctl_enforce_cred.

Jun 28 2021, 9:04 PM
cyril_freebsdfoundation.org updated the diff for D30878: racct: New scheme for calculating pctcpu .

Addresses markj's comments. From testing, pctcpu can occasionally go slightly above the maximum cpu percentage, which I'm not yet sure if is a bug or expected. It can be clamped to the maximum cpu percentage if it is expected. It also is still not yet updated on proc_exit.

Jun 28 2021, 6:52 PM

Jun 25 2021

cyril_freebsdfoundation.org updated the diff for D30878: racct: New scheme for calculating pctcpu .

This diff now calculates runtime correctly when processes exit. Also, timeval is used to calculate the elapsed time, rather than the wallclock value, which is meaningless for non-process raccts. However, pctcpu is not yet updated on process exit.

Jun 25 2021, 6:14 PM

Jun 23 2021

cyril_freebsdfoundation.org requested review of D30878: racct: New scheme for calculating pctcpu .
Jun 23 2021, 4:13 PM

Jun 21 2021

cyril_freebsdfoundation.org requested review of D30859: racct: Add racct_add_cred_checked.
Jun 21 2021, 8:52 PM
cyril_freebsdfoundation.org added a comment to D30777: racct: Add new "persistent" property for resources.

What's the difference between this and RESOURCE_SLOPPY?

Jun 21 2021, 5:59 PM

Jun 15 2021

cyril_freebsdfoundation.org requested review of D30777: racct: Add new "persistent" property for resources.
Jun 15 2021, 7:32 PM
cyril_freebsdfoundation.org requested review of D30775: uipc_shm: Add racct support .
Jun 15 2021, 7:26 PM

Jun 4 2021

cyril_freebsdfoundation.org updated the diff for D30632: racct: Remove factor in pcpu estimate.

Added parentheses around return value.

Jun 4 2021, 4:22 PM
cyril_freebsdfoundation.org updated the summary of D30632: racct: Remove factor in pcpu estimate.
Jun 4 2021, 4:11 PM

Jun 3 2021

cyril_freebsdfoundation.org requested review of D30632: racct: Remove factor in pcpu estimate.
Jun 3 2021, 8:54 PM

May 17 2021

cyril_freebsdfoundation.org requested review of D30319: sort: Change default algorithm to mergesort.
May 17 2021, 8:12 PM

May 12 2021

cyril_freebsdfoundation.org updated the diff for D30217: sort: Make NetBSD sort tests compatible with sort. .

Addresses the comment issue and removes one "expect fail" due to https://reviews.freebsd.org/D30234.

May 12 2021, 8:45 PM
cyril_freebsdfoundation.org requested review of D30234: sort: Stop "fixing" obsolete keys after -- flag.
May 12 2021, 5:38 PM
cyril_freebsdfoundation.org added inline comments to D30217: sort: Make NetBSD sort tests compatible with sort. .
May 12 2021, 4:56 PM

May 11 2021

cyril_freebsdfoundation.org updated the diff for D30217: sort: Make NetBSD sort tests compatible with sort. .

I reduced the amount of modified lines and added comments throughout describing changes. @markj recommended that I avoid using Begin FreeBSD and End FreeBSD annotations throughout the file in order to reduce clutter.

May 11 2021, 8:23 PM
cyril_freebsdfoundation.org requested review of D30217: sort: Make NetBSD sort tests compatible with sort. .
May 11 2021, 6:43 PM
cyril_freebsdfoundation.org removed a reviewer for D30217: sort: Make NetBSD sort tests compatible with sort. : ngie.
May 11 2021, 6:43 PM

May 10 2021

cyril_freebsdfoundation.org updated the diff for D30170: sort: Cache value of MB_CUR_MAX.

Fixed issues mentioned by markj. mb_cur_max is now updated right after the call to setlocale(LC_ALL, "").

May 10 2021, 9:05 PM
cyril_freebsdfoundation.org updated the diff for D30170: sort: Cache value of MB_CUR_MAX.
May 10 2021, 8:54 PM

May 7 2021

cyril_freebsdfoundation.org requested review of D30170: sort: Cache value of MB_CUR_MAX.
May 7 2021, 9:58 PM