From: SUGIOKA T. <su...@it...> - 2002-10-31 02:36:20
|
On Wed, 2002-10-30 at 00:52, SUGIOKA Toshinobu wrote: > On my SH7750S (200MHz, 128MB) board, user land application > causes segmentation fault and/or unaligned access randomly when > very high memory load with swap on. This is my fault. I'm trying Stuart Menefy's new TLB handling, and my modification of kernel caused this problem. After reverting all, there is no problem about this. I'm sorry for incorrect message. By the way, I applied Stuart's TLB patch to 2.4 branch, but it does not work at all. Missing some other part ? At 12:49 02/10/30 -0500, Paul Mundt <pau...@ti...> wrote: >This looks like more of a problem of flush_page_to_ram() not doing its >job. If we look at DaveM's cache/tlb flushing docs, we see the >following: > > flush_page_to_ram(struct page *page) > > The physical page 'page' is about to be place into the > user address space of a process. If it is possible for > stores done recently by the kernel into this physical > page, to not be visible to an arbitrary mapping in userspace, > you must flush this page from the D-cache. > > If the D-cache is writeback in nature, the dirty data (if > any) for this physical page must be written back to main > memory before the cache lines are invalidated. > >This looks pretty straightforward in nature, and for this application, I >think we'd be better off simply aliasing flush_page_to_ram() to >flush_dcache_page(). At least it looks like it'll do the Right Thing(tm) >more often then not that way (with potentially a few extra dcache >flushes..). > This patch causes extra dcache flushes too much. before 374 __copy_user_page 4.4524 480 schedule 0.4286 488 net_send_packet 1.1731 592 __clear_user_page 12.3333 622 __flush_cache_page 2.1597 1227 statm_pgd_range 2.7388 1750 pss2001_insw 13.6719 5709 cpu_idle 35.6812 26515 total 0.0214 after 212 __flush_cache_page 0.7361 223 __copy_user_page 2.6548 226 __clear_user_page 4.7083 316 do_wp_page 0.4938 614 pss2001_insw 4.7969 773 do_anonymous_page 2.6840 1058 flush_page_to_ram 4.1328 2085 filemap_nopage 2.9616 2645 do_no_page 7.5142 2830 cpu_idle 17.6875 16878 total 0.0136 Regards. ---- SUGIOKA Toshinobu |