lkml.org 
[lkml]   [2008]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] 3/4 combine RCU with seqlock to allow mmu notifier methods to sleep (#v9 was 1/4)
    From
    Date
    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();





    \
     
     \ /
      Last update: 2008-03-07 17:55    [W:2.427 / U:0.196 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site