All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@suse.de>, Joonsoo Kim <js1304@gmail.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	Markus Trippelsdorf <markus@trippelsdorf.de>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: clarify COMPACTION Kconfig text
Date: Fri, 26 Aug 2016 08:44:13 +0200	[thread overview]
Message-ID: <20160826064406.GB16195@dhcp22.suse.cz> (raw)
In-Reply-To: <alpine.DEB.2.10.1608251524140.48031@chino.kir.corp.google.com>

On Thu 25-08-16 15:34:54, David Rientjes wrote:
> On Thu, 25 Aug 2016, Michal Hocko wrote:
> 
> > > I don't believe it has been an issue in the past for any archs that
> > > don't use thp.
> > 
> > Well, fragmentation is a real problem and order-0 reclaim will be never
> > anywhere close to reliably provide higher order pages. Well, reclaiming
> > a lot of memory can increase the probability of a success but that
> > can quite often lead to over reclaim and long stalls. There are other
> > sources of high order requests than THP so this is not about THP at all
> > IMHO.
> > 
> 
> Would it be possible to list the high-order allocations you are concerned 
> about other than thp that doesn't have fallback behavior like skbuff and 
> slub allocations?  struct task_struct is an order-1 allocation and there 
> may be order-1 slab bucket usage, but what is higher order or requires 
> aggressive compaction to allocate?

kernel stacks (order-2 on many arches), some arches need higher order
pages for page table allocations (at least the upper level AFAIR).

> Surely you're not suggesting that order-0 reclaim cannot form order-1
> memory.

I haven't seen fragmentation that bad that order-1 would be completely
depleted so I wouldn't be all that worried about this. But order-2 can
get depleted as our last oom reports show.

> I am concerned about kernels that require a small memory footprint and
> cannot enable all of CONFIG_COMPACTION and CONFIG_MIGRATION.  Embedded
> devices are not a negligible minority of kernels.

Fair enough. And nobody discourages them from disabling the
compaction. I would expect that kernels for those machines are
configured by people who know what they are doing. They have to be
careful about disabling many other things already and carefully weight
the missing functionality vs. code size savings. I also expect that
workloads on those machines are also careful to not require large
physically contiguous memory blocks very much. Otherwise they would have
problems described by the help text.

So I am not really sure what you are objecting to. I am not making
COMPACTION on unconditionally. I just want to make sure that regular
users do not think this is just a THP thing which is not true since the
lumpy reclaim is gone. On my laptop I have more than 40 slab caches
which have pagesperslab > 2.
-- 
Michal Hocko
SUSE Labs

WARNING: multiple messages have this Message-ID (diff)
From: Michal Hocko <mhocko@kernel.org>
To: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@suse.de>, Joonsoo Kim <js1304@gmail.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	Markus Trippelsdorf <markus@trippelsdorf.de>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: clarify COMPACTION Kconfig text
Date: Fri, 26 Aug 2016 08:44:13 +0200	[thread overview]
Message-ID: <20160826064406.GB16195@dhcp22.suse.cz> (raw)
In-Reply-To: <alpine.DEB.2.10.1608251524140.48031@chino.kir.corp.google.com>

On Thu 25-08-16 15:34:54, David Rientjes wrote:
> On Thu, 25 Aug 2016, Michal Hocko wrote:
> 
> > > I don't believe it has been an issue in the past for any archs that
> > > don't use thp.
> > 
> > Well, fragmentation is a real problem and order-0 reclaim will be never
> > anywhere close to reliably provide higher order pages. Well, reclaiming
> > a lot of memory can increase the probability of a success but that
> > can quite often lead to over reclaim and long stalls. There are other
> > sources of high order requests than THP so this is not about THP at all
> > IMHO.
> > 
> 
> Would it be possible to list the high-order allocations you are concerned 
> about other than thp that doesn't have fallback behavior like skbuff and 
> slub allocations?  struct task_struct is an order-1 allocation and there 
> may be order-1 slab bucket usage, but what is higher order or requires 
> aggressive compaction to allocate?

kernel stacks (order-2 on many arches), some arches need higher order
pages for page table allocations (at least the upper level AFAIR).

> Surely you're not suggesting that order-0 reclaim cannot form order-1
> memory.

I haven't seen fragmentation that bad that order-1 would be completely
depleted so I wouldn't be all that worried about this. But order-2 can
get depleted as our last oom reports show.

> I am concerned about kernels that require a small memory footprint and
> cannot enable all of CONFIG_COMPACTION and CONFIG_MIGRATION.  Embedded
> devices are not a negligible minority of kernels.

Fair enough. And nobody discourages them from disabling the
compaction. I would expect that kernels for those machines are
configured by people who know what they are doing. They have to be
careful about disabling many other things already and carefully weight
the missing functionality vs. code size savings. I also expect that
workloads on those machines are also careful to not require large
physically contiguous memory blocks very much. Otherwise they would have
problems described by the help text.

So I am not really sure what you are objecting to. I am not making
COMPACTION on unconditionally. I just want to make sure that regular
users do not think this is just a THP thing which is not true since the
lumpy reclaim is gone. On my laptop I have more than 40 slab caches
which have pagesperslab > 2.
-- 
Michal Hocko
SUSE Labs

--
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>

  reply	other threads:[~2016-08-26  6:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-23  8:09 [PATCH] mm: clarify COMPACTION Kconfig text Michal Hocko
2016-08-23  8:09 ` Michal Hocko
2016-08-23  8:38 ` Markus Trippelsdorf
2016-08-23  8:38   ` Markus Trippelsdorf
2016-08-23  9:17   ` Michal Hocko
2016-08-23  9:17     ` Michal Hocko
2016-08-25  0:54 ` David Rientjes
2016-08-25  0:54   ` David Rientjes
2016-08-25  6:54   ` Michal Hocko
2016-08-25  6:54     ` Michal Hocko
2016-08-25 22:34     ` David Rientjes
2016-08-25 22:34       ` David Rientjes
2016-08-26  6:44       ` Michal Hocko [this message]
2016-08-26  6:44         ` Michal Hocko
2016-08-29 14:10 ` Johannes Weiner
2016-08-29 14:10   ` Johannes Weiner
2016-08-29 14:50   ` Michal Hocko
2016-08-29 14:50     ` Michal Hocko

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=20160826064406.GB16195@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=js1304@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=markus@trippelsdorf.de \
    --cc=mgorman@suse.de \
    --cc=rientjes@google.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 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.