Page 333 - 《软件学报》2020年第10期
P. 333
软件学报 ISSN 1000-9825, CODEN RUXUEW E-mail: jos@iscas.ac.cn
Journal of Software,2020,31(10):3309−3320 [doi: 10.13328/j.cnki.jos.005814] http://www.jos.org.cn
©中国科学院软件研究所版权所有. Tel: +86-10-62562563
∗
并行帧缓存设备:基于多核 CPU 的 Xorg 并行显示优化
1
2
1
高 珑 , 戴华东 , 杨沙洲 , 丁 滟 1
1
(国防科技大学 计算机学院,湖南 长沙 410073)
2 (军事科学院 国防科技创新中心,北京 100091)
通信作者: 高珑, E-mail: longgao@nudt.edu.cn
摘 要: Xorg 图形服务器软件在帧缓存设备上采用单线程绘制模式,难以发挥多核 CPU 的性能.针对多核 CPU 上
的帧缓存设备,设计了带有互斥操作的任务队列,并按照屏幕划分的方法,实现了 Xorg 的矩形填充操作在帧缓存设
备上基于私有任务队列的多线程并行化,并实现了主从线程负载均衡.x11perf 测试结果表明,该算法在一台 4 核商用
台式机上的加速比可以达到 2.06.
关键词: Xorg;帧缓存设备;嵌入式;并行算法;多核 CPU
中图法分类号: TP316
中文引用格式: 高珑,戴华东,杨沙洲,丁滟.并行帧缓存设备:基于多核 CPU 的 Xorg 并行显示优化.软件学报,2020,31(10):
3309−3320 http://www.jos.org.cn/1000-9825/5814.htm
英文引用格式: Gao L, Dai HD, Yang SZ, Ding Y. Parallel frame buffer device: Graphics acceleration based on multi-core CPU
for Xorg. Ruan Jian Xue Bao/Journal of Software, 2020,31(10):3309−3320 (in Chinese). http://www.jos.org.cn/1000-9825/5814.
htm
Parallel Frame Buffer Device: Graphics Acceleration Based on Multi-core CPU for Xorg
1
1
2
GAO Long , DAI Hua-Dong , YANG Sha-Zhou , DING Yan 1
1 (College of Computer Science and Technology, National University of Defense Technology, Changsha 410073, China)
2 (National Innovation Institute of Defense Technology, Academy of Military Sciences, Beijing 100091, China)
Abstract: Xorg server is running in single-threaded mode on frame buffer device, which is hard to obtain good performance on multi-
core CPU. For frame buffer device on multi-core CPU, a task queue is designed with mutual-inclusion, screen is split into several
sub-screens, and each sub-screen is attached with a thread to draw rectangles within that sub-screen. A private task queue for each thread
is used to hold their own tasks to draw rectangles, and load balance is kept between the main thread and each sub-thread. Results of
x11perf show that rectangles filling operation could reach a speed-up ratio of 2.06 on a 4-core DELL desktop computer.
Key words: Xorg; frame buffer; embedded; parallel algorithm; multi-core CPU
1 引 言
[1]
Xorg 图形服务器起源于 20 世纪 80 年代初,是 Unix/Linux 系统上最基本的图形交互系统 ,大致架构如图
1 所示.Xorg 图形服务器采用 Client/Server 设计思想,具备卓越的灵活性和强大的功能,成为 Unix/Linux 中缺省
的主流图形交互环境.但是基于 Client/Server 的 X 协议的开销,使 Xorg 图形服务器也一直因为效率和性能方面
[2]
的问题而饱受诟病 .
∗ 基金项目: 国家核高基重大专项(2017ZX01038-104-002); 国家自然科学基金(61502510)
Foundation item: National Fundamental Science and Technology Foundation of China (2017ZX01038-104-002); National Natural
Science Foundation of China (61502510)
收稿时间: 2017-03-24; 修改时间: 2018-10-02; 采用时间: 2019-01-15