[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YbBkrSILgxuu2SEX@dhcp22.suse.cz>
Date: Wed, 8 Dec 2021 08:54:21 +0100
From: Michal Hocko <mhocko@...e.com>
To: Nico Pache <npache@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
shakeelb@...gle.com, ktkhai@...tuozzo.com, shy828301@...il.com,
guro@...com, vbabka@...e.cz, vdavydov.dev@...il.com,
raquini@...hat.com, david@...hat.com
Subject: Re: [PATCH v2 1/1] mm/vmscan.c: Prevent allocating shrinker_info on
offlined nodes
On Tue 07-12-21 19:40:33, Nico Pache wrote:
>
>
> On 12/7/21 18:44, Andrew Morton wrote:
> > On Tue, 7 Dec 2021 17:40:13 -0500 Nico Pache <npache@...hat.com> wrote:
> >
> >> We have run into a panic caused by a shrinker allocation being attempted
> >> on an offlined node.
> >>
> >> Our crash analysis has determined that the issue originates from trying
> >> to allocate pages on an offlined node in expand_one_shrinker_info. This
> >> function makes the incorrect assumption that we can allocate on any node.
> >> To correct this we make sure the node is online before tempting an
> >> allocation. If it is not online choose the closest node.
> >
> > This isn't fully accurate, is it? We could allocate on a node which is
> > presently offline but which was previously onlined, by testing
> > NODE_DATA(nid).
>
> Thanks for the review! I took your changes below into consideration for my V3.
>
> My knowledge of offlined/onlined nodes is quite limited but after looking into
> it it doesnt seem like anything clears the state of NODE_DATA(nid) after a
> try_offline_node is attempted. So theoretically the panic we saw would not
> happen. What is the expected behavior of trying to allocate a page on a offline
> node?
To fall back (in the zonelist order) into the other node. If
__GFP_THISNODE is specified then simply fail the allocation.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists