摘要
在Linux系统中,高速存储驱动会将大量数据从内核空间复制到用户空间进行存储,这将导致存储速度下降和剧烈波动。针对该问题,结合自行设计开发的PCIE接口高速图像存储系统,分析Linux下PCIE驱动的一般组成及实现,提出一种在驱动中实现多线程多缓存直接存储的方法。首先图像数据乒乓DMA传输到双DMA缓存中,然后将数据乒乓转存到内核空间双大缓存中,最后由内核线程直接写入SSD。经该方法优化后的SSD存储速度达到100MB/s以上,比常规方法提升了65%以上。在实际工程中,输入512×512@200Hz的14位灰度图像能够实现稳定存储,避免了原来的丢帧现象,且性能稳定,取得了良好的优化效果。
In Linux system, high-speed storage drive will copy large amounts of data from kernel space to user space for storage, and this results in the decrease of storage speed and sharp volatility. Aiming at the problem, in combination with the self-designed and developed PCIE interface high-speed image storage system, we analyse the general composition of PCIE drive under Linux and its implementation, and put forward a method to realise multithread multi-buffer direct storage in driver. First, it transfers the ping-pong DMA of image data to double DMA buffer, then it saves the data ping-pong to double big buffer of kernel space, and finally directly writes them to SSD by kernel thread. After optimised with this method, SSD storage speed reaches more than 100 MB/s and gains over 65% improvement compared with conventional methods. In practical projects, by inputting 14 bits gray image with 512 × 512 @ 200 Hz, SSD can achieve stable storage, this avoids previous phenomenon of frame loss, the performance is stable as well, and achieves good optimisation result.
出处
《计算机应用与软件》
CSCD
2016年第9期235-237,263,共4页
Computer Applications and Software
基金
国防实验基金项目(YJ14K015)