From: Masahiro A. <m-...@aa...> - 2001-07-05 00:11:05
|
Hi David, I really, really thank you so much. It seems to work fine now with what you suggested! RTLinux task wake-up time is now below 70 microseconds. I'm very happy with this. I also would like to take a look at latest round of patches, but I must provide workable kernel to another developer soon, so for now I'll go with this hack. I sure will try new code soon. Thanks again, it really helped us a lot! On Wed, 4 Jul 2001 18:09:21 +0100 David Mckay <Dav...@st...> wrote: > On Jul 4, 10:10pm, m-...@aa... wrote: > > Subject: [linuxsh-dev] Strange behavior when accessing mmap'd framebuffer > > > > Hello all, > > > > Today I would like to get comments/suggestions on my problem, if you > > have. I'll really appreciate any info you would provide. > > > > I'm running custom SH4 machine with LCD controller (Epson s1d13706) with > > monochrome LCD, using it as framebuffer device. It can be accessed as > > /dev/fb0 now. > > When I access mmap'd framebuffer memory area from user program (by > > memcpy, for example), sometimes it takes very long time to complete. > > Writing (unsigned char)0x00 to the area sometimes took more than 700 > > microseconds. Usually it takes just about 10 microseconds. > > > > We have seen exactly this behaviour. It is caused by the TLB handler code > (Pre the latest patches). What happens is the dcache aliasing code kicks in, > causing all TLB entries to be scanned. > > As a quick hack, what I did was change the code in update_mmu_cache() to > instead of > > if(pte_shared(pte)) > > to if(pte_shared(pte) && pte_cacheable(pte)) > > Dcache aliasing can't happen if the memory is uncached. > > Anyway, this provided a big performance increase for me. > > We actually were going to rewrite the whole of the way the dcache aliasing was > done, but as usual Niibe beat us to it:-) That's another bug chunk of work gone > from our project plan! > > The latest kernel should fix this problem I think, but I haven't tested it yet, > for framebuffer access, although it appears stable to me for other purposes. > > Hope this helps! +-------------------------------------+ | Masahiro Abe, Software Engineer | | A&D Co., Ltd. of Tokyo, Japan | | mailto:m-...@aa... | +-------------------------------------+ |This is my opinion, not my employer's| +-------------------------------------+ |