Re: [patch 01/10] emm: mm_lock: Lock a process against reclaim

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jeremy Fitzhardinge <jeremy@...>
Cc: Christoph Lameter <clameter@...>, Robin Holt <holt@...>, <kvm-devel@...>, Peter Zijlstra <a.p.zijlstra@...>, <general@...>, <steiner@...>, <linux-kernel@...>, <linux-mm@...>
Date: Friday, April 4, 2008 - 8:41 pm

On Fri, Apr 04, 2008 at 04:12:42PM -0700, Jeremy Fitzhardinge wrote:

It makes no difference at runtime, coding style preferences are quite
subjective.


It's called a single time when the mmu notifier is registered. It's a
very slow path of course. Any other approach to reduce the complexity
would require memory allocations and it would require
mmu_notifier_register to return -ENOMEM failure. It didn't seem worth
it.


That avoids duplicating .text. Originally they were separated. unlock
can't be a simpler loop because I didn't reserve vm_flags bitflags to
do a single O(N) loop for unlock. If you do malloc+fork+munmap two
vmas will point to the same anon-vma lock, that's why the unlock isn't
simpler unless I mark what I locked with a vm_flags bitflag.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 01/10] emm: mm_lock: Lock a process against reclaim, Christoph Lameter, (Fri Apr 4, 6:30 pm)
Re: [patch 01/10] emm: mm_lock: Lock a process against reclaim, Jeremy Fitzhardinge, (Fri Apr 4, 7:12 pm)
Re: [patch 01/10] emm: mm_lock: Lock a process against reclaim, Andrea Arcangeli, (Fri Apr 4, 8:41 pm)
Re: [patch 01/10] emm: mm_lock: Lock a process against reclaim, Jeremy Fitzhardinge, (Mon Apr 7, 3:02 pm)