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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 Mar 2017 20:38:33 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Nicolas Pitre <nicolas.pitre@...aro.org>
cc:     Daniel Lezcano <daniel.lezcano@...aro.org>,
        linux-kernel@...r.kernel.org, peterz@...radead.org,
        rafael@...nel.org, vincent.guittot@...aro.org
Subject: Re: [PATCH V8 2/3] irq: Track the interrupt timings

On Thu, 23 Mar 2017, Nicolas Pitre wrote:

> On Thu, 23 Mar 2017, Daniel Lezcano wrote:
> 
> > +#define IRQ_TIMINGS_SHIFT	5
> > +#define IRQ_TIMINGS_SIZE	(1 << IRQ_TIMINGS_SHIFT)
> > +#define IRQ_TIMINGS_MASK	(IRQ_TIMINGS_SIZE - 1)
> > +
> > +struct irq_timing {
> > +	u32 irq;
> > +	u64 ts;
> > +};
> > +
> > +struct irq_timings {
> > +	struct irq_timing values[IRQ_TIMINGS_SIZE]; /* our circular buffer */
> 
> This is not very space efficient because of alignment restrictions from 
> the u64 in struct irq_timing. 25% of the memory is wasted.
> 
> You could consider having two arrays instead:
> 
> 	u32 irq_values[IRQ_TIMINGS_SIZE];
> 	u64 ts_values[IRQ_TIMINGS_SIZE];

For the penalty of dirtying two cachelines instead of one.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ