需要提高嵌入式系统的Linux性能 [英] Need to improve the Linux performance for embedded system

查看:199
本文介绍了需要提高嵌入式系统的Linux性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基于ARM OMAP的嵌入式系统,其中1个GHZ处理器运行Linux 2.6.33交叉编译为CONFIG_PREEMPT。其中一个过程(过程1)至关重要,需要每4或8毫秒运行一次,这是可配置的。还有另一个进程(进程2)线程将图像传输到FTP或任何其他已配置的应用程序。为了触发时间关键过程1,我使用高分辨率定时器作为系统中具有最高实时优先级的单独线程(FIFO,比如60)。进程2的RT优先级(RR 20)低于进程1(RR 50)。

I have a ARM OMAP based embedded system with 1 GHZ processor running Linux 2.6.33 cross compiled as CONFIG_PREEMPT. One of the Processes (process 1) is critical and need to run every 4 or 8 milli sec which is configurable. There is another process's (process 2) thread which transfers image to FTP or any other configured application. To trigger the time critical process 1 i use a high resolution timer as a seperate thread (FIFO, say 60) with highest Real time priority in the system. Process 2 is having lower RT priority (RR 20) than process 1 (RR 50).

如果没有启用或配置图像传输,我看不到任何超时上面提到的关键过程(过程1)。但是,如果我启用任何图像传输,则进程1将超时或图像传输因某些错误而失败,其中一个进程死亡,然后其他进程运行正常。

If there is no image transfer enabled or configured i dont see any timeouts for the critical process (process 1) mentioned above. But if i enable any image transfer then the process 1 will timeout or the image transfer fails due to some error and one of these process dies and then other process runs fine.

我看到如果图像分辨率更高,则进程1的超时更快。
使用更高的图像分辨率(比如SXGA),NET_RX以太网中断会长时间保持CPU,当它放弃CPU时,处理1次。看起来NET_RX中断的优先级高于进程1使用的定时器中断,它不会给CPU。

I see that if the image resolution is higher then the timing out of process 1 is faster. With higher resolution of image (say SXGA) the NET_RX ethernet interrupt holds the CPU for long time and by the time it gives up CPU, process 1 timesout. It looks like NET_RX interrupt is having highest priority than timer interrupt used for process 1 and it doesn't give the CPU.

我想确保进程运行和进程1不应该错过截止日期。
如何调试正在等待的系统,以便我可以删除那些等待或至少避免那些等待。

I want to make sure both process running and process 1 should not miss the deadline. How to debug the system that where it is exactly waiting so that i can remove those waits or atleast avoid those if possible.

我如何实现这一目标?请帮助。

How can i achieve this ? Please help.

推荐答案

Linux不是实时操作系统。除了尽力而为的安排之外,它不提供任何保证。

Linux is not a real-time operating system. It offers no guarantees other than "best efforts" scheduling.

如果你有一个 的任务一直以特定的速度运行,你需要在适当的RTOS下运行该任务,可以做出那种保证。

If you have a task which has to run at a particular rate all the time, you need to run that task under a proper RTOS which can make those sorts of guarantees.

否则你必须放宽你的约束每4分钟运行一次,大部分时间。

Otherwise you have to relax your constraints to "runs every 4ms, mostly".

这篇关于需要提高嵌入式系统的Linux性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆