Re: [PATCH v2] mm/page_alloc: don't wake kswapd from rmqueue() unless __GFP_KSWAPD_RECLAIM is specified

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx> writes:
> > 
> 
> > 
> > The above is based on analysis in
> > 
> > https://lore.kernel.org/all/20190107204627.GA25526@xxxxxxxxxxx/
> > https://lore.kernel.org/linux-mm/d642e597-cf7d-b410-16ce-22dff483fd8e@xxxxxxxxxxxxxxxxxxx/
> > 
> > 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@xxxxxxxxxxxxxxxxxxx>

Thanks.

-- 
Mel Gorman
SUSE Labs




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux