lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9afd1ae1-bee8-a4cc-1cd6-df92090abeb4@codeaurora.org>
Date:   Wed, 28 Apr 2021 21:02:44 +0530
From:   Charan Teja Kalla <charante@...eaurora.org>
To:     Mel Gorman <mgorman@...hsingularity.net>
Cc:     akpm@...ux-foundation.org, vbabka@...e.cz, bhe@...hat.com,
        nigupta@...dia.com, khalid.aziz@...cle.com,
        mateusznosek0@...il.com, sh_def@....com, iamjoonsoo.kim@....com,
        mcgrof@...nel.org, keescook@...omium.org, yzaikin@...gle.com,
        mhocko@...e.com, rientjes@...gle.com, linux-kernel@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
        vinmenon@...eaurora.org
Subject: Re: [PATCH] mm: compaction: improve /proc trigger for full node
 memory compaction

Thanks Mel for your comments!!

On 4/27/2021 1:39 PM, Mel Gorman wrote:
>> The existing /proc/sys/vm/compact_memory interface do the full node
>> compaction when user writes an arbitrary value to it and is targeted for
>> the usecases like an app launcher prepares the system before the target
>> application runs.
> The intent behind compact_memory was a debugging interface to tell
> the difference between an application failing to allocate a huge page
> prematurely and the inability of compaction to find a free page.
> 

Thanks for clarifying this.

>> This patch adds a new /proc interface,
>> /proc/sys/vm/proactive_compact_memory, and on write of an arbitrary
>> value triggers the full node compaction but can be stopped in the middle
>> if sufficient higher order(COMPACTION_HPAGE_ORDER) pages available in
>> the system. The availability of pages that a user looking for can be
>> given as input through /proc/sys/vm/compaction_proactiveness.
>>
>> [1]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=facdaa917c4d5a376d09d25865f5a863f906234a
>>
>> Signed-off-by: Charan Teja Reddy <charante@...eaurora.org>
> Hence, while I do not object to the patch as-such, I'm wary of the trend
> towards improving explicit out-of-band compaction via proc interfaces. I

I think people relying on this /proc/../compact_memory for reasons of on
demand compaction effects the performance and the kcompactd returns when
 even a single page of the order we are looking for is available. Say
that If an app launching completion is relied on the memory
fragmentation, meaning that lesser the system fragmented, lesser it
needs to spend time on allocation as it gets more higher order pages.
With the current compaction methods we may get just one higher order
page at a time (as compaction stops run after that) thus can effect its
launch completion time. The compact_memory node can help in these
situation where the system administrator can defragment system whenever
is required by writing to the compact_node. This is just a theoretical
example.

Although it is intended for debugging interface, it got a lot of other
applications too.

This patch aims to improve this interface by taking help from tunables
provided by the proactive compaction.

> would have preferred if the focus was on reducing the cost of compaction
> so that direct allocation requests succeed quickly or improving background
> compaction via kcompactd when there has been recent failures.

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
Forum, a Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ