lkml.org 
[lkml]   [2006]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [-mm PATCH] RCU: debug sleep check
On Mon, 25 Sep 2006 00:05:09 +0530
Dipankar Sarma <dipankar@in.ibm.com> wrote:

> Add a debug check for rcu read-side critical section code calling
> a function that might sleep which is illegal. The check is enabled only
> if CONFIG_DEBUG_SPINLOCK_SLEEP is set.
>

Does this actually change anything? rcu_read_lock is preempt_disable(), and
might_sleep() already triggers if called inside preempt_disable().

> -#define rcu_read_lock() __rcu_read_lock()
> +#define rcu_read_lock() \
> + do { \
> + rcu_add_read_count(); \
> + __rcu_read_lock(); \

I don't have any __rcu_read_lock(). I guess this is against your
to-be-resent RCU patches?

> +DEFINE_PER_CPU(int, rcu_read_count);

Can have static scope.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-09-24 21:01    [W:0.141 / U:0.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site