Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp570531ima; Fri, 15 Mar 2019 09:05:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/6A2c9Tms2iFNYEY397ovsP3tV9fFGGuPYkxjMoeFlTv3DIukKWJfpRJ/2YCpVZQoeYjz X-Received: by 2002:a17:902:bd87:: with SMTP id q7mr4907727pls.227.1552665900317; Fri, 15 Mar 2019 09:05:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552665900; cv=none; d=google.com; s=arc-20160816; b=zOz1SuXIu+OkxuaIg1zpMvV3lADa1WTxFYi8aYB8bZjAQ5Ltv8abbcCuQfBAJySkMi Uf4wDJk7TPUZWRgn4ZdhHed0EB6lA06nr6bCCx0mhc/vzLe2QpPqNLGJe70xTlwB92dU mXzkhBuW6P8XK1z9I0E0ZkOa+iy1KmGkpBj/oBgt9Ao6qqSn3Q593RJBFOf0gLATTz4a SA0S3kqXjMpbe7gErlbTgDzgJi79YfKVo5iqtMqH4gDMhvWHowC9K6WRE+X8dzLOUQZb X2/+FcudL4qV+5wex8j8psvQ2QkpkCuXTl6qq3GfV9yEhsvpW2JYsxDs+F/Oulhvfi1H ZSTg== 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; bh=LP5lkZWTVO+rvnbJey1IhFmQSFwQJIYDWBEIykBrz2s=; b=dvaLpyJB3DmLSMr4iUltNHAKEhmVC5Jwgk6nJ21EcHcZUHmO1ZvdBYDO1xnQS92MoQ CSu/tALDjS9HAFj5M1pCYp13oymiLV/KrGAfPO6nt5bjp/hQCPEb+yjiUSRZpnTwEa4R 3RGwsSzqCE6i1HsJBMPtcJk5NzXTGDm+OIq//JKRigbYUUmnIeadTD2XfPZF0QuztTHb Lpy58i/ufDSmnlC2b4kVUNh+U+wI+012US1Hic7+ttW9IRnDrWn0J/x0nP1aVF2LqrAG qrxQvi1bcGS+aHTmh/PrcrbgkdhxbTUQsduWKs6ZcGaqCxxLWdCZDH4ShRDb0h+2euI0 GUgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ItMpVIhn; 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 m22si1948759pgv.562.2019.03.15.09.04.43; Fri, 15 Mar 2019 09:05:00 -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=bombadil.20170209 header.b=ItMpVIhn; 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 S1729405AbfCOQDv (ORCPT + 99 others); Fri, 15 Mar 2019 12:03:51 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:39930 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729378AbfCOQDv (ORCPT ); Fri, 15 Mar 2019 12:03:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=LP5lkZWTVO+rvnbJey1IhFmQSFwQJIYDWBEIykBrz2s=; b=ItMpVIhnGwEZCIHFesJlaW7BG Ti/VzzErV3K9pcwOVumrFzQoEM1/wz2E/mpZK3TTa3J2JBKO0GHYhVMyJPseXRJQgJop8PRDjN2Ww +Ri6YhGDA/NcIiKnyR7/ltWS2oHrfuxLgzEfIpxk/Qj8QHwCz3N4GmmLoaAXZPEOD7TrJDXj5yoV7 m1KwtUbf696tSuphRpPJs6Vtp+fu7kol61hd/IRtQmPUEBOUkN039Zk+D7ZZYg0q0/TaGFkTZ1plL 7qcjRZ74QBkXndY3jqAwCdaEWNunHEtIjxox7nqwVTOxXhZzfYLVPo5rtIQbyCIrV2DWcVBdj/Hzd BP+W/hZtQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4pJE-0003kl-NY; Fri, 15 Mar 2019 16:03:48 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 223C521422948; Fri, 15 Mar 2019 17:03:47 +0100 (CET) Date: Fri, 15 Mar 2019 17:03:47 +0100 From: Peter Zijlstra To: Phil Auld Cc: linux-kernel@vger.kernel.org, Ben Segall , Ingo Molnar Subject: Re: [PATCH] sched/fair: Limit sched_cfs_period_timer loop to avoid hard lockup Message-ID: <20190315160347.GZ5996@hirez.programming.kicks-ass.net> References: <20190313150826.16862-1-pauld@redhat.com> <20190315101150.GV5996@hirez.programming.kicks-ass.net> <20190315153042.GF27131@pauld.bos.csb> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190315153042.GF27131@pauld.bos.csb> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 15, 2019 at 11:30:42AM -0400, Phil Auld wrote: > In my defense here, all the fair.c imbalance pct code also uses 100 :) Yes, I know, I hate on that too ;-) Just never got around to fixing that. > with the below: > > [ 117.235804] cfs_period_timer[cpu2]: period too short, scaling up (new cfs_period_us 2492, cfs_quota_us = 143554) > [ 117.346807] cfs_period_timer[cpu2]: period too short, scaling up (new cfs_period_us 2862, cfs_quota_us = 164863) > [ 117.470569] cfs_period_timer[cpu2]: period too short, scaling up (new cfs_period_us 3286, cfs_quota_us = 189335) > [ 117.574883] cfs_period_timer[cpu2]: period too short, scaling up (new cfs_period_us 3774, cfs_quota_us = 217439) > [ 117.652907] cfs_period_timer[cpu2]: period too short, scaling up (new cfs_period_us 4335, cfs_quota_us = 249716) > [ 118.090535] cfs_period_timer[cpu2]: period too short, scaling up (new cfs_period_us 4978, cfs_quota_us = 286783) > [ 122.098009] cfs_period_timer[cpu2]: period too short, scaling up (new cfs_period_us 5717, cfs_quota_us = 329352) > [ 126.255209] cfs_period_timer[cpu2]: period too short, scaling up (new cfs_period_us 6566, cfs_quota_us = 378240) > [ 126.358060] cfs_period_timer[cpu2]: period too short, scaling up (new cfs_period_us 7540, cfs_quota_us = 434385) > [ 126.538358] cfs_period_timer[cpu9]: period too short, scaling up (new cfs_period_us 8660, cfs_quota_us = 498865) > [ 126.614304] cfs_period_timer[cpu9]: period too short, scaling up (new cfs_period_us 9945, cfs_quota_us = 572915) > [ 126.817085] cfs_period_timer[cpu9]: period too short, scaling up (new cfs_period_us 11422, cfs_quota_us = 657957) > [ 127.352038] cfs_period_timer[cpu9]: period too short, scaling up (new cfs_period_us 13117, cfs_quota_us = 755623) > [ 127.598043] cfs_period_timer[cpu9]: period too short, scaling up (new cfs_period_us 15064, cfs_quota_us = 867785) > > > Plus on repeats I see an occasional > > [ 152.803384] sched_cfs_period_timer: 9 callbacks suppressed That should be fine, right? It's a fallback for an edge case and shouldn't trigger too often anyway. >> I'll rework the maths in the averaged version and post v2 if that makes sense. > > It may have the extra timer fetch, although maybe I could rework it so that it used the > nsstart time the first time and did not need to do it twice in a row. I had originally > reverted the hrtimer_forward_now() to hrtimer_forward() but put that back. Sure; but remember, simpler is often better, esp. for code that typically 'never' runs. > Also, fwiw, this was reported earlier by Anton Blanchard in https://lkml.org/lkml/2018/12/3/1047 Bah, yes, I sometimes loose track of things :/