Re: [patch 01/15] mm/memory.c: avoid access flag update TLB flush for retried page fault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 27, 2020 at 11:04:55AM -0700, Linus Torvalds wrote:
> On Mon, Jul 27, 2020 at 10:52 AM Yang Shi <yang.shi@xxxxxxxxxxxxxxxxx> wrote:
> > It looks normal page is skipped too unless it is a write fault. The
> > comment might be a little bit misleading.
> 
> No the comment is fine - in that it matches the code.
> 
> It's the code _and_ the comment that I find to be garbage.
> 
> > Read fault should just change young bit and typically TLB won't get
> > flushed if just young bit is changed and TLB flush can be deferred again
> > to write fault which may change access permission and/or dirty bit.
> 
> This is the part I disagree with.
> 
> A read fault could easily cause the exact same issue, exactly because
> people do young bits in software too.

At least on arm64 (and arm32), old ptes are not cached in the TLB, so
there is no need to flush if the only action was to make the pte young
from old. However, this may not be the same on other architectures.

Also not sure about races with making a pte old then young again, some
CPU could get confused.

-- 
Catalin




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux