On Mon, Dec 05, 2016 at 04:49:28PM +0200, Ran Shalit wrote: > > > On Mon, Dec 5, 2016 at 4:35 PM, Greg KH <greg@xxxxxxxxx> 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) ? Again, it all depends on your hardware. But if you want to make sure your deadlines are met, use the -rt patchset and do a lot of testing to ensure things work properly. Don't just trust some random person on a random mailing list to tell you if it works or not :) > I also wanted to ask if it is doing real-time in kernel is better than doing it > in userspace ? Again, it all depends on what you are wanting to do, and your hardware. Battleships are doing real-time work, in Java, on Linux, just fine. Does that mean that any Linux machine can do that same workload with the same deadlines? Of course not, you have to consider the whole system (hardware and software) to be able to determine any of this. > 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. I have no idea what xenomai is, again, please look into the -rt patchset, and your hardware platform requirements. good luck! greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies