sx21 system version Ubuntu 22.04.1 LTS
Qemu v6.2.0 (ivshmem-server ivshmem-client)
两个 client 与 一个 server 进行通信与中断转发
Benchmark client 与 echo client 通过向 server 发送 doorbell 通知, 由 server 端将待转发的doorbell 通知发送至对应的 client, 当 client 接收到 doorbell 通知后,读取共享内存数据,并验证数据是否正常并加以记录,循环往复完成共享内存数据交换任务。
sx21
Windows
Windows 客户端测试并添加内存校验
运行结果:
  ---------------------------------------------------------------------
  Benchmark                           Time             CPU   Iterations
  ---------------------------------------------------------------------
  bm_ivshmem_client/1024          19615 ns         4530 ns       156610
  bm_ivshmem_client/4096          19794 ns         4427 ns       157740
  bm_ivshmem_client/16384         19482 ns         4489 ns       156405
  bm_ivshmem_client/65536         19485 ns         4461 ns       156473
  bm_ivshmem_client/262144        19642 ns         4505 ns       153453
  bm_ivshmem_client/1048576       20015 ns         4492 ns       155822
  bm_ivshmem_client/4194304       19722 ns         4493 ns       156159
  bm_ivshmem_client/16777216      19373 ns         4445 ns       157395
        Linux
Linux 客户端测试并添加内存校验
运行结果:
  ---------------------------------------------------------------------
  Benchmark                           Time             CPU   Iterations
  ---------------------------------------------------------------------
  bm_ivshmem_client/1024          23921 ns         5607 ns       124888
  bm_ivshmem_client/4096          24061 ns         5612 ns       121099
  bm_ivshmem_client/16384         24400 ns         5622 ns       125054
  bm_ivshmem_client/65536         23851 ns         5645 ns       122495
  bm_ivshmem_client/262144        24037 ns         5651 ns       123974
  bm_ivshmem_client/1048576       23952 ns         5624 ns       124509
  bm_ivshmem_client/4194304       23678 ns         5617 ns       124850
  bm_ivshmem_client/16777216      23961 ns         5618 ns       125349