[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOAebxty1EfEvd++BJq3zBOy81+LFV-WF=ERtoqprbsWZpm3HA@mail.gmail.com>
Date: Wed, 7 Mar 2018 13:01:32 -0500
From: Pavel Tatashin <pasha.tatashin@...cle.com>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: Steve Sistare <steven.sistare@...cle.com>,
Daniel Jordan <daniel.m.jordan@...cle.com>,
m.mizuma@...fujitsu.com, Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...e.com>,
Catalin Marinas <catalin.marinas@....com>,
AKASHI Takahiro <takahiro.akashi@...aro.org>,
Gioh Kim <gi-oh.kim@...fitbricks.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
baiyaowei@...s.chinamobile.com,
Wei Yang <richard.weiyang@...il.com>,
Paul Burton <paul.burton@...s.com>,
Miles Chen <miles.chen@...iatek.com>,
Mel Gorman <mgorman@...e.de>,
Johannes Weiner <hannes@...xchg.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Memory Management List <linux-mm@...ck.org>
Subject: Re: [PATCH v2] mm: might_sleep warning
> Hi,
>
> I've noticed that this function first disables the on-demand
> initialization, and then runs the kthreads. Doesn't that leave a window
> where allocations can fail? The chances are probably small, but I think
> it would be better to avoid it completely, rare failures suck.
>
> Fixing that probably means rethinking the whole synchronization more
> dramatically though :/
>
> Vlastimil
Hi Vlastimil,
You are right, there is a window, it is short, and probably not
possible to reproduce, as it happens before user threads are started,
and after init calls done by smp_init() are finished. The only way it
can happen, as far as I can see, is if some device fires an interrupt,
and interrupt handler decides to allocate a large chunk of memory. The
small allocations will succeed, as zone grow function growth more than
strictly requested, and also there are zones without deferred pages.
I will, however, think some more how to solve this problem to be future proof.
Thank you,
Pavel
Powered by blists - more mailing lists