Re: [RFC][PATCH 2/6] mm: Change flush_tlb_range() to take an mm_struct

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

 



On 03/02/2011 02:19 PM, Linus Torvalds wrote:

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.

The patch seems to preserve the correct behaviour.

The changelog should probably read something along the
lines of:

"There are various reasons that we need to flush TLBs _after_
 clearing the page-table entries themselves."

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


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