From owner-freebsd-bugs@FreeBSD.ORG Mon Jun 24 01:44:07 2013 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 69ED1992; Mon, 24 Jun 2013 01:44:07 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ea0-x22a.google.com (mail-ea0-x22a.google.com [IPv6:2a00:1450:4013:c01::22a]) by mx1.freebsd.org (Postfix) with ESMTP id D2ABD16DC; Mon, 24 Jun 2013 01:44:06 +0000 (UTC) Received: by mail-ea0-f170.google.com with SMTP id h10so5705263eaj.15 for ; Sun, 23 Jun 2013 18:44:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=xvJTSn2lBbybhc9SSoip7YxYqzbKCoJDol8hbDQ+lU0=; b=sywqCajInx/7OEyvEoKl+uVO5VLVwzj3s2UJdW3EN1poalK/NXIlPyI6Ydf2Q6WwUT UA/uO36tQllB9X0c17X5SeX6TP4g5rDhfzJ/oAE9DFZ4alVH45agqIPOMH8qQ3HWf/Jg MV0nJQL9pyw7lETB8O7YYQCYOjCXT4Nu8uL+DN/aZxuuqj0S8A/Z4elhMoPBr87EV7ZN 1afgFECwRT46729wM8/uwZF34q2t71riDOFVLLhWTcPHOZNLYG5Sz3pcTw5WSe3ifovb Yi6dUlDc3Dt2eMfwvSWh+RORkn8qyxeH0egaJixcGZrCDNPkARoXEUMmV72DMTts+P2R 5XyQ== MIME-Version: 1.0 X-Received: by 10.15.42.72 with SMTP id t48mr22310417eev.105.1372038245986; Sun, 23 Jun 2013 18:44:05 -0700 (PDT) Received: by 10.14.119.203 with HTTP; Sun, 23 Jun 2013 18:44:05 -0700 (PDT) In-Reply-To: <201306230110.r5N1A0eM050747@freefall.freebsd.org> References: <201306230110.r5N1A0eM050747@freefall.freebsd.org> Date: Sun, 23 Jun 2013 18:44:05 -0700 Message-ID: Subject: Re: kern/179827: [hwpmc] process-mode counters aren't correctly read on multi-core machines From: hiren panchasara To: freebsd-bugs@freebsd.org, Adrian Chadd Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jun 2013 01:44:07 -0000 On Sat, Jun 22, 2013 at 6:10 PM, hiren panchasara wrote: > The following reply was made to PR kern/179827; it has been noted by GNATS. > > From: hiren panchasara > To: Adrian Chadd > Cc: bug-followup@freebsd.org > Subject: Re: kern/179827: [hwpmc] process-mode counters aren't correctly > read on multi-core machines > Date: Sat, 22 Jun 2013 18:05:13 -0700 > > On Sat, Jun 22, 2013 at 1:23 PM, Adrian Chadd wrote: > > Right. Do that but with the test running in another window, so you > > don't get the message overlap. > > Here is how it looks: > > # p/instructions > 293898819 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 0 > # p/instructions > 201677536862 Providing just another dataset: I disabled all the core on my multicore box but one. Here is how it looks now: -bash-4.2$ sysctl hw.ncpu hw.ncpu: 1 -bash-4.2$ sysctl -a | grep cpus kern.sched.cpusetsize: 8 kern.smp.maxcpus: 64 kern.smp.cpus: 1 security.jail.param.cpuset.id: 0 -bash-4.2$ sudo kldload hwpmc Password: -bash-4.2$ pmcstat -p instructions -w 1 ./sin # p/instructions 2567003908 4788889883 4789172557 4831975398 4849956205 4851329559 4851406017 4856042101 4845150406 4851375670 4846480686 4856350074 4787874591 4788928556 4807915946 4846906338 4855030753 4788894220 4789462823 4789545686 4787800623 4788810934 4787603979 4788655804 4950398350 4846598212 4856078443 4846884249 4855005835 4789023855 4788797097 4808609474 4845368074 4856301796 4846450942 4789188889 4787951904 4813144473 4850887893 4846470359 4787946181 4788896164 1599707791 -bash-4.2$ Supporting Adrian's observations. cheers, Hiren