From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754025AbcHPUV2 (ORCPT ); Tue, 16 Aug 2016 16:21:28 -0400 Received: from g1t6213.austin.hp.com ([15.73.96.121]:48181 "EHLO g1t6213.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752345AbcHPUVY (ORCPT ); Tue, 16 Aug 2016 16:21:24 -0400 Message-ID: <1471378762.29515.4.camel@j-VirtualBox> Subject: Re: [PATCH v2] locking/mutex: Prevent lock starvation when spinning is enabled From: Jason Low To: kbuild test robot Cc: jason.low2@hpe.com, kbuild-all@01.org, Peter Zijlstra , Ingo Molnar , imre.deak@intel.com, linux-kernel@vger.kernel.org, Waiman Long , Davidlohr Bueso , Tim Chen , terry.rudd@hpe.com, "Paul E. McKenney" , jason.low2@hp.com Date: Tue, 16 Aug 2016 13:19:22 -0700 In-Reply-To: <201608110348.S1i8J408%fengguang.wu@intel.com> References: <201608110348.S1i8J408%fengguang.wu@intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2016-08-11 at 04:01 +0800, kbuild test robot wrote: > Hi Jason, > > [auto build test ERROR on tip/locking/core] > [also build test ERROR on v4.8-rc1 next-20160809] > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] > > url: https://github.com/0day-ci/linux/commits/Jason-Low/locking-mutex-Prevent-lock-starvation-when-spinning-is-enabled/20160811-034327 > config: x86_64-randconfig-x013-201632 (attached as .config) > compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705 > reproduce: > # save the attached .config to linux build tree > make ARCH=x86_64 > > All error/warnings (new ones prefixed by >>): > > kernel/locking/mutex.c: In function 'do_yield_to_waiter': > >> kernel/locking/mutex.c:441:10: error: 'struct mutex' has no member named 'yield_to_waiter' > if (lock->yield_to_waiter != true) > ^~ > kernel/locking/mutex.c:442:7: error: 'struct mutex' has no member named 'yield_to_waiter' > lock->yield_to_waiter = true; > ^~ > kernel/locking/mutex.c: In function 'clear_yield_to_waiter': > kernel/locking/mutex.c:447:6: error: 'struct mutex' has no member named 'yield_to_waiter' > lock->yield_to_waiter = false; > ^~ > kernel/locking/mutex.c: In function 'need_yield_to_waiter': > kernel/locking/mutex.c:452:13: error: 'struct mutex' has no member named 'yield_to_waiter' > return lock->yield_to_waiter; > ^~ These compilation errors occur in the !SMP case where the yield_to_waiter variable does not get defined in the mutex structure, but the waiter yield functions still make use of the variable. They should be addressed by also checking for #if defined(CONFIG_SMP) when defining those functions as Waiman had suggested. Thanks, Jason