Re: [patch 2/6] mmu_notifier: Callbacks to invalidate address ranges

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Christoph Lameter
Date: Wednesday, January 30, 2008 - 1:55 pm

On Wed, 30 Jan 2008, Jack Steiner wrote:


We are changing definitions. The original patch by Andrea calls 
invalidate_page for each pte that is cleared. So strictly you would not 
need an invalidate_range.


The refcount is not necessary if we adopt Andrea's approach of a callback 
on the clearing of each pte. At that point the page is still guaranteed to 
exist. If we do the range_invalidate later (as in V3) then the page may 
have been released (see sys_remap_file_pages() f.e.) before we zap the GRU 
ptes. So there will be a time when the GRU may write to a page that has 
been freed and used for another purpose.

Taking a refcount on the page defers the free until the range_invalidate 
runs.

I would prefer a solution that does not require taking refcounts (pins) 
for establishing an external pte and for release (like what the GRU does).

If we could effectively determine that there are no external ptes in a 
range then the invalidate_page() call may return immediately. Maybe it is 
then effective to do these gazillions of invalidate_page() calls when a 
process terminates or an remap is performed.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 2/6] mmu_notifier: Callbacks to invalidate address ..., Christoph Lameter, (Mon Jan 28, 1:28 pm)
Re: [patch 2/6] mmu_notifier: Callbacks to invalidate addr ..., Andrea Arcangeli, (Tue Jan 29, 11:28 am)
Re: [patch 2/6] mmu_notifier: Callbacks to invalidate addr ..., Christoph Lameter, (Tue Jan 29, 12:55 pm)
Re: [patch 2/6] mmu_notifier: Callbacks to invalidate addr ..., Christoph Lameter, (Tue Jan 29, 1:30 pm)
Re: [patch 2/6] mmu_notifier: Callbacks to invalidate addr ..., Christoph Lameter, (Tue Jan 29, 2:35 pm)
Re: [patch 2/6] mmu_notifier: Callbacks to invalidate addr ..., Christoph Lameter, (Tue Jan 29, 2:53 pm)
Re: [patch 2/6] mmu_notifier: Callbacks to invalidate addr ..., Christoph Lameter, (Tue Jan 29, 3:39 pm)
Re: [patch 2/6] mmu_notifier: Callbacks to invalidate addr ..., Christoph Lameter, (Tue Jan 29, 3:55 pm)
Re: [patch 2/6] mmu_notifier: Callbacks to invalidate addr ..., Christoph Lameter, (Tue Jan 29, 5:20 pm)
Re: [patch 2/6] mmu_notifier: Callbacks to invalidate addr ..., Christoph Lameter, (Tue Jan 29, 5:22 pm)
Re: [patch 2/6] mmu_notifier: Callbacks to invalidate addr ..., Christoph Lameter, (Tue Jan 29, 5:34 pm)
Re: [patch 2/6] mmu_notifier: Callbacks to invalidate addr ..., Christoph Lameter, (Tue Jan 29, 5:35 pm)
Re: [patch 2/6] mmu_notifier: Callbacks to invalidate addr ..., Andrea Arcangeli, (Wed Jan 30, 10:04 am)
Re: [patch 2/6] mmu_notifier: Callbacks to invalidate addr ..., Andrea Arcangeli, (Wed Jan 30, 11:25 am)
Re: [patch 2/6] mmu_notifier: Callbacks to invalidate addr ..., Christoph Lameter, (Wed Jan 30, 12:35 pm)
Re: [patch 2/6] mmu_notifier: Callbacks to invalidate addr ..., Christoph Lameter, (Wed Jan 30, 12:41 pm)
Re: [patch 2/6] mmu_notifier: Callbacks to invalidate addr ..., Christoph Lameter, (Wed Jan 30, 12:50 pm)
Re: [patch 2/6] mmu_notifier: Callbacks to invalidate addr ..., Christoph Lameter, (Wed Jan 30, 1:55 pm)
Re: [patch 2/6] mmu_notifier: Callbacks to invalidate addr ..., Christoph Lameter, (Wed Jan 30, 5:01 pm)
Re: [kvm-devel] [patch 2/6] mmu_notifier: Callbacks to inv ..., Christoph Lameter, (Wed Jan 30, 6:46 pm)
Re: [kvm-devel] [patch 2/6] mmu_notifier: Callbacks to inv ..., Christoph Lameter, (Wed Jan 30, 7:08 pm)
Re: [kvm-devel] [patch 2/6] mmu_notifier: Callbacks to inv ..., Christoph Lameter, (Wed Jan 30, 7:37 pm)
Re: [kvm-devel] [patch 2/6] mmu_notifier: Callbacks to inv ..., Christoph Lameter, (Wed Jan 30, 7:51 pm)
Re: [kvm-devel] mmu_notifier: invalidate_range_start with ..., Christoph Lameter, (Wed Jan 30, 7:56 pm)