lkml.org 
[lkml]   [2011]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC][PATCH 2/6] mm: Change flush_tlb_range() to take an mm_struct
On Wed, Mar 2, 2011 at 9:59 AM, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> In order to be able to properly support architecture that want/need to
> support TLB range invalidation, we need to change the
> flush_tlb_range() argument from a vm_area_struct to an mm_struct
> because the range might very well extend past one VMA, or not have a
> VMA at all.

I really don't think this is right. The whole "drop the icache
information" thing is a total anti-optimization, since for some
architectures, the icache flush is the _big_ deal. Possibly much
bigger than the TLB flush itself. Doing an icache flush was much more
expensive than the TLB flush on alpha, for example (the tlb had ASI's
etc, the icache did not).

> There are various reasons that we need to flush TLBs _after_ freeing
> the page-tables themselves. For some architectures (x86 among others)
> this serializes against (both hardware and software) page table
> walkers like gup_fast().

This part of the changelog also makes no sense what-so-ever. It's
actively wrong.

On x86, we absolutely *must* do the TLB flush _before_ we release the
page tables. So your commentary is actively wrong and misleading.

The order has to be:
- clear the page table entry, queue the page to be free'd
- flush the TLB
- free the page (and page tables)

and nothing else is correct, afaik. So the changelog is pure and utter
garbage. I didn't look at what the patch actually changed.

NAK.

Linus


\
 
 \ /
  Last update: 2011-03-02 20:29    [W:0.174 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site