From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932812Ab3EBTYF (ORCPT ); Thu, 2 May 2013 15:24:05 -0400 Received: from ja.ssi.bg ([178.16.129.10]:46171 "EHLO ja.ssi.bg" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753608Ab3EBTYD (ORCPT ); Thu, 2 May 2013 15:24:03 -0400 Date: Thu, 2 May 2013 22:24:55 +0300 (EEST) From: Julian Anastasov To: "Paul E. McKenney" cc: Peter Zijlstra , Simon Horman , Eric Dumazet , Ingo Molnar , lvs-devel@vger.kernel.org, netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Pablo Neira Ayuso , Dipankar Sarma Subject: Re: [PATCH v2 1/2] sched: Add cond_resched_rcu_lock() helper In-Reply-To: Message-ID: References: <1367290378-29224-2-git-send-email-horms@verge.net.au> <20130430072944.GA13959@verge.net.au> <20130501091012.GB28253@dyad.programming.kicks-ass.net> <20130501155501.GB7521@dyad.programming.kicks-ass.net> <20130502072623.GE7521@dyad.programming.kicks-ass.net> <20130502173257.GX3780@linux.vnet.ibm.com> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Thu, 2 May 2013, Julian Anastasov wrote: > Note that I'm testing on some 9-year old > UP system, i.e. 1 CPU. Now I enabled SMP to test CONFIG_TREE_RCU > and the results are same. I think, it should be just like > the TINY_RCU in terms of these debuggings (non-preempt). Extra > rcu_read_lock gives me "Illegal context switch in RCU read-side > critical section" in addition to the "BUG: sleeping function > called from invalid context" message. Just to clarify about the test with extra rcu_read_lock because above paragraph is very confusing: - The __might_sleep call with PREEMPT_ACTIVE | PREEMPT_RCU_OFFSET just warns with "BUG: sleeping function called from invalid context" because its rcu_sleep_check is silenced. We match the nesting depth only. - but __cond_resched -> __schedule -> schedule_debug warns about the extra rcu_read_lock() with "BUG: scheduling while atomic" and then with "Illegal context switch in RCU read-side critical section" from rcu_sleep_check(0). Regards -- Julian Anastasov