From: David Rientjes <rientjes@google.com>
To: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Vlastimil Babka <vbabka@suse.cz>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Hugh Dickins <hughd@google.com>,
Andrea Arcangeli <aarcange@redhat.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Rik van Riel <riel@redhat.com>, Mel Gorman <mgorman@suse.de>
Subject: Re: [RFC 1/4] mm, compaction: introduce kcompactd
Date: Thu, 23 Jul 2015 13:58:20 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.10.1507231353400.31024@chino.kir.corp.google.com> (raw)
In-Reply-To: <20150723060348.GF4449@js1304-P5Q-DELUXE>
On Thu, 23 Jul 2015, Joonsoo Kim wrote:
> > The slub allocator does try to allocate its high-order memory with
> > __GFP_WAIT before falling back to lower orders if possible. I would think
> > that this would be the greatest sign of on-demand memory compaction being
> > a problem, especially since CONFIG_SLUB is the default, but I haven't seen
> > such reports.
>
> In fact, some of our product had trouble with slub's high order
> allocation 5 months ago. At that time, compaction didn't make high order
> page and compaction attempts are frequently deferred. It also causes many
> reclaim to make high order page so I suggested masking out __GFP_WAIT
> and adding __GFP_NO_KSWAPD when trying slub's high order allocation to
> reduce reclaim/compaction overhead. Although using high order page in slub
> has some gains that reducing internal fragmentation and reducing management
> overhead, benefit is marginal compared to the cost at making high order
> page. This solution improves system response time for our case. I planned
> to submit the patch but it is delayed due to my laziness. :)
>
Hi Joonsoo,
On a fragmented machine I can certainly understand that the overhead
involved in allocating the high-order page outweighs the benefit later and
it's better to fallback more quickly to page orders if the cache allows
it.
I believe that this would be improved by the suggestion of doing
background synchronous compaction. So regardless of whether __GFP_WAIT is
set, if the allocation fails then we can kick off background compaction
that will hopefully defragment memory for future callers. That should
make high-order atomic allocations more successful as well.
--
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>
next prev parent reply other threads:[~2015-07-23 20:58 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-02 8:46 [RFC v2 0/4] Outsourcing compaction for THP allocations to kcompactd Vlastimil Babka
2015-07-02 8:46 ` [RFC 1/4] mm, compaction: introduce kcompactd Vlastimil Babka
2015-07-09 21:53 ` David Rientjes
2015-07-21 9:03 ` Vlastimil Babka
2015-07-21 23:07 ` David Rientjes
2015-07-22 15:23 ` Vlastimil Babka
2015-07-22 22:36 ` David Rientjes
2015-07-23 9:18 ` Vlastimil Babka
2015-07-23 21:21 ` David Rientjes
2015-07-24 6:16 ` Joonsoo Kim
2015-07-24 6:45 ` Vlastimil Babka
2015-07-29 0:33 ` David Rientjes
2015-07-29 6:34 ` Vlastimil Babka
2015-07-29 21:54 ` David Rientjes
2015-07-29 23:57 ` Dave Chinner
2015-07-23 6:03 ` Joonsoo Kim
2015-07-23 20:58 ` David Rientjes [this message]
2015-07-24 5:33 ` Joonsoo Kim
2015-07-30 10:58 ` Mel Gorman
2015-07-31 21:17 ` David Rientjes
2015-07-02 8:46 ` [RFC 2/4] mm, thp: stop preallocating hugepages in khugepaged Vlastimil Babka
2015-07-02 8:46 ` [RFC 3/4] mm, thp: check for hugepage availability " Vlastimil Babka
2015-07-02 8:46 ` [RFC 4/4] mm, thp: check hugepage availability for fault allocations Vlastimil Babka
2015-07-24 14:22 ` [RFC v2 0/4] Outsourcing compaction for THP allocations to kcompactd Rik van Riel
2015-07-27 9:30 ` Vlastimil Babka
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=alpine.DEB.2.10.1507231353400.31024@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=riel@redhat.com \
--cc=vbabka@suse.cz \
/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