Hi Netmap developers,

In very simple application, I am using two freebsd10 vm's spawned using Qemu. About my environment, Underlying host os is linux, freebsd10 vm's are guest vms. These two bsd10 vm's are connected using em interface (which again Qemu emulated).

|======  10.10.10.1 (em)                               =======|
|  vm1     |<---------------------------------------------->| vm2        |
|======                                  10.10.10.2(em) ====== |


If i start rapid ping between these vm, i see idle cpu remaining in system (bsd10 vm) is just 10-20%. checking further looking all cpu is going in em driver call (interrupt enable/disable) etc.

=======
last pid:  8709;  load averages:  1.89,  1.57, 1.76 up 0+00:38:44 05:59:46
30 processes:  3 running, 27 sleeping
CPU: 2.0% user, 0.0% nice, 72.9% system, 10.2% interrupt, 14.9% idle <<<<<<<<<<<<<<<<<<<<<<<<<
Mem: 138M Active, 642M Inact, 91M Wired, 89M Buf, 2624M Free
Swap: 1024M Total, 1024M Free

  PID USERNAME  THR PRI NICE   SIZE    RES STATE    TIME    WCPU COMMAND
 8089 root        1  25    0 18880K  3788K RUN      0:15   6.98% sshd
 8628 root        1  29    0 14456K  1832K RUN      0:11   6.40% ping
==========

I was thinking if i can make use of netmap here to achieve better performance, which will also
leave some cpu for other application to run in vm.

I enabled netmap related code changes in if_lem.c of bsd10 but looks like these changes also expects
change in Qemu side also.


=======
/*
 * Uncomment the following extensions for better performance in a VM,
 * especially if you have support in the hypervisor.
 * See http://info.iet.unipi.it/~luigi/netmap/
 */
 #define BATCH_DISPATCH
 #define NIC_SEND_COMBINING
 #define NIC_PARAVIRT /* enable virtio-like synchronization */

-----------


#ifdef NIC_PARAVIRT
        device_printf(dev, "driver supports paravirt, subdev 0x%x\n",
                adapter->hw.subsystem_device_id);
if (adapter->hw.subsystem_device_id == E1000_PARA_SUBDEV) { <<<<<<<<<<
===========

Qemu by default emulated em device with subsystem_device_id as 0x1100.
It mean by enabling netmap change alone in bsd10 will not help.
we also need changes from Qemu.

I checked latest Qemu code but i dont see they emulating em with above subsystem_device_id.

Can some one tell me about how to enable Qemu side change, if there is any patch available please provide me that to try. Do we also need application level change (to use /dev/netmap) to gain mentioned performance gain or we can get
little bit of gain by just enabling kernel level changes.

--Regards,
Ashish Gupta






_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to