[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <068b01d524e2$4a5f5c30$df1e1490$@d-silva.org>
Date: Mon, 17 Jun 2019 17:57:16 +1000
From: "Alastair D'Silva" <alastair@...ilva.org>
To: "'Michal Hocko'" <mhocko@...nel.org>,
"'Alastair D'Silva'" <alastair@....ibm.com>
Cc: "'Arun KS'" <arunks@...eaurora.org>,
"'Mukesh Ojha'" <mojha@...eaurora.org>,
"'Logan Gunthorpe'" <logang@...tatee.com>,
"'Wei Yang'" <richard.weiyang@...il.com>,
"'Peter Zijlstra'" <peterz@...radead.org>,
"'Ingo Molnar'" <mingo@...nel.org>, <linux-mm@...ck.org>,
"'Qian Cai'" <cai@....pw>,
"'Thomas Gleixner'" <tglx@...utronix.de>,
"'Andrew Morton'" <akpm@...ux-foundation.org>,
"'Mike Rapoport'" <rppt@...ux.vnet.ibm.com>,
"'Baoquan He'" <bhe@...hat.com>,
"'David Hildenbrand'" <david@...hat.com>,
"'Josh Poimboeuf'" <jpoimboe@...hat.com>,
"'Pavel Tatashin'" <pasha.tatashin@...een.com>,
"'Juergen Gross'" <jgross@...e.com>,
"'Oscar Salvador'" <osalvador@...e.com>,
"'Jiri Kosina'" <jkosina@...e.cz>, <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 4/5] mm/hotplug: Avoid RCU stalls when removing large amounts of memory
> -----Original Message-----
> From: Michal Hocko <mhocko@...nel.org>
> Sent: Monday, 17 June 2019 5:47 PM
> To: Alastair D'Silva <alastair@....ibm.com>
> Cc: alastair@...ilva.org; Arun KS <arunks@...eaurora.org>; Mukesh Ojha
> <mojha@...eaurora.org>; Logan Gunthorpe <logang@...tatee.com>; Wei
> Yang <richard.weiyang@...il.com>; Peter Zijlstra <peterz@...radead.org>;
> Ingo Molnar <mingo@...nel.org>; linux-mm@...ck.org; Qian Cai
> <cai@....pw>; Thomas Gleixner <tglx@...utronix.de>; Andrew Morton
> <akpm@...ux-foundation.org>; Mike Rapoport <rppt@...ux.vnet.ibm.com>;
> Baoquan He <bhe@...hat.com>; David Hildenbrand <david@...hat.com>;
> Josh Poimboeuf <jpoimboe@...hat.com>; Pavel Tatashin
> <pasha.tatashin@...een.com>; Juergen Gross <jgross@...e.com>; Oscar
> Salvador <osalvador@...e.com>; Jiri Kosina <jkosina@...e.cz>; linux-
> kernel@...r.kernel.org
> Subject: Re: [PATCH 4/5] mm/hotplug: Avoid RCU stalls when removing large
> amounts of memory
>
> On Mon 17-06-19 14:36:30, Alastair D'Silva wrote:
> > From: Alastair D'Silva <alastair@...ilva.org>
> >
> > When removing sufficiently large amounts of memory, we trigger RCU
> > stall detection. By periodically calling cond_resched(), we avoid
> > bogus stall warnings.
> >
> > Signed-off-by: Alastair D'Silva <alastair@...ilva.org>
> > ---
> > mm/memory_hotplug.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index
> > e096c987d261..382b3a0c9333 100644
> > --- a/mm/memory_hotplug.c
> > +++ b/mm/memory_hotplug.c
> > @@ -578,6 +578,9 @@ void __remove_pages(struct zone *zone, unsigned
> long phys_start_pfn,
> > __remove_section(zone, __pfn_to_section(pfn),
> map_offset,
> > altmap);
> > map_offset = 0;
> > +
> > + if (!(i & 0x0FFF))
> > + cond_resched();
>
> We already do have cond_resched before __remove_section. Why is an
> additional needed?
I was getting stalls when removing ~1TB of memory.
--
Alastair D'Silva mob: 0423 762 819
skype: alastair_dsilva msn: alastair@...ilva.org
blog: http://alastair.d-silva.org Twitter: @EvilDeece
Powered by blists - more mailing lists