mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Nicolas Pitre <nicolas.pitre@linaro.org>,
	Hannes Reinecke <hare@suse.com>, Jens Axboe <axboe@kernel.dk>,
	Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH 2/3] irq: Track the interrupt timings
Date: Thu, 22 Jun 2017 16:55:36 +0200	[thread overview]
Message-ID: <bc7affce-e38a-1800-843d-a739884008f6@linaro.org> (raw)
In-Reply-To: <alpine.DEB.2.20.1706221644040.1885@nanos>


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

  reply	other threads:[~2017-06-22 14:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-20 21:26 [GIT PULL V11] irq: next irq tracking Daniel Lezcano
2017-06-20 21:28 ` [PATCH 1/3] irq: Allow to pass the IRQF_TIMER flag with percpu irq request Daniel Lezcano
2017-06-20 21:28   ` [PATCH 2/3] irq: Track the interrupt timings Daniel Lezcano
2017-06-22 14:47     ` Thomas Gleixner
2017-06-22 14:55       ` Daniel Lezcano [this message]
2017-06-20 21:28   ` [PATCH 3/3] irq: Compute the periodic interval for interrupts Daniel Lezcano
2017-06-22 15:25     ` Thomas Gleixner
2017-06-22 16:35       ` Daniel Lezcano
2017-06-22  9:31   ` [PATCH 1/3] irq: Allow to pass the IRQF_TIMER flag with percpu irq request Mark Rutland
2017-06-22 10:36     ` Daniel Lezcano
2017-06-20 22:04 ` [GIT PULL V11] irq: next irq tracking Thomas Gleixner
2017-06-21 10:57   ` Daniel Lezcano
2017-07-06 12:29   ` [PATCH V11] irq: Allow to pass the IRQF_TIMER flag with percpu irq request Daniel Lezcano
2017-07-06 21:21     ` [tip:irq/urgent] genirq: " tip-bot for Daniel Lezcano

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=bc7affce-e38a-1800-843d-a739884008f6@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=axboe@kernel.dk \
    --cc=bhelgaas@google.com \
    --cc=hare@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.pitre@linaro.org \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=tglx@linutronix.de \
    --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

all inboxes | Powered by JetHome®