Messages in this thread | | | Date | Mon, 17 Jun 2019 10:21:56 +0200 | From | Michal Hocko <> | Subject | Re: [PATCH 4/5] mm/hotplug: Avoid RCU stalls when removing large amounts of memory |
| |
On Mon 17-06-19 17:57:16, Alastair D'Silva wrote: > > -----Original Message----- > > From: Michal Hocko <mhocko@kernel.org> > > Sent: Monday, 17 June 2019 5:47 PM > > To: Alastair D'Silva <alastair@au1.ibm.com> > > Cc: alastair@d-silva.org; Arun KS <arunks@codeaurora.org>; Mukesh Ojha > > <mojha@codeaurora.org>; Logan Gunthorpe <logang@deltatee.com>; Wei > > Yang <richard.weiyang@gmail.com>; Peter Zijlstra <peterz@infradead.org>; > > Ingo Molnar <mingo@kernel.org>; linux-mm@kvack.org; Qian Cai > > <cai@lca.pw>; Thomas Gleixner <tglx@linutronix.de>; Andrew Morton > > <akpm@linux-foundation.org>; Mike Rapoport <rppt@linux.vnet.ibm.com>; > > Baoquan He <bhe@redhat.com>; David Hildenbrand <david@redhat.com>; > > Josh Poimboeuf <jpoimboe@redhat.com>; Pavel Tatashin > > <pasha.tatashin@soleen.com>; Juergen Gross <jgross@suse.com>; Oscar > > Salvador <osalvador@suse.com>; Jiri Kosina <jkosina@suse.cz>; linux- > > kernel@vger.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@d-silva.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@d-silva.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.
Have debugged what is the source of the stall? We do cond_resched once a memory section which should be a constant unit of work regardless of the total amount of memory to be removed. -- Michal Hocko SUSE Labs
| |