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: <4881796E12491D4BB15146FE0209CE64657848C6@DE02WEMBXB.internal.synopsys.com>
Date:	Thu, 20 Aug 2015 10:46:56 +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 3/8] ARCv2: perf: implement "event_set_period" for
 future use with interrupts

Hi Peter,

> -----Original Message-----
> From: Peter Zijlstra [mailto:peterz@...radead.org]
> Sent: 18 августа 2015 г. 20:52
> 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 3/8] ARCv2: perf: implement "event_set_period" for future use with interrupts
> 
> On Wed, Aug 05, 2015 at 06:13:29PM +0300, Alexey Brodkin wrote:
> > Even though this hardware implementation allows for more flexibility,
> > in Linux kernel we decided to mimic behavior of other architectures this
> > way:
> >
> >  [1] Set limit value as half of counter's max value (to allow counter to
> >      run after reaching it limit, see below for more explanation):
> >  ---------->8-----------
> >  arc_pmu->max_period = (1ULL << counter_size) / 2 - 1ULL;
> >  ---------->8-----------
> 
> > @@ -317,10 +365,11 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
> >  		return -ENOMEM;
> >
> >  	arc_pmu->n_counters = pct_bcr.c;
> > -	arc_pmu->counter_size = 32 + (pct_bcr.s << 4);
> > +	counter_size = 32 + (pct_bcr.s << 4);
> > +	arc_pmu->max_period = (1ULL << counter_size) - 1ULL;
> >
> 
> I don't see that /2 there..

Probably another good solution for that coupl be merging of 2 following patches in one:
 [1]  [PATCH v2 3/8] ARCv2: perf: implement "event_set_period" for future use with interrupts
 [2] [PATCH v2 5/8] ARCv2: perf: set usable max period as a half of real max period

And then comment will become valid.

-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