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] [day] [month] [year] [list]
Message-ID: <546f7169-5a9e-fe16-bd83-b0f7a338c3cf@suse.cz>
Date:   Thu, 17 Jun 2021 18:17:25 +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 6:05 PM, Charan Teja Kalla wrote:
> The wait_event/freezable_timeout() documentation says that:
>  * Returns:
>  * 0 if the @condition evaluated to %false after the @timeout elapsed,
> 			or
>  * 1 if the @condition evaluated to %true after the @timeout elapsed,
>  * or the remaining jiffies (at least 1) if the @condition evaluated
>  * to %true before the @timeout elapsed.
> 
> which means the condition must be evaluated to true or timeout should be
> elapsed for the function wait_event_freezable_timeout() to return.
> 
> Please check the macro implementation of __wait_event, where it will be
> in for(;;) till the condition is evaluated to true or timeout happens.
> #define __wait_event_freezable_timeout(wq_head, condition, timeout)
> 
>         ___wait_event(wq_head, ___wait_cond_timeout(condition),
> 
>                       TASK_INTERRUPTIBLE, 0, timeout,
> 
>                       __ret = freezable_schedule_timeout(__ret))
> 
> Thus the plain wakeup of kcompactd don't do the proactive compact work.
> And so we should identify its wakeup for proactive work with a separate
> flag.

OK, you're right, I forgot that the macro has the for loop to guard against
spurious wakeups.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ