Received: by 10.192.165.148 with SMTP id m20csp3588717imm; Mon, 23 Apr 2018 09:00:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+4z2UCPqSECiyEOlWtstO3oxMYmw1ueEDPHMCJw66pY0NA67Q9blUnoEd3vPscbEWGiO9w X-Received: by 2002:a17:902:6ac3:: with SMTP id i3-v6mr21613084plt.142.1524499217639; Mon, 23 Apr 2018 09:00:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524499217; cv=none; d=google.com; s=arc-20160816; b=S7+JfYXBIs9eITQmhFJ6FKdiioU31GGjQa+7PaPjQOWcxIFBdyd8SGja6AxwgZc2nW G12c2wl1/YjxTDmeK2E3VjSiv3vs+44DFF/qrEwLSkKUhxm0U0xNT6surgT77mDvsYcs IUSuyTZFn6L+JCPTtFX51m0x8g5/0/jRmjnthyWJ5soYP44lrBcfkeEcQxF1JonvSMhS dm4qWTjbeizjBy8NdLMfUVW/xQNlMgnwGX3EP5SYJ0J+c/sQlmx7tKL83sbQH90SkIG9 AfdtFhfB3/2DAP/4cmr1/ehPrYvv0paf+nmPqk34X6xVqbsTqa9NjH9mUk4IEWGXmm4K nbUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=10gZyA6T1foCj+xW2Q3NWXt+Eudqni+EW8t/ufBLvBE=; b=XNig4jHOYb2i4z/c+u7JrvfLO7clM/BjDHphJfz60wcNaDrnAiWVmWMSThFvirrOYI fSG/g91CDLpB+My7pZBAD/6VAUiQcLoLOab5wNx2C4s1OCW9K9nCxFWjhbiseXxs9AGC /jpV0buacswFg/OsnbHFBcTk8UJV3TY9QlxQg0M8unpte89nB36LYG+vaCgEAgJRISBP bm+zd11NA22tjacyknJliLIxmYUQqp3gdJTdpWFc8BSFdSkVhjZ4Sc2Hex2P7cv7byp9 /Z3z5pjEAdOyhBVIcgYiwzv4ACEgRVFprv8ASvxTLbjQxqB3OP51psl6yQfH4N//Cq+3 ypGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=ny4eXfEc; 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 h1si6022138pgs.169.2018.04.23.09.00.03; Mon, 23 Apr 2018 09:00:17 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=ny4eXfEc; 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 S1755791AbeDWP6N (ORCPT + 99 others); Mon, 23 Apr 2018 11:58:13 -0400 Received: from merlin.infradead.org ([205.233.59.134]:53164 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932142AbeDWP6M (ORCPT ); Mon, 23 Apr 2018 11:58:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=10gZyA6T1foCj+xW2Q3NWXt+Eudqni+EW8t/ufBLvBE=; b=ny4eXfEc/oJaUoomspd3d4Pf9 j6XrxZqysSQ4+y+ZPpQ74pUfPe4QbctImeW2/Q40GKIC/CdhHvtbIUammPFnb/H+XL5FySwYe6HPV UsICsrYzcrpqcpGrSHP/JixsD8dm8hYNs1X02NUNS3gDlwom1gEqIxUhJ+xG7IwHPkzxRBbVN53Fi uzAVPCVYLegFfffHBd2fHwJOdlfYG+wg727fHuC71Zbxyg0m9X0hey4ePT0rwJxSnqW/4vIFLfgkz awfytmJh1zfZg+bFfQ1svB/vUJY3Dle43aY1lcEDB/lNBmWjPmMkyM5fZF5b8/02xgXwXprQwTI4e ZN5wCsCnQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fAdqu-0002tm-MG; Mon, 23 Apr 2018 15:58:05 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 96F2E202A2A05; Mon, 23 Apr 2018 17:58:01 +0200 (CEST) Date: Mon, 23 Apr 2018 17:58:01 +0200 From: Peter Zijlstra To: Diego Viola Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, len.brown@intel.com, rui.zhang@intel.com, "Rafael J. Wysocki" Subject: Re: Experiencing freezes with kernel 4.16.3 on a desktop with E5500 CPU (bisect included) Message-ID: <20180423155801.GQ4129@hirez.programming.kicks-ass.net> References: <20180423091633.GU4064@hirez.programming.kicks-ass.net> <20180423114850.GK4082@hirez.programming.kicks-ass.net> <20180423123847.GL4082@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180423123847.GL4082@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 23, 2018 at 02:38:47PM +0200, Peter Zijlstra wrote: > @@ -142,6 +152,13 @@ static void __clocksource_unstable(struct clocksource *cs) > cs->flags &= ~(CLOCK_SOURCE_VALID_FOR_HRES | CLOCK_SOURCE_WATCHDOG); > cs->flags |= CLOCK_SOURCE_UNSTABLE; > > + if (list_empty(&cs->list)) { > + cs->rating = 0; > + return; > + } > + > + __clocksource_change_rating(cs, 0); > + > if (cs->mark_unstable) > cs->mark_unstable(cs); > Thomas, we could not find the de-rate stuff, but the above can be simplified; what happens is: cs->flags |= UNSTABLE; schedule_work(&watchdog_work) kthread_run(clocksource_watchdog_kthread) __clocksource_watchdog_kthread() if (cs->flags & UNSTABLE) __clocksource_change_rating() clocksource_select()