linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Mike Kravetz <mike.kravetz@oracle.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Cc: Michal Hocko <mhocko@kernel.org>
Subject: Re: question: should_compact_retry limit
Date: Wed, 5 Jun 2019 09:58:49 +0200	[thread overview]
Message-ID: <908c1454-6ae5-87ca-c6a5-e542fbafa866@suse.cz> (raw)
In-Reply-To: <6377c199-2b9e-e30d-a068-c304d8a3f706@oracle.com>

On 6/5/19 1:30 AM, Mike Kravetz wrote:
> While looking at some really long hugetlb page allocation times, I noticed
> instances where should_compact_retry() was returning true more often that
> I expected.  In one allocation attempt, it returned true 765668 times in a
> row.  To me, this was unexpected because of the following:
> 
> #define MAX_COMPACT_RETRIES 16
> int max_retries = MAX_COMPACT_RETRIES;
> 
> However, if should_compact_retry() returns true via the following path we
> do not increase the retry count.
> 
> 	/*
> 	 * make sure the compaction wasn't deferred or didn't bail out early
> 	 * due to locks contention before we declare that we should give up.
> 	 * But do not retry if the given zonelist is not suitable for
> 	 * compaction.
> 	 */
> 	if (compaction_withdrawn(compact_result)) {
> 		ret = compaction_zonelist_suitable(ac, order, alloc_flags);
> 		goto out;
> 	}
> 
> Just curious, is this intentional?

Hmm I guess we didn't expect compaction_withdrawn() to be so
consistently returned. Do you know what value of compact_result is there
in your test?


  reply	other threads:[~2019-06-05  7:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 23:30 Mike Kravetz
2019-06-05  7:58 ` Vlastimil Babka [this message]
2019-06-05 16:05   ` Mike Kravetz
2019-06-05 16:33     ` 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=908c1454-6ae5-87ca-c6a5-e542fbafa866@suse.cz \
    --to=vbabka@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=mike.kravetz@oracle.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