linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nitin Gupta <nigupta@nvidia.com>
To: Charan Teja Reddy <charante@codeaurora.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"mcgrof@kernel.org" <mcgrof@kernel.org>,
	"keescook@chromium.org" <keescook@chromium.org>,
	"yzaikin@google.com" <yzaikin@google.com>,
	"vbabka@suse.cz" <vbabka@suse.cz>,
	"bhe@redhat.com" <bhe@redhat.com>,
	"mateusznosek0@gmail.com" <mateusznosek0@gmail.com>,
	"sh_def@163.com" <sh_def@163.com>,
	"iamjoonsoo.kim@lge.com" <iamjoonsoo.kim@lge.com>,
	"vinmenon@codeaurora.org" <vinmenon@codeaurora.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: RE: [PATCH V2] mm: compaction: support triggering of proactive compaction by user
Date: Tue, 25 May 2021 20:35:37 +0000	[thread overview]
Message-ID: <BYAPR12MB3416727DB2BE2198C324124CD8259@BYAPR12MB3416.namprd12.prod.outlook.com> (raw)
In-Reply-To: <1621345058-26676-1-git-send-email-charante@codeaurora.org>



> -----Original Message-----
> From: charante=codeaurora.org@mg.codeaurora.org
> <charante=codeaurora.org@mg.codeaurora.org> On Behalf Of Charan Teja
> Reddy
> Sent: Tuesday, May 18, 2021 6:38 AM
> To: akpm@linux-foundation.org; mcgrof@kernel.org;
> keescook@chromium.org; yzaikin@google.com; vbabka@suse.cz; Nitin
> Gupta <nigupta@nvidia.com>; bhe@redhat.com;
> mateusznosek0@gmail.com; sh_def@163.com; iamjoonsoo.kim@lge.com;
> vinmenon@codeaurora.org
> Cc: linux-kernel@vger.kernel.org; linux-mm@kvack.org; linux-
> fsdevel@vger.kernel.org; Charan Teja Reddy <charante@codeaurora.org>
> Subject: [PATCH V2] mm: compaction: support triggering of proactive
> compaction by user
> 
> External email: Use caution opening links or attachments
> 
> 
> The proactive compaction[1] gets triggered for every 500msec and run
> compaction on the node for COMPACTION_HPAGE_ORDER (usually order-9)
> pages based on the value set to sysctl.compaction_proactiveness.
> Triggering the compaction for every 500msec in search of
> COMPACTION_HPAGE_ORDER pages is not needed for all applications,
> especially on the embedded system usecases which may have few MB's of
> RAM. Enabling the proactive compaction in its state will endup in running
> almost always on such systems.
> 

You can disable proactive compaction by setting sysctl.compaction_proactiveness to 0.


> Other side, proactive compaction can still be very much useful for getting a
> set of higher order pages in some controllable manner(controlled by using
> the sysctl.compaction_proactiveness). Thus on systems where enabling the
> proactive compaction always may proove not required, can trigger the same
> from user space on write to its sysctl interface. As an example, say app
> launcher decide to launch the memory heavy application which can be
> launched fast if it gets more higher order pages thus launcher can prepare
> the system in advance by triggering the proactive compaction from
> userspace.
> 

You can always do: echo 1 > /proc/sys/vm/compact_memory
On a small system, this should not take much time.

Hijacking proactive compaction for one-off compaction (say, before a large app launch)
does not sound right to me.

Thanks,
Nitin

  parent reply	other threads:[~2021-05-25 20:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 13:37 [PATCH V2] mm: compaction: support triggering of proactive compaction by user Charan Teja Reddy
2021-05-19  1:41 ` 答复: " Chu,Kaiping
2021-05-19 10:19   ` Charan Teja Kalla
2021-05-25 14:20 ` Charan Teja Kalla
2021-05-25 20:35 ` Nitin Gupta [this message]
2021-05-27  9:28   ` Charan Teja Kalla
2021-05-27 23:52     ` Nitin Gupta
2021-05-29  2:57       ` Charan Teja Kalla
2021-05-28 15:19 ` Vlastimil Babka
2021-05-28 17:02   ` Charan Teja Kalla

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=BYAPR12MB3416727DB2BE2198C324124CD8259@BYAPR12MB3416.namprd12.prod.outlook.com \
    --to=nigupta@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=charante@codeaurora.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=keescook@chromium.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=sh_def@163.com \
    --cc=vbabka@suse.cz \
    --cc=vinmenon@codeaurora.org \
    --cc=yzaikin@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;
as well as URLs for NNTP newsgroup(s).