All of lore.kernel.org
 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 18:17:25 +0200	[thread overview]
Message-ID: <546f7169-5a9e-fe16-bd83-b0f7a338c3cf@suse.cz> (raw)
In-Reply-To: <8d91a81b-09f3-e814-c9ce-16ff246ed359@codeaurora.org>

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.


  reply	other threads:[~2021-06-17 16:18 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 by user 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
2021-06-17 16:05         ` Charan Teja Kalla
2021-06-17 16:17           ` Vlastimil Babka [this message]
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=546f7169-5a9e-fe16-bd83-b0f7a338c3cf@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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.