linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Alastair D'Silva" <alastair@d-silva.org>
To: "'Michal Hocko'" <mhocko@kernel.org>,
	"'Alastair D'Silva'" <alastair@au1.ibm.com>
Cc: "'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
Date: Mon, 17 Jun 2019 17:57:16 +1000	[thread overview]
Message-ID: <068b01d524e2$4a5f5c30$df1e1490$@d-silva.org> (raw)
In-Reply-To: <20190617074715.GE30420@dhcp22.suse.cz>

> -----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.


-- 
Alastair D'Silva           mob: 0423 762 819
skype: alastair_dsilva     msn: alastair@d-silva.org
blog: http://alastair.d-silva.org    Twitter: @EvilDeece




  reply	other threads:[~2019-06-17  7:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-17  4:36 [PATCH 0/5] mm: Cleanup & allow modules to hotplug memory Alastair D'Silva
2019-06-17  4:36 ` [PATCH 1/5] mm: Trigger bug on if a section is not found in __section_nr Alastair D'Silva
2019-06-17  6:46   ` Mike Rapoport
2019-06-17  4:36 ` [PATCH 2/5] mm: don't hide potentially null memmap pointer in sparse_remove_one_section Alastair D'Silva
2019-06-17  6:49   ` Mike Rapoport
2019-06-17  7:26   ` David Hildenbrand
2019-06-17  4:36 ` [PATCH 3/5] mm: Don't manually decrement num_poisoned_pages Alastair D'Silva
2019-06-17  6:52   ` Mike Rapoport
2019-06-17  7:17   ` David Hildenbrand
2019-06-17  4:36 ` [PATCH 4/5] mm/hotplug: Avoid RCU stalls when removing large amounts of memory Alastair D'Silva
2019-06-17  6:53   ` Mike Rapoport
2019-06-17  6:58     ` Alastair D'Silva
2019-06-17  7:47   ` Michal Hocko
2019-06-17  7:57     ` Alastair D'Silva [this message]
2019-06-17  8:21       ` Michal Hocko
2019-06-17 15:49       ` Oscar Salvador
2019-06-17  4:36 ` [PATCH 5/5] mm/hotplug: export try_online_node Alastair D'Silva
2019-06-17  6:59   ` Peter Zijlstra
2019-06-17  7:05     ` Alastair D'Silva
2019-06-17  7:15       ` Christoph Hellwig
2019-06-17  8:00         ` Alastair D'Silva
2019-06-17 13:14           ` 'Christoph Hellwig'
2019-06-17  7:16       ` Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='068b01d524e2$4a5f5c30$df1e1490$@d-silva.org' \
    --to=alastair@d-silva.org \
    --cc=akpm@linux-foundation.org \
    --cc=alastair@au1.ibm.com \
    --cc=arunks@codeaurora.org \
    --cc=bhe@redhat.com \
    --cc=cai@lca.pw \
    --cc=david@redhat.com \
    --cc=jgross@suse.com \
    --cc=jkosina@suse.cz \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=logang@deltatee.com \
    --cc=mhocko@kernel.org \
    --cc=mingo@kernel.org \
    --cc=mojha@codeaurora.org \
    --cc=osalvador@suse.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=peterz@infradead.org \
    --cc=richard.weiyang@gmail.com \
    --cc=rppt@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox