Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3299520ybi; Fri, 5 Jul 2019 05:12:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyMPSzgX6XnRvu4PKU2R96GyB7igGZfCF+F7shOmyJyxw2nK4EtQ9gNxPblcK6Lt/t+hzTW X-Received: by 2002:a17:90a:2385:: with SMTP id g5mr5366848pje.12.1562328738353; Fri, 05 Jul 2019 05:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562328738; cv=none; d=google.com; s=arc-20160816; b=JoR9LKbRZsoKbzEjp72CRo+s+kygA4sFMAJ1F0pHQVgvWLGs0w1HS7bH1Q5aJuSL9+ ud3u509cJHM9XlisRhDBh0f4qrhLH6tb+8KgmQl4APdpM/UrQTtcHK8gzIZDzrhSN0V0 jtso5yxAd4+9nLmqjVMZDkzRpQkwwsfmIIGkZ1iLr2jjUoISX463ZxvXXWXJ/MwjfuIa A8MVeG7yMvinQU0JoJJO4xxohcmLxjx4075PvTMsB1i5ETYYWmnYE1sFWzDmdF+tBOXY Dp8mIgUdcvL1cTBm9hVcoim/o5UPLcp9xG4UeGL6hyvIvotyhkSQ0OGWpEvX/jFoj4tH t11Q== 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=6d4KHN3i4zXpEDjesjEyuvQqjM/+ziVHjS82Ev0bcAI=; b=0GcZEg3w8RiPfPWZOMOi+0IrfTZPpPcsGF0zaLaTbeTUqE8sCXJi8hBMjA9bN+01pf Y8qXQYNfD+fTutsinUW5vGaI9a7Q4oqKqIJ/g3SqWPlGTKqL1t9RiqzyaywuFj0LpV0E 9FGnesitw5sWfANmyWuJyW16I7T4JaaGWS/Hh9QRIWcYfx+gyt1MbiiyPq5ReFPX3P49 IQmNpdlaROmHau7bEDKBmxb3NoEe1jTz9MB0knm00uZKEHTqaMzyvtqFqnWY6AHPKo4W BhbFccQ4dYlqxf2z+LMeNG3D+GlKea0KCqpQo+JDnjUzDqvurVVb/jMwURe0UZ7rB0JO NCvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=EpQvMvIb; 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 h8si8159337plt.16.2019.07.05.05.12.03; Fri, 05 Jul 2019 05:12:18 -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=EpQvMvIb; 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 S1728652AbfGELwU (ORCPT + 99 others); Fri, 5 Jul 2019 07:52:20 -0400 Received: from merlin.infradead.org ([205.233.59.134]:34144 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728261AbfGELwU (ORCPT ); Fri, 5 Jul 2019 07:52:20 -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=6d4KHN3i4zXpEDjesjEyuvQqjM/+ziVHjS82Ev0bcAI=; b=EpQvMvIbfZTaXP1ube4rCEQrT NaO2RA66GKegqEQxIpC+saDSbZFKYAlrRsA3ozuyzG+JEGXQWANd0rAym6qjIg/fd7pOuLAMa7bdi TINN6LuTbp17kN8DlPy7FzCIa5QU/HsnO2Zbv42TCNJhbM+zG6DzQgyZk4AH9ZDI5ega/YvLtwqfD jLygNSIrQGsTXBnECgfMbWA+jZEp6qaZI6AuGp7jYrwkp8vSVsNQFzJgBkc3wpkuL+kaMlaWcNNnN eY5gUPOdcdS37PVvpdKWlY5dE01XUYN0S1KosAp/WDymMLcyVNJUu6oEN3s3fUrEbwWUqH3IMcBFQ FrFbRkkQw==; 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.92 #3 (Red Hat Linux)) id 1hjMlD-0001SU-Aw; Fri, 05 Jul 2019 11:52:16 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 707A02026E806; Fri, 5 Jul 2019 13:52:12 +0200 (CEST) Date: Fri, 5 Jul 2019 13:52:12 +0200 From: Peter Zijlstra To: Puranjay Mohan Cc: skhan@linuxfoundation.org, Ingo Molnar , "open list:SCHEDULER" , linux-kernel-mentees@lists.linuxfoundation.org Subject: Re: [PATCH] Sched: Change type of 'overrun' from int to u64 Message-ID: <20190705115212.GT3402@hirez.programming.kicks-ass.net> References: <20190705085609.24453-1-puranjay12@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190705085609.24453-1-puranjay12@gmail.com> 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, Jul 05, 2019 at 02:26:09PM +0530, Puranjay Mohan wrote: > Callers of hrtimer_forward_now() should save the return value in u64. > function sched_rt_period_timer() stores > it in variable 'overrun' of type int > change type of overrun from int to u64 to solve the issue. Is there an actual issue? If we've missed _that_ many periods, something is really buggered. From a code consistency PoV this patch makes sense, but I don't think there anything really wrong with the current code. > Signed-off-by: Puranjay Mohan > --- > kernel/sched/rt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c > index 1e6b909dca36..f5d3893914f5 100644 > --- a/kernel/sched/rt.c > +++ b/kernel/sched/rt.c > @@ -19,7 +19,7 @@ static enum hrtimer_restart sched_rt_period_timer(struct hrtimer *timer) > struct rt_bandwidth *rt_b = > container_of(timer, struct rt_bandwidth, rt_period_timer); > int idle = 0; > - int overrun; > + u64 overrun; > > raw_spin_lock(&rt_b->rt_runtime_lock); > for (;;) { > -- > 2.21.0 >