All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mel Gorman <mgorman@techsingularity.net>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: "Huang, Ying" <ying.huang@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Vlastimil Babka <vbabka@suse.cz>, linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH v2] mm/page_alloc: don't wake kswapd from rmqueue() unless __GFP_KSWAPD_RECLAIM is specified
Date: Mon, 22 May 2023 15:58:33 +0100	[thread overview]
Message-ID: <20230522145833.6nyrtz4u2k6ftbb4@techsingularity.net> (raw)
In-Reply-To: <65c99fe7-c6b8-aca9-e74a-754d882e64ba@I-love.SAKURA.ne.jp>

On Mon, May 22, 2023 at 10:57:03PM +0900, Tetsuo Handa wrote:
> On 2023/05/16 10:44, Huang, Ying wrote:
> > Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> writes:
> > 
> 
> > 
> > The above is based on analysis in
> > 
> > https://lore.kernel.org/all/20190107204627.GA25526@cmpxchg.org/
> > https://lore.kernel.org/linux-mm/d642e597-cf7d-b410-16ce-22dff483fd8e@I-love.SAKURA.ne.jp/
> > 
> > Tetsuo's patch avoids to take pgdat->kswapd_wait.lock when timer base
> > lock is held via adding check for __GFP_KSWAPD_RECLAIM, so breaks the
> > circular dependency chain.
> 
> Yes. Mel, any questions on this patch?
> 

No, I do not, the deadlock issue is more clear now.

> Thomas Gleixner described this lock as kswapd_wait::lock at
> https://lkml.kernel.org/r/168476016890.404.6911447269153588182.tip-bot2@tip-bot2 .
> Should I resubmit this patch with s/pgdat->kswapd_wait/pgdat->kswapd_wait.lock/ or
> s/pgdat->kswapd_wait/kswapd_wait::lock/ ?
> 

I don't think a revision of what's in Andrew's tree is necessary. It could
be improved by outlining the exact deadlock similar based on this thread
but it's somewhat overkill as the fix has other obvious justifications on
its own.

Acked-by: Mel Gorman <mgorman@techsingularity.net>

Thanks.

-- 
Mel Gorman
SUSE Labs


      reply	other threads:[~2023-05-22 14:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-11 13:47 [PATCH] mm/page_alloc: don't wake up kswapd from rmqueue() unless __GFP_KSWAPD_RECLAIM is specified Tetsuo Handa
2023-05-12  3:45 ` Andrew Morton
2023-05-13  9:38   ` Tetsuo Handa
2023-05-13 10:23 ` Mel Gorman
2023-05-14  0:28   ` [PATCH v2] mm/page_alloc: don't wake " Tetsuo Handa
2023-05-15  6:03     ` Huang, Ying
2023-05-15  6:35       ` Huang, Ying
2023-05-15  7:38     ` Mel Gorman
2023-05-15 10:17       ` Tetsuo Handa
2023-05-16  1:44         ` Huang, Ying
2023-05-22 13:57           ` Tetsuo Handa
2023-05-22 14:58             ` Mel Gorman [this message]

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=20230522145833.6nyrtz4u2k6ftbb4@techsingularity.net \
    --to=mgorman@techsingularity.net \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=vbabka@suse.cz \
    --cc=ying.huang@intel.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.