[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130502072623.GE7521@dyad.programming.kicks-ass.net>
Date: Thu, 2 May 2013 09:26:24 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Julian Anastasov <ja@....bg>
Cc: Simon Horman <horms@...ge.net.au>,
Eric Dumazet <eric.dumazet@...il.com>,
Ingo Molnar <mingo@...hat.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
lvs-devel@...r.kernel.org, netdev@...r.kernel.org,
netfilter-devel@...r.kernel.org, linux-kernel@...r.kernel.org,
Pablo Neira Ayuso <pablo@...filter.org>,
Dipankar Sarma <dipankar@...ibm.com>
Subject: Re: [PATCH v2 1/2] sched: Add cond_resched_rcu_lock() helper
On Wed, May 01, 2013 at 09:22:08PM +0300, Julian Anastasov wrote:
> > +extern int __cond_resched_rcu(void);
> > +
> > +#define cond_resched_rcu() ({ \
> > + __might_sleep(__FILE__, __LINE__, 0); \
>
> I see your goal. But digging into __might_sleep()
> I see that rcu_sleep_check() will scream for the non-preempt
> case because we are under rcu_read_lock.
#ifdef CONFIG_PREEMPT_RCU
#define PREEMPT_RCU_OFFSET 0
#else
#define PREEMPT_RCU_OFFSET 1
#endif
#define cond_resched_rcu() ({ \
__might_sleep(__FILE__, __LINE__, PREEMPT_RCU_OFFSET); \
__cond_resched_rcu(); \
})
Should work I think..
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists