From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756549AbcEaWtt (ORCPT ); Tue, 31 May 2016 18:49:49 -0400 Received: from mail-qk0-f169.google.com ([209.85.220.169]:36787 "EHLO mail-qk0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753673AbcEaWtr (ORCPT ); Tue, 31 May 2016 18:49:47 -0400 From: Daniel Bristot de Oliveira X-Google-Original-From: Daniel Bristot de Oliveira Subject: Re: [RFC PATCH 1/2] rcu: sysctl: Panic on RCU Stall To: Josh Triplett References: <20160531191827.GA4574@x> <20160531192325.GA4851@x> Cc: linux-kernel@vger.kernel.org, Jonathan Corbet , "Paul E. McKenney" , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Ingo Molnar , Peter Zijlstra , Arnaldo Carvalho de Melo , "Luis Claudio R. Goncalves" Message-ID: Date: Tue, 31 May 2016 19:49:41 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <20160531192325.GA4851@x> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/31/2016 04:23 PM, Josh Triplett wrote: Hi Josh, > Sorry, realized something else a moment after sending: I don't think > this will build if you use the tiny RCU implementation. That > implementation *does* support tracing, and if you enable tracing, > you'll have CONFIG_RCU_STALL_COMMON=y, but you won't build tree.c where > the variable definition lives. So, the sysctl code will reference a > variable that doesn't exist. Good catch! [root@f23 linux]# egrep '(TINY_RCU|RCU_TRACE)' .config CONFIG_TINY_RCU=y # CONFIG_TREE_RCU_TRACE is not set CONFIG_RCU_TRACE=y [root@f23 linux]# make ... kernel/built-in.o:(.data+0x4688): undefined reference to `sysctl_panic_on_rcu_stall' Makefile:937: recipe for target 'vmlinux' failed make: *** [vmlinux] Error 1 How about this change in the condition: -#ifdef CONFIG_RCU_STALL_COMMON +#if defined(CONFIG_TREE_RCU) || defined(CONFIG_PREEMPT_RCU) It worked fine here, but I may be missing something, so I better check with the experts :-). Thanks for reviewing the patch set! -- Daniel