linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Possible duplicate page fault accounting on some archs after commit 4064b9827063
@ 2020-06-10 15:48 Gerald Schaefer
  2020-06-10 16:50 ` Peter Xu
  2020-06-10 16:53 ` Linus Torvalds
  0 siblings, 2 replies; 4+ messages in thread
From: Gerald Schaefer @ 2020-06-10 15:48 UTC (permalink / raw)
  To: Peter Xu, linux-arch, linux-kernel
  Cc: linux-alpha, linux-arm-kernel, linux-hexagon, linux-ia64,
	linux-m68k, Michal Simek, linux-mips, Nick Hu, Ley Foon Tan,
	openrisc, linux-parisc, linux-riscv, linux-sh, sparclinux,
	linux-um, Guan Xuetao, linux-xtensa, Heiko Carstens,
	Linus Torvalds, Andrea Arcangeli

Hi,

Some architectures have their page fault accounting code inside the fault
retry loop, and rely on only going through that code once. Before commit
4064b9827063 ("mm: allow VM_FAULT_RETRY for multiple times"), that was
ensured by testing for and clearing FAULT_FLAG_ALLOW_RETRY.

That commit had to remove the clearing of FAULT_FLAG_ALLOW_RETRY for all
architectures, and introduced a subtle change to page fault accounting
logic in the affected archs. It is now possible to go through the retry
loop multiple times, and the affected archs would then account multiple
page faults instead of just one.

This was found by coincidence in s390 code, and a quick check showed that
there are quite a lot of other architectures that seem to be affected in a
similar way. I'm preparing a fix for s390, by moving the accounting behind
the retry loop, similar to x86. It is not completely straight-forward, so
I leave the fix for other archs to the respective maintainers.

Added the lists for possibly affected archs on cc, but no guarantee for
completeness.

Regards,
Gerald

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-15 21:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-10 15:48 Possible duplicate page fault accounting on some archs after commit 4064b9827063 Gerald Schaefer
2020-06-10 16:50 ` Peter Xu
2020-06-15 21:34   ` Peter Xu
2020-06-10 16:53 ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).