linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Charan Teja Kalla <charante@codeaurora.org>,
	akpm@linux-foundation.org, nigupta@nvidia.com,
	hannes@cmpxchg.org, corbet@lwn.net, mcgrof@kernel.org,
	keescook@chromium.org, yzaikin@google.com, aarcange@redhat.com,
	cl@linux.com, xi.fengfei@h3c.com, mchehab+huawei@kernel.org,
	andrew.a.klychkov@gmail.com, dave.hansen@linux.intel.com,
	bhe@redhat.com, iamjoonsoo.kim@lge.com, mateusznosek0@gmail.com,
	sh_def@163.com, vinmenon@codeaurora.org
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] mm: compaction: support triggering of proactive compaction by user
Date: Thu, 17 Jun 2021 16:37:20 +0200	[thread overview]
Message-ID: <0d516cfa-f41c-5ccc-26aa-67871f23dcd3@suse.cz> (raw)
In-Reply-To: <0ca491e8-6d3a-6537-dfa0-ece5f3bb6a1e@codeaurora.org>

On 6/17/21 9:30 AM, Charan Teja Kalla wrote:
> Thanks Vlastimil for your inputs!!
> 
> On 6/16/2021 5:29 PM, Vlastimil Babka wrote:
>>> This triggering of proactive compaction is done on a write to
>>> sysctl.compaction_proactiveness by user.
>>>
>>> [1]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=facdaa917c4d5a376d09d25865f5a863f906234a
>>>
>>> Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
>>> ---
>>> changes in V2:
>> You forgot to also summarize the changes. Please do in next version.
> 
> I think we can get rid off 'proactive_defer' thread variable with the
> timeout approach you suggested. But it is still requires to have one
> additional variable 'proactive_compact_trigger', which main purpose is
> to decide if the kcompactd wakeup is for proactive compaction or not.
> Please see below code:
>    if (wait_event_freezable_timeout() && !proactive_compact_trigger) {
> 	// do the non-proactive work
> 	continue
>    }
>    // do the proactive work
>      .................
> 
> Thus I feel that on writing new proactiveness, it is required to do
> wakeup_kcomppactd() + set a flag that this wakeup is for proactive work.
> 
> Am I failed to get your point here?

The check whether to do non-proactive work is already guarded by
kcompactd_work_requested(), which looks at pgdat->kcompactd_max_order and this
is set by wakeup_kcompactd().

So with a plain wakeup where we don't set pgdat->kcompactd_max_order will make
it consider proactive work instead and we don't need another trigger variable
AFAICS.

  reply	other threads:[~2021-06-17 14:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-31 10:54 [PATCH V3 0/2] mm: compaction: proactive compaction trigger " Charan Teja Reddy
2021-05-31 10:54 ` [PATCH v3 1/2] mm: compaction: support triggering of proactive compaction " Charan Teja Reddy
2021-06-07 10:38   ` Charan Teja Kalla
2021-06-14 14:57     ` Charan Teja Kalla
2021-06-16 11:59   ` Vlastimil Babka
2021-06-17  7:30     ` Charan Teja Kalla
2021-06-17 14:37       ` Vlastimil Babka [this message]
2021-06-17 16:05         ` Charan Teja Kalla
2021-06-17 16:17           ` Vlastimil Babka
2021-05-31 10:54 ` [PATCH v3 2/2] mm: compaction: fix wakeup logic of proactive compaction Charan Teja Reddy

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=0d516cfa-f41c-5ccc-26aa-67871f23dcd3@suse.cz \
    --to=vbabka@suse.cz \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=andrew.a.klychkov@gmail.com \
    --cc=bhe@redhat.com \
    --cc=charante@codeaurora.org \
    --cc=cl@linux.com \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=hannes@cmpxchg.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=keescook@chromium.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mateusznosek0@gmail.com \
    --cc=mcgrof@kernel.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=nigupta@nvidia.com \
    --cc=sh_def@163.com \
    --cc=vinmenon@codeaurora.org \
    --cc=xi.fengfei@h3c.com \
    --cc=yzaikin@google.com \
    --subject='Re: [PATCH v3 1/2] mm: compaction: support triggering of proactive compaction by user' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).