2008-07-30 14:44:20     uClinux overhead

Document created by Aaronwu Employee on Aug 7, 2013
Version 1Show Document
  • View in full screen mode

2008-07-30 14:44:20     uClinux overhead

murti iki (GERMANY)

Message: 59615   




Does the absence of MMU greatly reduces the overhead of uClinux. I have been running some tests and got the below questions.


1)   A  copy_from_user() function that transfers 252 bytes takes 1900 cycles. Can the absence of an MMU lead to faster implemantation of copy_from_user() function ?




2) I have a device driver performing SPI transfers. In order to see if the number of cycles to complete a process would


increase under the computational burden of other processes. I set up a case where two background processes are


continously running. One of them is allocating 252 bytes of memory, writing some data to it and frees it then repeats this


process. The other one sends 252 bytes to a driver that simple calls copy_from_user() and returns. This process also runs




I have then compared the number of cycles needed to make a SPI transfer with and without these two burden processes.


The results were almost the same (very very close). Does this make sense? I have checked the processes list with "ps -e"


and saw all three there.


I would be happy if you can comment on this














a write() call from userspace to a driver (that simply returns) takes 1481 cycles




2008-07-30 23:31:45     Re: uClinux overhead

Mike Frysinger (UNITED STATES)

Message: 59624   


it's hard to quantify "the overhead of Linux".  somethings will be faster, somethings will be slower.  Blackfin does not have a MMU anywhere, so it will always be the same speed on Blackfin regardless.


the Blackfin tends to be pretty fast in CCLK, and it doesnt seem like the two processes you added are terribly core intensive, so the Blackfin should be able to keep up with everything you're trying to do




2008-07-31 02:19:08     Re: uClinux overhead

murti iki (GERMANY)

Message: 59630   


thanks Mike,


What can then be a core intensive process? and can you please explain the "Blackfin does not have a MMU


anywhere, so it will always be the same speed on Blackfin regardless." a  little bit. Do you mean that the


copy_from_user will be as efficient as it were on a standalone application ?




2008-07-31 02:49:38     Re: uClinux overhead

Mike Frysinger (UNITED STATES)

Message: 59631   


there are some benchmark apps out there that only exercise the core ... but still, the kernel knows how to schedule things properly


without an MMU, copy_from_user() is merely a memcpy() ... just look at the header files in include/asm-blackfin/