Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1607832
| Path | csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Thomas Gleixner <tglx@linutronix.de> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V8 2/3] irq: Track the interrupt timings |
| Date | Thu, 23 Mar 2017 20:40:02 +0100 |
| Message-ID | <togKu-6RO-5@gated-at.bofh.it> (permalink) |
| References | <tof22-5ye-13@gated-at.bofh.it> <tof22-5ye-11@gated-at.bofh.it> <togr8-6L0-19@gated-at.bofh.it> |
| X-Original-To | Nicolas Pitre <nicolas.pitre@linaro.org> |
| User-Agent | Alpine 2.20 (DEB 67 2015-01-07) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=US-ASCII |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 29 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Daniel Lezcano <daniel.lezcano@linaro.org>, linux-kernel@vger.kernel.org, peterz@infradead.org, rafael@kernel.org, vincent.guittot@linaro.org |
| X-Original-Date | Thu, 23 Mar 2017 20:38:33 +0100 (CET) |
| X-Original-Message-ID | <alpine.DEB.2.20.1703232037560.3723@nanos> |
| X-Original-References | <1490290924-12958-1-git-send-email-daniel.lezcano@linaro.org> <1490290924-12958-2-git-send-email-daniel.lezcano@linaro.org> <alpine.LFD.2.20.1703231507260.2304@knanqh.ubzr> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1607832 |
Show key headers only | View raw
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V8 2/3] irq: Track the interrupt timings Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-03-23 18:50 +0100
Re: [PATCH V8 2/3] irq: Track the interrupt timings Peter Zijlstra <peterz@infradead.org> - 2017-03-23 19:40 +0100
Re: [PATCH V8 2/3] irq: Track the interrupt timings Nicolas Pitre <nicolas.pitre@linaro.org> - 2017-03-23 20:10 +0100
Re: [PATCH V8 2/3] irq: Track the interrupt timings Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-03-23 20:10 +0100
Re: [PATCH V8 2/3] irq: Track the interrupt timings Nicolas Pitre <nicolas.pitre@linaro.org> - 2017-03-23 20:20 +0100
Re: [PATCH V8 2/3] irq: Track the interrupt timings Thomas Gleixner <tglx@linutronix.de> - 2017-03-23 20:40 +0100
Re: [PATCH V8 2/3] irq: Track the interrupt timings Nicolas Pitre <nicolas.pitre@linaro.org> - 2017-03-23 21:00 +0100
Re: [PATCH V8 2/3] irq: Track the interrupt timings Thomas Gleixner <tglx@linutronix.de> - 2017-03-23 22:20 +0100
csiph-web