All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Huang Shijie <shijie.huang@arm.com>
Cc: Joerg Roedel <joro@8bytes.org>,
	iommu@lists.linux-foundation.org, will.deacon@arm.com,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] iommu/arm-smmu: add a shortcut when the @dev_node is NULL
Date: Wed, 20 Jan 2016 14:46:34 +0000	[thread overview]
Message-ID: <569F9DCA.3030808@arm.com> (raw)
In-Reply-To: <20160120133401.GA3487@localhost.localdomain>

On 20/01/16 13:34, Huang Shijie wrote:
> On Wed, Jan 20, 2016 at 01:02:25PM +0100, Joerg Roedel wrote:
>> On Tue, Jan 12, 2016 at 10:15:05AM +0800, Huang Shijie wrote:
>>> This patch adds a shortcut for the code when the @device_node is NULL.
>>> In my juno-r1 board, the boot time can be faster by 0.004014s.
>>
>> How have you made sure this number is reliable and not just noise in the
>> boot process?
> In the boot process, there are 5 or more modules whose @dev_node are
> NULL. Without the patch, the kernel will waste some cycles to do the
> meaningless calculations for all these modules.

With a quick counting hack, booting 4.4 on my r1 indeed shows 5 calls 
where dev_node is null. Plus 68 calls in which we waste cycles doing 
meaningless calculations when dev_node is non-null. The fundamental 
issue at hand is that the "platform bus" is a rubbish abstraction.

> In theory, it is not noise.
> If you have interest, I can send you the kernel boot logs. :)
>
> Of course, the 0.004014s maybe not accurate enough, it is just an
> approximate number.

A mean and standard deviation of at least, say, 5 runs each with and 
without the patch would be considerably more meaningful (even if still 
far from statistically significant).

Robin.

>
> Thanks
> Huang Shijie
>
> _______________________________________________
> iommu mailing list
> iommu@lists.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/iommu
>

WARNING: multiple messages have this Message-ID (diff)
From: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
To: Huang Shijie <shijie.huang-5wv7dgnIgG8@public.gmane.org>
Cc: will.deacon-5wv7dgnIgG8@public.gmane.org,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] iommu/arm-smmu: add a shortcut when the @dev_node is NULL
Date: Wed, 20 Jan 2016 14:46:34 +0000	[thread overview]
Message-ID: <569F9DCA.3030808@arm.com> (raw)
In-Reply-To: <20160120133401.GA3487-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>

On 20/01/16 13:34, Huang Shijie wrote:
> On Wed, Jan 20, 2016 at 01:02:25PM +0100, Joerg Roedel wrote:
>> On Tue, Jan 12, 2016 at 10:15:05AM +0800, Huang Shijie wrote:
>>> This patch adds a shortcut for the code when the @device_node is NULL.
>>> In my juno-r1 board, the boot time can be faster by 0.004014s.
>>
>> How have you made sure this number is reliable and not just noise in the
>> boot process?
> In the boot process, there are 5 or more modules whose @dev_node are
> NULL. Without the patch, the kernel will waste some cycles to do the
> meaningless calculations for all these modules.

With a quick counting hack, booting 4.4 on my r1 indeed shows 5 calls 
where dev_node is null. Plus 68 calls in which we waste cycles doing 
meaningless calculations when dev_node is non-null. The fundamental 
issue at hand is that the "platform bus" is a rubbish abstraction.

> In theory, it is not noise.
> If you have interest, I can send you the kernel boot logs. :)
>
> Of course, the 0.004014s maybe not accurate enough, it is just an
> approximate number.

A mean and standard deviation of at least, say, 5 runs each with and 
without the patch would be considerably more meaningful (even if still 
far from statistically significant).

Robin.

>
> Thanks
> Huang Shijie
>
> _______________________________________________
> iommu mailing list
> iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
> https://lists.linuxfoundation.org/mailman/listinfo/iommu
>

WARNING: multiple messages have this Message-ID (diff)
From: robin.murphy@arm.com (Robin Murphy)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] iommu/arm-smmu: add a shortcut when the @dev_node is NULL
Date: Wed, 20 Jan 2016 14:46:34 +0000	[thread overview]
Message-ID: <569F9DCA.3030808@arm.com> (raw)
In-Reply-To: <20160120133401.GA3487@localhost.localdomain>

On 20/01/16 13:34, Huang Shijie wrote:
> On Wed, Jan 20, 2016 at 01:02:25PM +0100, Joerg Roedel wrote:
>> On Tue, Jan 12, 2016 at 10:15:05AM +0800, Huang Shijie wrote:
>>> This patch adds a shortcut for the code when the @device_node is NULL.
>>> In my juno-r1 board, the boot time can be faster by 0.004014s.
>>
>> How have you made sure this number is reliable and not just noise in the
>> boot process?
> In the boot process, there are 5 or more modules whose @dev_node are
> NULL. Without the patch, the kernel will waste some cycles to do the
> meaningless calculations for all these modules.

With a quick counting hack, booting 4.4 on my r1 indeed shows 5 calls 
where dev_node is null. Plus 68 calls in which we waste cycles doing 
meaningless calculations when dev_node is non-null. The fundamental 
issue at hand is that the "platform bus" is a rubbish abstraction.

> In theory, it is not noise.
> If you have interest, I can send you the kernel boot logs. :)
>
> Of course, the 0.004014s maybe not accurate enough, it is just an
> approximate number.

A mean and standard deviation of at least, say, 5 runs each with and 
without the patch would be considerably more meaningful (even if still 
far from statistically significant).

Robin.

>
> Thanks
> Huang Shijie
>
> _______________________________________________
> iommu mailing list
> iommu at lists.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/iommu
>

  reply	other threads:[~2016-01-20 14:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-12  2:15 [PATCH] iommu/arm-smmu: add a shortcut when the @dev_node is NULL Huang Shijie
2016-01-12  2:15 ` Huang Shijie
2016-01-12  2:15 ` Huang Shijie
2016-01-20 12:02 ` Joerg Roedel
2016-01-20 12:02   ` Joerg Roedel
2016-01-20 12:02   ` Joerg Roedel
2016-01-20 13:34   ` Huang Shijie
2016-01-20 13:34     ` Huang Shijie
2016-01-20 13:34     ` Huang Shijie
2016-01-20 14:46     ` Robin Murphy [this message]
2016-01-20 14:46       ` Robin Murphy
2016-01-20 14:46       ` Robin Murphy
2016-01-20 16:00       ` Jon Medhurst (Tixy)
2016-01-20 16:00         ` Jon Medhurst (Tixy)
2016-01-21  2:04       ` Huang Shijie
2016-01-21  2:04         ` Huang Shijie
2016-01-21  2:04         ` Huang Shijie

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=569F9DCA.3030808@arm.com \
    --to=robin.murphy@arm.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shijie.huang@arm.com \
    --cc=will.deacon@arm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.