From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933098Ab3GLMIs (ORCPT ); Fri, 12 Jul 2013 08:08:48 -0400 Received: from mail-ee0-f49.google.com ([74.125.83.49]:60192 "EHLO mail-ee0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933067Ab3GLMIq (ORCPT ); Fri, 12 Jul 2013 08:08:46 -0400 Date: Fri, 12 Jul 2013 14:08:43 +0200 From: Ingo Molnar To: Dave Hansen Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Peter Zijlstra Subject: Re: [PATCH] x86: perf: fix incorrect use of do_div() in nmi warning Message-ID: <20130712120843.GA21708@gmail.com> References: <20130708214404.B0B6EA66@viggo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130708214404.B0B6EA66@viggo.jf.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Dave Hansen wrote: > > From: Dave Hansen > > This fixes a bug present in 3.10 and introduced here: > > commit 2ab00456ea8a0d79acb1390659b98416111880b2 > Author: Dave Hansen > Date: Fri Jun 21 08:51:35 2013 -0700 > > x86: Warn when NMI handlers take large amounts of time > > I completely botched understanding the calling conventions of > do_div(). I assumed that do_div() returned the result instead > of realizing that it modifies its argument and returns a > remainder. The side-effect from this would be bogus numbers > for the "msecs" value in the warning messages: > > INFO: NMI handler (perf_event_nmi_handler) took too long to run: 0.114 msecs > > Note, there was a second fix posted by Stephane Eranian for > a separate patch which I also botched: > > http://lkml.kernel.org/r/20130704223010.GA30625@quad > > Both of these fixes need to get pulled in to Linus's tree and > the 3.10 stable tree. This is a brand new v3.11 commit. It should not be included in any -stable tree, is it? Thanks, Ingo