Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1607850
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Nicolas Pitre <nicolas.pitre@linaro.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V8 2/3] irq: Track the interrupt timings |
| Date | Thu, 23 Mar 2017 21:00:01 +0100 |
| Message-ID | <toh3P-72e-1@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> <togKu-6RO-5@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=pF+Upw37vntgPH8cbLTTY3HPHhaemhPLH7G0BNMJOc8=; b=dVE2+jgHHkArFAw1BQhwzaR6mVLBSzQGah8HmAFjLDseWSDDYv7ocqQet8yBtDdmY+ ti4aF2DF6iExUDOzNlBzAmleaYvTVfrc3mlae6uu1dZY5AZLVUDME+4RhskgIis++Yga p7JRs1rppmD2uMBcfkjAuInZaC1LI3nhyY4/I= |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=pF+Upw37vntgPH8cbLTTY3HPHhaemhPLH7G0BNMJOc8=; b=WNfjPC3Y2g5W7Iyn8Srt3gaR/FTigF7q3y7qlqIKDFZ9duyqNMFwN+jYP5+8F7zGL4 Fv4w+rJ21lRoFjIum+xwFAsCtFWQXeT7Ad8i+H5oamBZyqJsDoPYjFIoUIV0+eLc0vSs TF8sO0vNP4I8W6nikh58qYDcUc1nBelhvdDHYDbxo7szeOXTN2BaFWwY+FjVnz/fAz1l 9sbkGlJ2yZ44yrul+NaFP71Ev75ft/M/IP8ITcfMLZgOTBKJsg7tC+1fNQoqWRRLACLs 2EEMD0pHrZPutUBpWd4mGvdq2eGb0y5V05wkZmDiIy2T0M714PfQjVs4YxlK29cIXKOf FGig== |
| X-Gm-Message-State | AFeK/H3tN2jZQ4F2xveybU/2InJ0gxQ4olI9tSkl4E4/tQ19AylOJjWl/NuSSwd+x2xLq5xd |
| X-Received | by 10.107.143.131 with SMTP id r125mr4959518iod.148.1490298603391; Thu, 23 Mar 2017 12:50:03 -0700 (PDT) |
| User-Agent | Alpine 2.20 (LFD 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 | 42 |
| 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 15:50:01 -0400 (EDT) |
| X-Original-Message-ID | <alpine.LFD.2.20.1703231542500.2304@knanqh.ubzr> |
| 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> <alpine.DEB.2.20.1703232037560.3723@nanos> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1607850 |
Show key headers only | View raw
On Thu, 23 Mar 2017, Thomas Gleixner wrote:
> 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.
Well...
Is there a need for 64 bits of relative time stamps?
And 32 bits of IRQ number?
I'd say that 48 bit time stamp and 16 bit IRQ number is way sufficient.
Who cares if we mispredict an IRQ after 78 hours of idle time?
Hence:
u64 value = (ts << 16) | irq;
Nicolas
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