From: Roman Gushchin <klamm@yandex-team.ru>
To: Christoph Lameter <cl@gentwo.org>
Cc: penberg@kernel.org, mpm@selenic.com, akpm@linux-foundation.org,
mgorman@suse.de, rientjes@google.com, glommer@parallels.com,
hannes@cmpxchg.org, minchan@kernel.org, jiang.liu@huawei.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] slub: Avoid direct compaction if possible
Date: Fri, 14 Jun 2013 19:17:18 +0400 [thread overview]
Message-ID: <51BB33FE.1020403@yandex-team.ru> (raw)
In-Reply-To: <0000013f4319cb46-a5a3de58-1207-4037-ae39-574b58135ea2-000000@email.amazonses.com>
On 14.06.2013 18:32, Christoph Lameter wrote:
> On Fri, 14 Jun 2013, Roman Gushchin wrote:
>
>> Slub tries to allocate contiguous pages even if memory is fragmented and
>> there are no free contiguous pages. In this case it calls direct compaction
>> to allocate contiguous page. Compaction requires the taking of some heavily
>> contended locks (e.g. zone locks). So, running compaction (direct and using
>> kswapd) simultaneously on several processors can cause serious performance
>> issues.
>
> The main thing that this patch does is to add a nocompact flag to the page
> allocator. That needs to be a separate patch. Also fix the description.
> Slub does not invoke compaction. The page allocator initiates compaction
> under certain conditions.
Ok, I'll do.
>
>> It's possible to avoid such problems (or at least to make them less probable)
>> by avoiding direct compaction. If it's not possible to allocate a contiguous
>> page without compaction, slub will fall back to order 0 page(s). In this case
>> kswapd will be woken to perform asynchronous compaction. So, slub can return
>> to default order allocations as soon as memory will be de-fragmented.
>
> Sounds like a good idea. Do you have some numbers to show the effect of
> this patch?
No.
It seems that any numbers here depend on memory fragmentation,
so it's not easy to make a reproducible measurement. If you have
any ideas here, you are welcome.
But there is an actual problem, that this patch solves.
Sometimes I saw the following issue on some machines:
all CPUs are performing compaction, system time is about 80%,
system is completely unreliable. It occurs only on machines
with specific workload (distributed data storage system, so,
intensive disk i/o is performed). A system can fall into
this state fast and unexpectedly or by progressive degradation.
This patch solves this problem.
Thank you for your comments and suggestions!
Regards,
Roman
--
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:[~2013-06-14 15:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-14 13:17 Roman Gushchin
2013-06-14 14:32 ` Christoph Lameter
2013-06-14 15:17 ` Roman Gushchin [this message]
2013-06-14 16:08 ` Christoph Lameter
2013-06-14 16:52 ` Roman Gushchin
2013-06-14 20:26 ` David Rientjes
2013-06-17 12:34 ` Roman Gushchin
2013-06-17 14:27 ` Michal Hocko
2013-06-17 14:54 ` Roman Gushchin
2013-06-17 21:44 ` David Rientjes
2013-06-27 8:49 ` Roman Gushchin
2013-06-27 20:41 ` David Rientjes
2013-07-18 20:29 ` Vinson Lee
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=51BB33FE.1020403@yandex-team.ru \
--to=klamm@yandex-team.ru \
--cc=akpm@linux-foundation.org \
--cc=cl@gentwo.org \
--cc=glommer@parallels.com \
--cc=hannes@cmpxchg.org \
--cc=jiang.liu@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=minchan@kernel.org \
--cc=mpm@selenic.com \
--cc=penberg@kernel.org \
--cc=rientjes@google.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