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: <20150826143242.GU16853@twins.programming.kicks-ass.net>
Date:	Wed, 26 Aug 2015 16:32:42 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Alexey Brodkin <Alexey.Brodkin@...opsys.com>
Cc:	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Vineet.Gupta1@...opsys.com" <Vineet.Gupta1@...opsys.com>,
	"arc-linux-dev@...opsys.com" <arc-linux-dev@...opsys.com>,
	"arnd@...db.de" <arnd@...db.de>,
	"acme@...nel.org" <acme@...nel.org>
Subject: Re: [PATCH v3 3/6] ARCv2: perf: Support sampling events using
 overflow interrupts

On Wed, Aug 26, 2015 at 01:21:08PM +0000, Alexey Brodkin wrote:
> Hi Peter,
> 
> On Wed, 2015-08-26 at 15:12 +0200, Peter Zijlstra wrote:
> > On Mon, Aug 24, 2015 at 05:20:20PM +0300, Alexey Brodkin wrote:
> > > @@ -295,6 +317,16 @@ 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));
> > > +	}
> > > +
> > 
> > pmu::add should call pmu::start when PERF_EF_START, without that it
> > should not start the counter, only schedule it.
> > 
> > (although currently all pmu::add() calls will have EF_START set)
> 
> And that's what we do, don't we?
> ----------------------->8-----------------------
> 	if (flags & PERF_EF_START)
> 		arc_pmu_start(event, PERF_EF_RELOAD);
> ----------------------->8-----------------------
> 

D'uh indeed! I read that above as enabling it, while what it really does
it simply program the interrupt thresholds.

--
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