Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp658871imm; Wed, 15 Aug 2018 04:01:03 -0700 (PDT) X-Google-Smtp-Source: AA+uWPx5zIi2e3lZTR++DI6+7zrXi9cwtvJmprw3nT5Uvd5fvDd6a9Qh7uS26a8f1ZmiOz8pmdbQ X-Received: by 2002:a17:902:bb97:: with SMTP id m23-v6mr17701587pls.215.1534330863749; Wed, 15 Aug 2018 04:01:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534330863; cv=none; d=google.com; s=arc-20160816; b=MuFtUBg7wH/IvBawwpvCyN2TQGG4bFLRX6nBp46BCOU4C33ogiIGci/mg4oTdCvwPP 5CHp4npbQSCQknxLJvKkV0pa7yJY8UPupM9jE8ks25BjDz1pWh514K294RAENh35t/2V pM3/4QUXWZ6ob2m6axBoz6OkP/gXl7JiXfejJYCFkSaBkiqLcWdtHSywGr41f97TDAn3 DTm5yK0MmM5vfUDLEMsOqKhqv8vlBqOmwZVhXyO+I2y8QxbmVgLMhl0xxV2NWveIacP9 t7EwrqvY7pQR22h6XxzPS1dgMrtxyNSoC2tEatyIhGGMLVj8rBJ/q4iOK1Yub/p5SyzE 1xbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=YwlKiyoAjbo4wyHWkfukcrzL0p/5kXwEsUY7LLCDtYk=; b=j2H3/KnqSkAFH07h8bcm2Fs8AcdwbSbGZpBOMm79oqSBy/8JSY/ZVhzxFSkyWaudkO MgST2HwpypMLiLh/bV7/JtvL+kYUcMPGx2uHIz3HT5OUT5jkOs95uiLUMZBrlnJRohKE MFT7bfttyyloWMZrKRygavZF6hQtOLEpo4eVXRl/paLZanzfZvh0bAwbaxxxHAfCzHjC iAKEqJNNjwLsnE2+vU6BwQmpA7AgoB75oNKd/LBC5Sd4rSHJ8wuDsgTnYdiKbCtH+DFj NurhozvbRw3ON5C+ujg5sKhjUAU1PqNAqOGYnb+V+dEBI+v3/AjXMFIv8T7OR1NNqsk0 32ZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z63-v6si23964847pfi.214.2018.08.15.04.00.48; Wed, 15 Aug 2018 04:01:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729047AbeHONvm (ORCPT + 99 others); Wed, 15 Aug 2018 09:51:42 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:54086 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728576AbeHONvl (ORCPT ); Wed, 15 Aug 2018 09:51:41 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 51B8F18A; Wed, 15 Aug 2018 03:59:59 -0700 (PDT) Received: from [0.0.0.0] (e107985-lin.emea.arm.com [10.4.12.239]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0005E3F5BC; Wed, 15 Aug 2018 03:59:55 -0700 (PDT) Subject: Re: [PATCH v3 03/14] sched/core: uclamp: add CPU's clamp groups accounting To: Patrick Bellasi Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Tejun Heo , "Rafael J . Wysocki" , Viresh Kumar , Vincent Guittot , Paul Turner , Morten Rasmussen , Juri Lelli , Todd Kjos , Joel Fernandes , Steve Muckle , Suren Baghdasaryan References: <20180806163946.28380-1-patrick.bellasi@arm.com> <20180806163946.28380-4-patrick.bellasi@arm.com> <20180814164905.GG2605@e110439-lin> <7c45c1a8-24cb-6798-5b6f-3b5dfc9b490d@arm.com> <20180815105428.GA7388@e110439-lin> From: Dietmar Eggemann Message-ID: Date: Wed, 15 Aug 2018 12:59:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180815105428.GA7388@e110439-lin> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/15/2018 12:54 PM, Patrick Bellasi wrote: > On 15-Aug 11:37, Dietmar Eggemann wrote: >> On 08/14/2018 06:49 PM, Patrick Bellasi wrote: >>> Hi Dietmar! >>> >>> On 14-Aug 17:44, Dietmar Eggemann wrote: >>>> On 08/06/2018 06:39 PM, Patrick Bellasi wrote: [..] >> If this is only for testing/debugging, I would suggest a simple one line >> BUG_ON() > > These are (eventually) considered as recoverable errors... thus, > AFAIK, using BUG_ON is overkilling and discouraged: > https://elixir.bootlin.com/linux/latest/source/include/asm-generic/bug.h#L42 Not sure about that. If this refcounting is out of sync, that's indicating a serious issue here for me which should be fixed. >> You find CONFIG_SCHED_DEBUG=y in production kernels as well. > > AFAIK, that setting is discouraged for production kernels... > Moreover, it's still better to WARN sometimes on a production kernel > the crash the device, isnt't it? IMHO, if this is something which should not happen at all, a BUG_ON() is the right thing to do here. And you get the call stack to investigate why it hit.