From: Vlastimil Babka <vbabka@suse.cz>
To: Aaron Lu <aaron.lu@intel.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Huang Ying <ying.huang@intel.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Kemi Wang <kemi.wang@intel.com>,
Tim Chen <tim.c.chen@linux.intel.com>,
Andi Kleen <ak@linux.intel.com>, Michal Hocko <mhocko@suse.com>,
Mel Gorman <mgorman@techsingularity.net>,
Matthew Wilcox <willy@infradead.org>,
Daniel Jordan <daniel.m.jordan@oracle.com>
Subject: Re: [RFC PATCH v2 2/4] mm/__free_one_page: skip merge for order-0 page unless compaction failed
Date: Wed, 21 Mar 2018 08:53:27 +0100 [thread overview]
Message-ID: <5b1f7ef5-0dca-c35f-aba9-3b55f81740b2@suse.cz> (raw)
In-Reply-To: <20180320141101.GB2033@intel.com>
On 03/20/2018 03:11 PM, Aaron Lu wrote:
> On Tue, Mar 20, 2018 at 12:45:50PM +0100, Vlastimil Babka wrote:
>> But why, with all the prefetching in place?
>
> The prefetch is just for its order 0 buddy, if merge happens, then its
> order 1 buddy will also be checked and on and on, so the cache misses
> are much more in merge mode.
I see.
>> Not thrilled about such disruptive change in the name of a
>> microbenchmark :/ Shouldn't normally the pcplists hide the overhead?
>
> Sadly, with the default pcp count, it didn't avoid the lock contention.
> We can of course increase pcp->count to a large enough value to avoid
> entering buddy and thus avoid zone->lock contention, but that would
> require admin to manually change the value on a per-machine per-workload
> basis I believe.
Well, anyone who really cares about performance has to invest some time
to tuning anyway, I believe?
>> If not, wouldn't it make more sense to turn zone->lock into a range lock?
>
> Not familiar with range lock, will need to take a look at it, thanks for
> the pointer.
The suggestion was rather quick and not well thought-out. Range lock
itself is insufficient - for merging/splitting buddies it's ok for
working with struct pages because the candidate buddies are within a
MAX_ORDER range. But the freelists contain pages from the whole zone.
>>
>>> A new document file called "struct_page_filed" is added to explain
>>> the newly reused field in "struct page".
>>
>> Sounds rather ad-hoc for a single field, I'd rather document it via
>> comments.
>
> Dave would like to have a document to explain all those "struct page"
> fields that are repurposed under different scenarios and this is the
> very start of the document :-)
Oh, I see.
> I probably should have explained the intent of the document more.
>
> Thanks for taking a look at this.
>
>>> Suggested-by: Dave Hansen <dave.hansen@intel.com>
>>> Signed-off-by: Aaron Lu <aaron.lu@intel.com>
>>> ---
>>> Documentation/vm/struct_page_field | 5 +++
>>> include/linux/mm_types.h | 1 +
>>> mm/compaction.c | 13 +++++-
>>> mm/internal.h | 27 ++++++++++++
>>> mm/page_alloc.c | 89 +++++++++++++++++++++++++++++++++-----
>>> 5 files changed, 122 insertions(+), 13 deletions(-)
>>> create mode 100644 Documentation/vm/struct_page_field
>>>
next prev parent reply other threads:[~2018-03-21 7:55 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-20 8:54 [RFC PATCH v2 0/4] Eliminate zone->lock contention for will-it-scale/page_fault1 and parallel free Aaron Lu
2018-03-20 8:54 ` [RFC PATCH v2 1/4] mm/page_alloc: use helper functions to add/remove a page to/from buddy Aaron Lu
2018-03-20 11:35 ` Vlastimil Babka
2018-03-20 13:50 ` Aaron Lu
2018-03-20 8:54 ` [RFC PATCH v2 2/4] mm/__free_one_page: skip merge for order-0 page unless compaction failed Aaron Lu
2018-03-20 11:45 ` Vlastimil Babka
2018-03-20 14:11 ` Aaron Lu
2018-03-21 7:53 ` Vlastimil Babka [this message]
2018-03-22 17:15 ` Matthew Wilcox
2018-03-22 18:39 ` Daniel Jordan
2018-03-22 18:50 ` Matthew Wilcox
2018-03-20 22:58 ` Figo.zhang
2018-03-21 1:59 ` Aaron Lu
2018-03-21 4:21 ` Figo.zhang
2018-03-21 4:53 ` Aaron Lu
2018-03-21 5:59 ` Figo.zhang
2018-03-21 7:42 ` Aaron Lu
2018-03-20 8:54 ` [RFC PATCH v2 3/4] mm/rmqueue_bulk: alloc without touching individual page structure Aaron Lu
2018-03-20 22:29 ` Figo.zhang
2018-03-21 1:52 ` Aaron Lu
2018-03-21 12:55 ` Vlastimil Babka
2018-03-21 15:01 ` Aaron Lu
2018-03-29 19:16 ` Daniel Jordan
2018-03-20 8:54 ` [RFC PATCH v2 4/4] mm/free_pcppages_bulk: reduce overhead of cluster operation on free path Aaron Lu
2018-03-21 17:44 ` [RFC PATCH v2 0/4] Eliminate zone->lock contention for will-it-scale/page_fault1 and parallel free Daniel Jordan
2018-03-22 1:30 ` Aaron Lu
2018-03-22 11:20 ` Daniel Jordan
2018-03-29 19:19 ` Daniel Jordan
2018-03-30 1:42 ` Aaron Lu
2018-03-30 14:27 ` Daniel Jordan
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=5b1f7ef5-0dca-c35f-aba9-3b55f81740b2@suse.cz \
--to=vbabka@suse.cz \
--cc=aaron.lu@intel.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=daniel.m.jordan@oracle.com \
--cc=dave.hansen@linux.intel.com \
--cc=kemi.wang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=tim.c.chen@linux.intel.com \
--cc=willy@infradead.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox