Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1672711
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/3] irq: Track the interrupt timings |
| Date | 2017-06-22 17:00 +0200 |
| Message-ID | <tVbKp-67R-17@gated-at.bofh.it> (permalink) |
| References | <tUySK-5tS-13@gated-at.bofh.it> <tUz2p-5x0-9@gated-at.bofh.it> <tUz2p-5x0-23@gated-at.bofh.it> <tVbAL-62K-29@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Thomas,
thanks for the review.
On 22/06/2017 16:47, Thomas Gleixner wrote:
> On Tue, 20 Jun 2017, Daniel Lezcano wrote:
>> +
>> +struct irq_timings {
>> + u64 values[IRQ_TIMINGS_SIZE]; /* our circular buffer */
>> + unsigned int count; /* Number of interruptions since last inspection */
>
> Groan. These tail comments are horrible.
>
> Please make the struct member names tabular aligned and add proper kernel
> doc comments if you want to add useful documentations for the fields.
[ ... ]
Ok.
>> + * The interrupt number and the timestamp are encoded into a single
>> + * u64 variable to optimize the size.
>> + * 48 bit time stamp and 16 bit IRQ number is way sufficient.
>> + * Who cares an IRQ after 78 hours of idle time?
>> + */
>> +static inline u64 irq_timing_encode(u64 timestamp, int irq)
>> +{
>> + return (timestamp << 16) | irq;
>> +}
>> +
>> +static inline void irq_timing_decode(u64 value, u64 *timestamp, int *irq)
>
> What's wrong with using a return value instead of void?
Nothing wrong, as we are expecting two values I don't like the idea to
have one returned and the other one passed as a pointer. It is a matter
of taste. I can return the irq if you prefer.
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL V11] irq: next irq tracking Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-20 23:30 +0200
[PATCH 1/3] irq: Allow to pass the IRQF_TIMER flag with percpu irq request Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-20 23:40 +0200
[PATCH 2/3] irq: Track the interrupt timings Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-20 23:40 +0200
Re: [PATCH 2/3] irq: Track the interrupt timings Thomas Gleixner <tglx@linutronix.de> - 2017-06-22 16:50 +0200
Re: [PATCH 2/3] irq: Track the interrupt timings Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-22 17:00 +0200
[PATCH 3/3] irq: Compute the periodic interval for interrupts Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-20 23:40 +0200
Re: [PATCH 3/3] irq: Compute the periodic interval for interrupts Thomas Gleixner <tglx@linutronix.de> - 2017-06-22 17:30 +0200
Re: [PATCH 3/3] irq: Compute the periodic interval for interrupts Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-22 18:40 +0200
Re: [PATCH 1/3] irq: Allow to pass the IRQF_TIMER flag with percpu irq request Mark Rutland <mark.rutland@arm.com> - 2017-06-22 11:40 +0200
Re: [PATCH 1/3] irq: Allow to pass the IRQF_TIMER flag with percpu irq request Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-22 12:40 +0200
Re: [GIT PULL V11] irq: next irq tracking Thomas Gleixner <tglx@linutronix.de> - 2017-06-21 00:10 +0200
Re: [GIT PULL V11] irq: next irq tracking Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-21 13:00 +0200
csiph-web