Re: [COUNTERPATCH] mm: avoid overflowing preempt_count() in mmu_take_all_locks()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrea Arcangeli
Date: Thursday, April 1, 2010 - 9:07 am

On Thu, Apr 01, 2010 at 05:56:02PM +0200, Peter Zijlstra wrote:

Not saying this is necessarily safe, but how can be that relevant with
spinlock->mutex/rwsem conversion? Only thing that breaks with that
conversion would be RCU (the very anon_vma rcu breaks because it
rcu_read_lock disabling preempt and then takes the anon_vma->lock,
that falls apart because taking the anon_vma->lock will imply a
schedule), but nr_ptes is a write operation so it can't be protected
by RCU.


As long as the mmap_sem readers always also take the page_table_lock
we're safe.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [COUNTERPATCH] mm: avoid overflowing preempt_count() i ..., Andrea Arcangeli, (Thu Apr 1, 9:07 am)