Skip to content

Instantly share code, notes, and snippets.

sync
sync
umount /tmp/x
newfs -U -i 256 /dev/vkd2s0
tunefs -n enable /dev/vkd2s0
mount /dev/vkd2s0 /tmp/x
cd /tmp/x
cp /root/fsstress .
./fsstress -n 1000000 -p 10 -d test
@vsrinivas
vsrinivas / gist:4315735
Created December 17, 2012 04:23
1-cpu dfly vm kthreads...
0 -1 0 0 -12 -64 0 0 - B0L ?? 3:19:46 (idle_0)
0 -1 0 0 -20 -72 0 0 ahport B0L ?? 0:00.16 (ahci0.0)
0 -1 0 0 -28 -80 0 0 - B0L ?? 0:07.54 (ithread11 0)
0 -1 0 0 -28 -80 0 0 - B0L ?? 0:00.00 (ithread15 0)
0 -1 0 0 -28 -80 0 0 - B0L ?? 0:00.00 (ithread14 0)
0 -1 0 0 -28 -80 0 0 - B0L ?? 0:00.00 (ithread9 0)
0 -1 0 0 -12 -64 0 0 waitport B0L ?? 0:00.00 (acpi_task)
0 -1 0 0 -14 -66 0 0 - B0L ?? 0:07.87 (ithread195 0)
0 -1 0 0 -12 -64 0 0 ccb_scan B0L ?? 0:00.00 (xpt_thrd)
0 -1 0 0 -14 -66 0 0 - B0L ?? 0:00.00 (ithread197 0)
Date: Wed, 23 Jan 2013 15:58:45 -0800
From: Venkatesh Srinivas <vsrinivas@ops101.org>
To: kernel@dragonflybsd.org
Cc: dillon@apollo.backplane.com
Subject: Ref: tux3 allocation notes
#include <sys/types.h>
#include <sys/consio.h>
#include <sys/ioctl.h>
#include <stdio.h>
#include <fcntl.h>
main() {
int fd;
int rc;
rem# kldload ./if_vtnet.ko
virtio_pci0: host features: 0x711f8060 <EventIdx,0x10000000,NotifyOnEmpty,RxMode
Extra,VLanFilter,RxMode,ControlVq,Status,MrgRxBuf,TxAllGSO,MacAddress>
virtio_pci0: negotiated features: 0x10f8020 <NotifyOnEmpty,VLanFilter,RxMode,Con
trolVq,Status,MrgRxBuf,MacAddress>
vtnet0: MAC address: 52:54:00:12:34:56
add dynamic link state
rem# /sbin/dhclient vtnet0
virtio_pci0: host features: 0x711f8060 <EventIdx,0x10000000,NotifyOnEmpty,RxMode
Extra,VLanFilter,RxMode,ControlVq,Status,MrgRxBuf,TxAllGSO,MacAddress>
rem# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/vbd0s1a 252M 200M 32M 86% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/vbd0s1e 504M 40M 424M 9% /var
/dev/vbd0s1f 252M 10K 232M 0% /tmp
/dev/vbd0s1g 3.1G 1.0G
rem# /sbin/dhclient vtnet0
virtio_pci0: host features: 0x719f8060 <EventIdx,0x10000000,NotifyOnEmpty,0x800000,RxModeExtra,VLanFilter,RxMode,ControlVq,Status,MrgRxBuf,TxAllGSO,MacAddress>
virtio_pci0: negotiated features: 0x1078020 <NotifyOnEmpty,RxMode,ControlVq,Status,MrgRxBuf,MacAddress>
vtnet0: error setting host MAC filter table
DHCPDISCOVER on vtnet0 to 255.255.255.255 port 67 interval 3
DHCPOFFER from 10.0.2.2 (52:55:0a:00:02:02)
jackson# /usr/local/bin/vmm_test
sys_vmm_guest: VMM_GUEST_INIT op
vmm_guest(0): return 0, expected 0
sys_vmm_guest: VMM_GUEST_RUN op
vmm_vmenter
SVMRUN GO!

Keybase proof

I hereby claim:

  • I am vsrinivas on github.
  • I am vsrinivas (https://keybase.io/vsrinivas) on keybase.
  • I have a public key whose fingerprint is 2331 9833 B1C3 8AF6 2EFC AA5B 0D32 F18E CCED C0D3

To claim this, I am signing this object:

#define _XOPEN_SOURCE 500
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <string.h>
#include <unordered_set>