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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 17 Jun 2021 16:37:20 +0200
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Charan Teja Kalla <charante@...eaurora.org>,
        akpm@...ux-foundation.org, nigupta@...dia.com, hannes@...xchg.org,
        corbet@....net, mcgrof@...nel.org, keescook@...omium.org,
        yzaikin@...gle.com, aarcange@...hat.com, cl@...ux.com,
        xi.fengfei@....com, mchehab+huawei@...nel.org,
        andrew.a.klychkov@...il.com, dave.hansen@...ux.intel.com,
        bhe@...hat.com, iamjoonsoo.kim@....com, mateusznosek0@...il.com,
        sh_def@....com, vinmenon@...eaurora.org
Cc:     linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH v3 1/2] mm: compaction: support triggering of proactive
 compaction by user

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@...eaurora.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ