Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp37001imm; Thu, 14 Jun 2018 14:57:00 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJoZkIniuQEhdVhDKbqaaHGaO9e1iBjUNL/HqZZyDkWQSikVtjmyX0QTTkhjhWc04viachB X-Received: by 2002:a63:2bc4:: with SMTP id r187-v6mr3782614pgr.231.1529013420865; Thu, 14 Jun 2018 14:57:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529013420; cv=none; d=google.com; s=arc-20160816; b=BbXtHbqikrQNf5SG6FLkQ9/qDjBdOzmeVA1UHX80RL29g2xfcoorzp7uuQ3zDe162d F7J0h5utaVMRw+zSCg9Nsfma6ziKagZHiF+YF4Nk25+UIYhq6rV7y8rC9XJ7baR0IJlO sKa01TqMj9QQgYEWRUteQ1LT5aoAs5SCK8IzB9himBYA/+oKsUd3ri9hoXZbSJUuImft +IywWFpuEGyDebwQEnUqJpUGZMZW+xsy9Fhztfa4OanZXeFVwpWBUQD0sWIdrlK4gdVn TXYMvZvART2BoZeLqnyybZj+y1XczBRrv5y5MX7QxRETPJGFXHbMRJlnRw923Fd1xLR3 LtAA== 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:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id:arc-authentication-results; bh=4iL6pxrCJiMNVFeW6CkC8QlF2Qnl8P8BlkkmRmz4744=; b=0FJy3X062QZ8zofDQEZETJNKSTKAhbYIU9J1EKm7FBBWVMFDIvN5/H9FqTmiBdqlKk E6R4rkxbcuAR7jhejVBUH7pAKjU15AZXbpYmx3zXLPx/YhUDgKs+VQjWiGgAyHDc/mir eNqtEy+p3+CCzo/TQw5taHDdT1CX90wBAMs9xQ/HluunX3ZZf+SwMOHSOCZ+FdfIufTt 2ED88MNOL2Bzh3rPy3T+PNN53GZIvHOQc9NG3FtvctrGVoQJYj2a5KTArCCb4tSf9KFC 7ne+FEPuEt/Maqf6Xk38AIGQvTWvnKfCpsvUlrOnOgvlJ1sqgSIcuN1rCdpzOjhIaf7k gudQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u2-v6si5167656pge.53.2018.06.14.14.56.46; Thu, 14 Jun 2018 14:57: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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965099AbeFNV4E (ORCPT + 99 others); Thu, 14 Jun 2018 17:56:04 -0400 Received: from imap1.codethink.co.uk ([176.9.8.82]:46864 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965023AbeFNV4C (ORCPT ); Thu, 14 Jun 2018 17:56:02 -0400 Received: from [148.252.241.226] (helo=xylophone) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1fTaDl-00082M-L1; Thu, 14 Jun 2018 22:55:57 +0100 Message-ID: <1529013356.2289.200.camel@codethink.co.uk> Subject: Re: [PATCH 4.4 173/268] sched/rt: Fix rq->clock_update_flags < RQCF_ACT_SKIP warning From: Ben Hutchings To: Davidlohr Bueso , Matt Fleming , "Peter Zijlstra (Intel)" Cc: stable@vger.kernel.org, Linus Torvalds , Mike Galbraith , Thomas Gleixner , dave@stgolabs.net, rostedt@goodmis.org, Ingo Molnar , Sasha Levin , Greg Kroah-Hartman , LKML Date: Thu, 14 Jun 2018 22:55:56 +0100 In-Reply-To: <20180528100221.993481294@linuxfoundation.org> References: <20180528100202.045206534@linuxfoundation.org> <20180528100221.993481294@linuxfoundation.org> Organization: Codethink Ltd. Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2018-05-28 at 12:02 +0200, Greg Kroah-Hartman wrote: > 4.4-stable review patch.  If anyone has any objections, please let me know. > > ------------------ > > From: Davidlohr Bueso > > [ Upstream commit d29a20645d5e929aa7e8616f28e5d8e1c49263ec ] > > While running rt-tests' pi_stress program I got the following splat: > >   rq->clock_update_flags < RQCF_ACT_SKIP >   WARNING: CPU: 27 PID: 0 at kernel/sched/sched.h:960 assert_clock_updated.isra.38.part.39+0x13/0x20 > >   [...] > >   >   enqueue_top_rt_rq+0xf4/0x150 >   ? cpufreq_dbs_governor_start+0x170/0x170 >   sched_rt_rq_enqueue+0x65/0x80 >   sched_rt_period_timer+0x156/0x360 >   ? sched_rt_rq_enqueue+0x80/0x80 >   __hrtimer_run_queues+0xfa/0x260 >   hrtimer_interrupt+0xcb/0x220 >   smp_apic_timer_interrupt+0x62/0x120 >   apic_timer_interrupt+0xf/0x20 >   > >   [...] > >   do_idle+0x183/0x1e0 >   cpu_startup_entry+0x5f/0x70 >   start_secondary+0x192/0x1d0 >   secondary_startup_64+0xa5/0xb0 > > We can get rid of it be the "traditional" means of adding an > update_rq_clock() call after acquiring the rq->lock in > do_sched_rt_period_timer(). > > The case for the RT task throttling (which this workload also hits) > can be ignored in that the skip_update call is actually bogus and > quite the contrary (the request bits are removed/reverted). > > By setting RQCF_UPDATED we really don't care if the skip is happening > or not and will therefore make the assert_clock_updated() check happy. There is no such flag or assertion in 4.4 or 4.9, so does this change still make sense there? Ben. > Signed-off-by: Davidlohr Bueso > Reviewed-by: Matt Fleming > Acked-by: Peter Zijlstra (Intel) > Cc: Linus Torvalds > Cc: Mike Galbraith > Cc: Thomas Gleixner > Cc: dave@stgolabs.net > Cc: linux-kernel@vger.kernel.org > Cc: rostedt@goodmis.org > Link: http://lkml.kernel.org/r/20180402164954.16255-1-dave@stgolabs.net > Signed-off-by: Ingo Molnar > Signed-off-by: Sasha Levin > Signed-off-by: Greg Kroah-Hartman > --- >  kernel/sched/rt.c |    2 ++ >  1 file changed, 2 insertions(+) > > --- a/kernel/sched/rt.c > +++ b/kernel/sched/rt.c > @@ -822,6 +822,8 @@ static int do_sched_rt_period_timer(stru >   struct rq *rq = rq_of_rt_rq(rt_rq); >   >   raw_spin_lock(&rq->lock); > + update_rq_clock(rq); > + >   if (rt_rq->rt_time) { >   u64 runtime; >   > > > -- Ben Hutchings, Software Developer   Codethink Ltd https://www.codethink.co.uk/ Dale House, 35 Dale Street Manchester, M1 2HF, United Kingdom