Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755961AbdC2M4m (ORCPT ); Wed, 29 Mar 2017 08:56:42 -0400 Received: from mail-wr0-f179.google.com ([209.85.128.179]:34416 "EHLO mail-wr0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755295AbdC2M4k (ORCPT ); Wed, 29 Mar 2017 08:56:40 -0400 Date: Wed, 29 Mar 2017 14:56:37 +0200 From: Frederic Weisbecker To: Wanpeng Li Cc: Luiz Capitulino , Rik van Riel , "linux-kernel@vger.kernel.org" Subject: Re: [BUG nohz]: wrong user and system time accounting Message-ID: <20170329125635.GA8306@lerouge> References: <20170323165512.60945ac6@redhat.com> <1490636129.8850.76.camel@redhat.com> <20170328132406.7d23579c@redhat.com> <20170328161454.4a5d9e8b@redhat.com> <1490734912.8850.85.camel@redhat.com> <20170328172601.4d17256c@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1733 Lines: 37 On Wed, Mar 29, 2017 at 05:56:30PM +0800, Wanpeng Li wrote: > 2017-03-29 5:26 GMT+08:00 Luiz Capitulino : > > On Tue, 28 Mar 2017 17:01:52 -0400 > > Rik van Riel wrote: > > > >> On Tue, 2017-03-28 at 16:14 -0400, Luiz Capitulino wrote: > >> > On Tue, 28 Mar 2017 13:24:06 -0400 > >> > Luiz Capitulino wrote: > >> > > I'm starting to suspect that the nohz code may be programming > >> > > the tick period to be shorter than 1ms when it re-activates > >> > > the tick. > >> > > >> > And I think I was right, it looks like the nohz code is programming > >> > the tick period incorrectly when restarting the tick. The patch below > >> > fixes things for me, but I still have some homework todo and more > >> > testing before posting a patch for inclusion. Could you guys test it? > >> > >> Your patch seems to work. I don't claim to understand why > >> your patch makes a difference, but for this particular test > >> case, on this particular setup, it seems to work... > > > > I don't fully understand why either yet. I was looking for places > > where nohz might be programming the tick period incorrectly and > > The bug is still present when I config CONTEXT_TRACKING_FORCE and > nohz=off in the boot parameter. Indeed I saw something similar a few days ago with: !CONFIG_NO_HZ_FULL && CONFIG_VIRT_CPU_ACCOUNTING_GEN && CONTEXT_TRACKING_FORCE And it disappeared with CONFIG_NO_HZ_FULL=y so I didn't care much because that setting isn't used in production and in fact I intend to remove CONTEXT_TRACKING_FORCE. But it could be the sign of something important. It might be different than Luiz's bug because I can't reproduce his bug yet even with his config.