Re: [PATCH v6 07/11] mm/mremap: Use range flush that does TLB and page walk cache flush

2021-05-25 Thread Linus Torvalds
On Tue, May 25, 2021 at 3:28 AM Aneesh Kumar K.V wrote: > > How about flush_tlb_and_page_table_cache() ? Honestly, I'd prefer it to be a separate function. So keep the existing flush_tlb() as-is, and add a flush_tlb_walking_cache() and document that any architecture that flushes

Re: [PATCH v6 07/11] mm/mremap: Use range flush that does TLB and page walk cache flush

2021-05-25 Thread Aneesh Kumar K.V
Linus Torvalds writes: > On Sun, May 23, 2021 at 11:04 PM Aneesh Kumar K.V > wrote: >> >> Add new helper flush_pte_tlb_pwc_range() which invalidates both TLB and >> page walk cache where TLB entries are mapped with page size PAGE_SIZE. > > So I dislike this patch for two reasons: > > (a) naming

Re: [PATCH v6 07/11] mm/mremap: Use range flush that does TLB and page walk cache flush

2021-05-24 Thread Linus Torvalds
On Sun, May 23, 2021 at 11:04 PM Aneesh Kumar K.V wrote: > > Add new helper flush_pte_tlb_pwc_range() which invalidates both TLB and > page walk cache where TLB entries are mapped with page size PAGE_SIZE. So I dislike this patch for two reasons: (a) naming. If the ppc people want to use crazy

[PATCH v6 07/11] mm/mremap: Use range flush that does TLB and page walk cache flush

2021-05-24 Thread Aneesh Kumar K.V
Some architectures do have the concept of page walk cache which need to be flush when updating higher levels of page tables. A fast mremap that involves moving page table pages instead of copying pte entries should flush page walk cache since the old translation cache is no more valid. Add new hel