lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4881796E12491D4BB15146FE0209CE6465784946@DE02WEMBXB.internal.synopsys.com>
Date:	Thu, 20 Aug 2015 11:30:33 +0000
From:	Alexey Brodkin <Alexey.Brodkin@...opsys.com>
To:	'Peter Zijlstra' <peterz@...radead.org>
CC:	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"arc-linux-dev@...opsys.com" <arc-linux-dev@...opsys.com>,
	"arnd@...db.de" <arnd@...db.de>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Vineet Gupta <Vineet.Gupta1@...opsys.com>
Subject: RE: [PATCH v2 4/8] ARCv2: perf: Support sampling events using
 overflow interrupts

Hi Peter,

> -----Original Message-----
> From: Peter Zijlstra [mailto:peterz@...radead.org]
> Sent: 19 августа 2015 г. 1:12
> To: Alexey Brodkin
> Cc: linux-arch@...r.kernel.org; linux-kernel@...r.kernel.org; Vineet.Gupta1@...opsys.com; arc-linux-dev@...opsys.com;
> arnd@...db.de; Arnaldo Carvalho de Melo
> Subject: Re: [PATCH v2 4/8] ARCv2: perf: Support sampling events using overflow interrupts
> 
> On Wed, Aug 05, 2015 at 06:13:30PM +0300, Alexey Brodkin wrote:
> > @@ -319,6 +336,20 @@ static int arc_pmu_add(struct perf_event *event, int flags)
> >  	}
> >
> >  	write_aux_reg(ARC_REG_PCT_INDEX, idx);
> > +
> > +	arc_pmu->act_counter[idx] = event;
> > +
> > +	if (is_sampling_event(event)) {
> > +		/* Mimic full counter overflow as other arches do */
> > +		write_aux_reg(ARC_REG_PCT_INT_CNTL, (u32)arc_pmu->max_period);
> > +		write_aux_reg(ARC_REG_PCT_INT_CNTH,
> > +			      (arc_pmu->max_period >> 32));
> > +
> > +		/* Enable interrupt for this counter */
> > +		write_aux_reg(ARC_REG_PCT_INT_CTRL,
> > +			      read_aux_reg(ARC_REG_PCT_INT_CTRL) | (1 << idx));
> > +	}
> 
> *confused* pmu::add should only start on flags & PERF_EF_START, and then
> we start with hwc->sample_period, not the max_period.

Did you mean here that we should enable interrupts in arc_pmu_start() but not
in arc_pmu_add()?

-Alexey
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ