[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1269894400.1958.76.camel@edumazet-laptop>
Date: Mon, 29 Mar 2010 22:26:40 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Howells <dhowells@...hat.com>
Cc: paulmck@...ux.vnet.ibm.com, Trond.Myklebust@...app.com,
linux-nfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] NFS: Fix RCU warnings in
nfs_inode_return_delegation_noreclaim() [ver #2]
Le lundi 29 mars 2010 à 21:15 +0100, David Howells a écrit :
> My objection to using rcu_dereference_check() here is that it's a dynamic
> check: the compiler emits code to do it, since the lock/unlock status of what
> the pointer points to cannot be determined easily at compiler time - and then
> the barrier is interpolated anyway unnecessarily.
>
Then in this case, use either a condition ORing all possibilities,
or just use rcu_dereference_raw() because its just too complex ?
ptr = rcu_dereference_check(xxx->ptr,
rcu_read_lock_held() ||
lockdep_is_held(&some_global_lock) ||
lockdep_is_held(&xxx->lock));
OR
/* This is too complex to check what protects us at this point */
ptr = rcu_dereference_raw(xxx->ptr);
--
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