From: Aaron Lu <aaron.lu@intel.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"tim.c.chen@linux.intel.com" <tim.c.chen@linux.intel.com>,
"khandual@linux.vnet.ibm.com" <khandual@linux.vnet.ibm.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"ak@linux.intel.com" <ak@linux.intel.com>,
"Wang, Kemi" <kemi.wang@intel.com>,
"Hansen, Dave" <dave.hansen@intel.com>,
"Huang, Ying" <ying.huang@intel.com>
Subject: Re: [PATCH] mm/page_alloc: make sure __rmqueue() etc. always inline
Date: Wed, 18 Oct 2017 16:57:11 +0800 [thread overview]
Message-ID: <20171018085711.GC1753@intel.com> (raw)
In-Reply-To: <29e5343f-b352-fe6a-02a8-74955cd606b8@suse.cz>
On Wed, Oct 18, 2017 at 08:28:56AM +0200, Vlastimil Babka wrote:
> On 10/18/2017 03:53 AM, Lu, Aaron wrote:
> > On Tue, 2017-10-17 at 13:32 +0200, Vlastimil Babka wrote:
> >> With gcc 7.2.1:
> >>> ./scripts/bloat-o-meter base.o mm/page_alloc.o
> >>
> >> add/remove: 1/2 grow/shrink: 2/0 up/down: 2493/-1649 (844)
> >
> > Nice, it clearly showed 844 bytes bloat.
> >
> >> function old new delta
> >> get_page_from_freelist 2898 4937 +2039
> >> steal_suitable_fallback - 365 +365
> >> find_suitable_fallback 31 120 +89
> >> find_suitable_fallback.part 115 - -115
> >> __rmqueue 1534 - -1534
>
> It also shows that steal_suitable_fallback() is no longer inlined. Which
> is fine, because that should ideally be rarely executed.
Ah right, so this script is really good for analysing inline changes.
>
> >>
> >>> [aaron@aaronlu obj]$ size */*/vmlinux
> >>> text data bss dec hex filename
> >>> 10342757 5903208 17723392 33969357 20654cd gcc-4.9.4/base/vmlinux
> >>> 10342757 5903208 17723392 33969357 20654cd gcc-4.9.4/head/vmlinux
> >>> 10332448 5836608 17715200 33884256 2050860 gcc-5.5.0/base/vmlinux
> >>> 10332448 5836608 17715200 33884256 2050860 gcc-5.5.0/head/vmlinux
> >>> 10094546 5836696 17715200 33646442 201676a gcc-6.4.0/base/vmlinux
> >>> 10094546 5836696 17715200 33646442 201676a gcc-6.4.0/head/vmlinux
> >>> 10018775 5828732 17715200 33562707 2002053 gcc-7.2.0/base/vmlinux
> >>> 10018775 5828732 17715200 33562707 2002053 gcc-7.2.0/head/vmlinux
> >>>
> >>> Text size for vmlinux has no change though, probably due to function
> >>> alignment.
> >>
> >> Yep that's useless to show. These differences do add up though, until
> >> they eventually cross the alignment boundary.
> >
> > Agreed.
> > But you know, it is the hot path, the performance improvement might be
> > worth it.
>
> I'd agree, so you can add
>
> Acked-by: Vlastimil Babka <vbabka@suse.cz>
Thanks!
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Aaron Lu <aaron.lu@intel.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"tim.c.chen@linux.intel.com" <tim.c.chen@linux.intel.com>,
"khandual@linux.vnet.ibm.com" <khandual@linux.vnet.ibm.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"ak@linux.intel.com" <ak@linux.intel.com>,
"Wang, Kemi" <kemi.wang@intel.com>,
"Hansen, Dave" <dave.hansen@intel.com>,
"Huang, Ying" <ying.huang@intel.com>
Subject: Re: [PATCH] mm/page_alloc: make sure __rmqueue() etc. always inline
Date: Wed, 18 Oct 2017 16:57:11 +0800 [thread overview]
Message-ID: <20171018085711.GC1753@intel.com> (raw)
In-Reply-To: <29e5343f-b352-fe6a-02a8-74955cd606b8@suse.cz>
On Wed, Oct 18, 2017 at 08:28:56AM +0200, Vlastimil Babka wrote:
> On 10/18/2017 03:53 AM, Lu, Aaron wrote:
> > On Tue, 2017-10-17 at 13:32 +0200, Vlastimil Babka wrote:
> >> With gcc 7.2.1:
> >>> ./scripts/bloat-o-meter base.o mm/page_alloc.o
> >>
> >> add/remove: 1/2 grow/shrink: 2/0 up/down: 2493/-1649 (844)
> >
> > Nice, it clearly showed 844 bytes bloat.
> >
> >> function old new delta
> >> get_page_from_freelist 2898 4937 +2039
> >> steal_suitable_fallback - 365 +365
> >> find_suitable_fallback 31 120 +89
> >> find_suitable_fallback.part 115 - -115
> >> __rmqueue 1534 - -1534
>
> It also shows that steal_suitable_fallback() is no longer inlined. Which
> is fine, because that should ideally be rarely executed.
Ah right, so this script is really good for analysing inline changes.
>
> >>
> >>> [aaron@aaronlu obj]$ size */*/vmlinux
> >>> text data bss dec hex filename
> >>> 10342757 5903208 17723392 33969357 20654cd gcc-4.9.4/base/vmlinux
> >>> 10342757 5903208 17723392 33969357 20654cd gcc-4.9.4/head/vmlinux
> >>> 10332448 5836608 17715200 33884256 2050860 gcc-5.5.0/base/vmlinux
> >>> 10332448 5836608 17715200 33884256 2050860 gcc-5.5.0/head/vmlinux
> >>> 10094546 5836696 17715200 33646442 201676a gcc-6.4.0/base/vmlinux
> >>> 10094546 5836696 17715200 33646442 201676a gcc-6.4.0/head/vmlinux
> >>> 10018775 5828732 17715200 33562707 2002053 gcc-7.2.0/base/vmlinux
> >>> 10018775 5828732 17715200 33562707 2002053 gcc-7.2.0/head/vmlinux
> >>>
> >>> Text size for vmlinux has no change though, probably due to function
> >>> alignment.
> >>
> >> Yep that's useless to show. These differences do add up though, until
> >> they eventually cross the alignment boundary.
> >
> > Agreed.
> > But you know, it is the hot path, the performance improvement might be
> > worth it.
>
> I'd agree, so you can add
>
> Acked-by: Vlastimil Babka <vbabka@suse.cz>
Thanks!
next prev parent reply other threads:[~2017-10-18 8:57 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-09 5:44 [PATCH] page_alloc.c: inline __rmqueue() Aaron Lu
2017-10-09 5:44 ` Aaron Lu
2017-10-09 7:37 ` Anshuman Khandual
2017-10-09 7:37 ` Anshuman Khandual
2017-10-09 7:53 ` Aaron Lu
2017-10-09 7:53 ` Aaron Lu
2017-10-09 20:23 ` Dave Hansen
2017-10-09 20:23 ` Dave Hansen
2017-10-10 2:51 ` Aaron Lu
2017-10-10 2:51 ` Aaron Lu
2017-10-10 2:56 ` [PATCH v2] mm/page_alloc.c: " Aaron Lu
2017-10-10 2:56 ` Aaron Lu
2017-10-10 5:19 ` Dave Hansen
2017-10-10 5:19 ` Dave Hansen
2017-10-10 5:43 ` Aaron Lu
2017-10-10 5:43 ` Aaron Lu
2017-10-10 21:45 ` Andrew Morton
2017-10-10 21:45 ` Andrew Morton
2017-10-10 22:27 ` Andi Kleen
2017-10-10 22:27 ` Andi Kleen
2017-10-11 2:34 ` Aaron Lu
2017-10-11 2:34 ` Aaron Lu
2017-10-13 6:31 ` [PATCH] mm/page_alloc: make sure __rmqueue() etc. always inline Aaron Lu
2017-10-13 6:31 ` Aaron Lu
2017-10-17 11:32 ` Vlastimil Babka
2017-10-17 11:32 ` Vlastimil Babka
2017-10-18 1:53 ` Lu, Aaron
2017-10-18 6:28 ` Vlastimil Babka
2017-10-18 6:28 ` Vlastimil Babka
2017-10-18 8:57 ` Aaron Lu [this message]
2017-10-18 8:57 ` Aaron Lu
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=20171018085711.GC1753@intel.com \
--to=aaron.lu@intel.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@intel.com \
--cc=kemi.wang@intel.com \
--cc=khandual@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=tim.c.chen@linux.intel.com \
--cc=vbabka@suse.cz \
--cc=ying.huang@intel.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.