]> git.baikalelectronics.ru Git - kernel.git/commit
parisc: Disable debug code regarding cache flushes in handle_nadtlb_fault()
authorJohn David Anglin <dave.anglin@bell.net>
Mon, 16 May 2022 15:14:47 +0000 (15:14 +0000)
committerHelge Deller <deller@gmx.de>
Tue, 17 May 2022 19:49:06 +0000 (21:49 +0200)
commit65061eb0b14b6d80e05b135d2e41b09e2c2f432c
tree5e82bedc6802b54a2967f6d3854f60b176878a7a
parent06e6170e0ae33ea1ff98f01501371e23c4eee66a
parisc: Disable debug code regarding cache flushes in handle_nadtlb_fault()

Change the "BUG" to "WARNING" and disable the message because it triggers
occasionally in spite of the check in flush_cache_page_if_present.

The pte value extracted for the "from" page in copy_user_highpage is racy and
occasionally the pte is cleared before the flush is complete.  I assume that
the page is simultaneously flushed by flush_cache_mm before the pte is cleared
as nullifying the fdc doesn't seem to cause problems.

I investigated various locking scenarios but I wasn't able to find a way to
sequence the flushes.  This code is called for every COW break and locks impact
performance.

This patch is related to the bigger cache flush patch because we need the pte
on PA8800/PA8900 to flush using the vma context.
I have also seen this from copy_to_user_page and copy_from_user_page.

The messages appear infrequently when enabled.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/mm/fault.c