From: Thomas Gleixner <tglx@linutronix.de>
To: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
linux-kernel@vger.kernel.org, peterz@infradead.org,
rafael@kernel.org, vincent.guittot@linaro.org
Subject: Re: [PATCH V8 2/3] irq: Track the interrupt timings
Date: Thu, 23 Mar 2017 20:38:33 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1703232037560.3723@nanos> (raw)
In-Reply-To: <alpine.LFD.2.20.1703231507260.2304@knanqh.ubzr>
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
next prev parent reply other threads:[~2017-03-23 19:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-23 17:42 [PATCH V8 1/3] irq: Add flags to request_percpu_irq function Daniel Lezcano
2017-03-23 17:42 ` [PATCH V8 2/3] irq: Track the interrupt timings Daniel Lezcano
2017-03-23 18:35 ` Peter Zijlstra
2017-03-23 19:02 ` Daniel Lezcano
2017-03-23 19:06 ` Nicolas Pitre
2017-03-23 19:14 ` Nicolas Pitre
2017-03-23 19:38 ` Thomas Gleixner [this message]
2017-03-23 19:50 ` Nicolas Pitre
2017-03-23 21:17 ` Thomas Gleixner
2017-03-23 17:42 ` [PATCH V8 3/3] irq: Compute the periodic interval for interrupts Daniel Lezcano
2017-03-23 19:40 ` Nicolas Pitre
2017-03-24 14:14 ` Daniel Lezcano
2017-03-23 18:34 ` [PATCH V8 1/3] irq: Add flags to request_percpu_irq function Vineet Gupta
2017-03-23 18:54 ` Mark Rutland
2017-03-23 19:19 ` Daniel Lezcano
2017-03-27 8:44 ` Andrew Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1703232037560.3723@nanos \
--to=tglx@linutronix.de \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.pitre@linaro.org \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox