On Fri, 23 May 2008 09:45:15 -0400 "Robert P. J. Day" <rpjday@xxxxxxxxxxxxxx> wrote: > the scenario: a single-board computer (SBC) running linux, limited > RAM, which opens a potentially very large regular or device file, then > possibly hops all over the place processing the contents. currently, > this processing uses lseek() to move around in the file, and read() to > get the relevant data. > > is there any theoretical performance hit to using mmap() for this > instead? There may be drawbacks, but also advantages. If you use read(), you may get better readahead (probably not relevant for device memory), less consumed address space, lower pagetable overhead and fewer page faults. On the other hand, if you use mmap() you do not have to copy the data into user space. Chances are you won't notice much difference changing your application around from one model to the other. -- All rights reversed. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ