[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1204908762.8514.114.camel@twins>
Date: Fri, 07 Mar 2008 17:52:42 +0100
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Andrea Arcangeli <andrea@...ranet.com>
Cc: Christoph Lameter <clameter@....com>,
Jack Steiner <steiner@....com>, Nick Piggin <npiggin@...e.de>,
akpm@...ux-foundation.org, Robin Holt <holt@....com>,
Avi Kivity <avi@...ranet.com>, kvm-devel@...ts.sourceforge.net,
general@...ts.openfabrics.org,
Steve Wise <swise@...ngridcomputing.com>,
Roland Dreier <rdreier@...co.com>,
Kanoj Sarcar <kanojsarcar@...oo.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
daniel.blueman@...drics.com
Subject: Re: [PATCH] 3/4 combine RCU with seqlock to allow mmu notifier
methods to sleep (#v9 was 1/4)
On Fri, 2008-03-07 at 16:23 +0100, Andrea Arcangeli wrote:
> @@ -42,11 +45,19 @@ int __mmu_notifier_clear_flush_young(str
> struct mmu_notifier *mn;
> struct hlist_node *n;
> int young = 0;
> + unsigned seq;
>
> rcu_read_lock();
> +restart:
> + seq = read_seqbegin(&mm->mmu_notifier_lock);
> hlist_for_each_entry_rcu(mn, n, &mm->mmu_notifier_list, hlist) {
> - if (mn->ops->clear_flush_young)
> + if (mn->ops->clear_flush_young) {
hlist_del_rcu(&mn->hlist)
> + rcu_read_unlock();
kfree(mn);
> young |= mn->ops->clear_flush_young(mn, mm, address);
*BANG*
> + rcu_read_lock();
> + }
> + if (read_seqretry(&mm->mmu_notifier_lock, seq))
> + goto restart;
> }
> rcu_read_unlock();
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists