Driver with hard RT requiremnets
Hello, We need to support serial driver with real time requirements (towards specific device with RT demands): Every 5.3msec receive 100 bytes and 1.3msec afterwards send 100 bytes. 1. Does kernel support real-time of such hard requirements ? 2. Is it matter if we do the exact bytes send/receive from kernel or userspace, i.e. is kernel more real-time than userspace ? 3. Is mainline kernel unable to support such requirements and we better use RT patch such as xemonai ? Best Regards, Ran
On Mon, Dec 05, 2016 at 04:24:05PM +0200, Ran Shalit wrote:
Hello,
We need to support serial driver with real time requirements (towards specific device with RT demands): Every 5.3msec receive 100 bytes and 1.3msec afterwards send 100 bytes.
1. Does kernel support real-time of such hard requirements ?
It depends on the hardware you are using, does your hardware provide enough processing power and lack of harware interruptions (i.e. SMI) to allow this to work properly?
2. Is it matter if we do the exact bytes send/receive from kernel or userspace, i.e. is kernel more real-time than userspace ?
It depends on your userspace code, people write real-time Java code in userspace just fine.
3. Is mainline kernel unable to support such requirements and we better use RT patch such as xemonai ?
Why not try it out yourself and see? You have the code and the hardware to test, you don't need us to tell you if this works or not :) good luck! greg k-h
On Mon, Dec 5, 2016 at 4:35 PM, Greg KH <greg@kroah.com> wrote:
On Mon, Dec 05, 2016 at 04:24:05PM +0200, Ran Shalit wrote:
Hello,
We need to support serial driver with real time requirements (towards specific device with RT demands): Every 5.3msec receive 100 bytes and 1.3msec afterwards send 100 bytes.
1. Does kernel support real-time of such hard requirements ?
It depends on the hardware you are using, does your hardware provide enough processing power and lack of harware interruptions (i.e. SMI) to allow this to work properly?
2. Is it matter if we do the exact bytes send/receive from kernel or userspace, i.e. is kernel more real-time than userspace ?
It depends on your userspace code, people write real-time Java code in userspace just fine.
3. Is mainline kernel unable to support such requirements and we better use RT patch such as xemonai ?
Why not try it out yourself and see? You have the code and the hardware to test, you don't need us to tell you if this works or not :)
Hi, I mean that the requirements doesn't allow missing of these time intervals for send/receive. Say If I'll test and it shall work OK, does it mean that in a more loaded usage (more threads in a future application), it shall still function correctly with the same kernel (from mainline) ? I also wanted to ask if it is doing real-time in kernel is better than doing it in userspace ? Since we have some doubts if kernel can support such hard requirements, I raised this question. I know that Xenomai was created to make kernel hard real-time. Thank you for any feedback. Ran
good luck!
greg k-h
participants (2)
-
Greg KH -
Ran Shalit