High performance applications usually need to give many hints to the OS kernel regarding their needs. For example, CPU affinity is commonly used to pin processes to cores and avoid the cost of CPU migration, isolate performance critical tasks, bring related tasks together, and so on. However, when running inside a Virtual Machine, the (guest) OS kernel can only assign virtual resources, e.g., pinning a guest process to a virtual CPU thread (vCPU); the vCPU thread, however, is still freely scheduled by the host hypervisor, which is unaware of the guest application requests. This semantic gap is usually overcome by statically allocating virtual resources to their hardware counterparts, which is costly and inflexible, or via paravirtualization, i.e., by modifying the guest kernel to pass the hints to the host, which is cumbersome and difficult to extend. We propose to use host-injected eBPF programs as a way for the host to obtain this kind of information from the guest in an extensible way, without modifying the guest (Linux) kernel, and without statically allocating resources. We apply this idea to the example of CPU affinity and run some experiments to show its effect on several microbenchmarks. Finally, we discuss the implications for confidential computing.
- CPU Pinning
This is a preview of subscription content, access via your institution.
Tax calculation will be finalised at checkout
Purchases are for personal use onlyLearn about institutional subscriptions
Just in Time.
Non-Uniform Memory Architecture.
Mega packets per second.
Amit, N., Wei, M.: The design and implementation of Hyperupcalls. In: 2018 USENIX Annual Technical Conference (USENIX ATC 2018), pp. 97–112. USENIX Association, Boston, MA (2018)
Barham, P., et al.: Xen and the art of virtualization. ACM SIGOPS Oper. Syst. Rev. 37(5), 164–177 (2003)
eBPF for Windows (2022). https://github.com/microsoft/ebpf-for-windows
Ghatrehsamani, D., Denninnart, C., Bacik, J., Amini Salehi, M.: The art of CPU-pinning: evaluating and improving the performance of virtualization and containerization platforms. In: 49th International Conference on Parallel Processing - ICPP. ICPP 2020. Association for Computing Machinery, Edmonton, AB, Canada (2020). https://doi.org/10.1145/3404397.3404442
Gutiérrez, C.S.V., Juan, L.U.S., Ugarte, I.Z., Vilches, V.M.: Real-time Linux communications: an evaluation of the Linux communication stack for real-time robotic applications. arXiv preprint arXiv:1808.10821 (2018)
Krzywda, J., Ali-Eldin, A., Carlson, T.E., Östberg, P.-O., Elmroth, E.: Powerperformance tradeoffs in data center servers: DVFS, CPU pinning, horizontal, and vertical scaling. Futur. Gener. Comput. Syst. 81, 114–128 (2018)
Lee, T., Eom, Y.I.: VCPU prioritization interface for improving the performance of latency-critical tasks. In: 2020 14th International Conference on Ubiquitous Information Management and Communication (IMCOM), pp. 1–4 (2020). https://doi.org/10.1109/IMCOM48794.2020.9001717
Maffione, V., Lettieri, G., Rizzo, L.: Cache-aware design of general-purpose single-producer-single-consumer queues. Softw. Pract. Exp. 49, 748–779 (2018). https://doi.org/10.1002/spe.2675
Vieira, M.A., Castanho, M.S., Pacífico, R.D., Santos, E.R., Júnior, E.P.C., Vieira, L.F.: Fast packet processing with EBPF and XDP: concepts, code, challenges, and applications. ACM Comput. Surv. (CSUR) 53(1), 1–36 (2020)
Zhang, I., Liu, J., Austin, A., Roberts, M.L., Badam, A.: I’m not dead yet! The role of the operating system in a kernel-bypass era. In: Proceedings of the Workshop on Hot Topics in Operating Systems, pp. 73–80 (2019)
Editors and Affiliations
© 2022 Springer Nature Switzerland AG
About this paper
Cite this paper
Leonardi, L., Lettieri, G., Pellicci, G. (2022). eBPF-based Extensible Paravirtualization. In: Anzt, H., Bienz, A., Luszczek, P., Baboulin, M. (eds) High Performance Computing. ISC High Performance 2022 International Workshops. ISC High Performance 2022. Lecture Notes in Computer Science, vol 13387. Springer, Cham. https://doi.org/10.1007/978-3-031-23220-6_27
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-23219-0
Online ISBN: 978-3-031-23220-6