Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2234212ybi; Mon, 17 Jun 2019 00:59:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqz2evfydG6ZKYu4C44aknrFVFSCfcn22+5/oE68gIB/BnFktqwiTtQsrGjVXvmV1R1Uo8xY X-Received: by 2002:a17:90a:9385:: with SMTP id q5mr24374601pjo.126.1560758341281; Mon, 17 Jun 2019 00:59:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560758341; cv=none; d=google.com; s=arc-20160816; b=vAUcO2LN6VNAfRcA0woViBn6Gt9OBMgrKB3CjHiuFrNulF2C30NnFiTdia1OvS/bQx Kct0Q01bNi9he1GgmafqUC5GWxExC4qvdicKl5HvmjDdsw9nMiPWig0PTMVApenPGyRk ByP69+Vdn/Qvm1ToHM9Oh02P1O1NZWfaCSH+kPZFKZDkrDcYg2nlYP15EvmF80WIwjQ5 PjnAauXXfg4r7e07LpDXJICIdcHgyNaU0FcliqYQy4fDvoPrKtH7gE5GeflNdHCEvfSR UnlT+uQcOcKXa7xQOkxumapKbl/I0i0VsTjjyfKBFKzRWaJbP0REv7a6PXFXUCNNEfYn tfWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language:thread-index :content-transfer-encoding:mime-version:message-id:date:subject :in-reply-to:references:cc:to:from:dkim-signature; bh=Ye/e+AaXa2i+xoXcCuIxSUX/e1DcwloLi9hS4ElTXDU=; b=m7VpS0Jf+5WvcLMDwKgH9Uw9/cvKYz9kFVPafGsuKJ/Ll5KiGU1dkVPr6/75Lu4BGg BFh6BkAL/asDVus+YhKIGlJN+1b0PA0NeBKpeNHAGIv42AF53pZJu8UPxOsZHRTHFSvc QscfIkxEJiH+LUfPbxzuhV0A4QIGf/VI4qa1JSjPIE/ZWBmgJq9yXvirGRd4jGISrCd2 t7a2eSN3t4U9pCvKNFrb5Vo1EutYFHDwxRXi47TQtuyXNIHga9CuvQCOsTh8tFSKpylo hSa5uc4b/9h9IWFBZ5MiqyIsM0kQQUBD2FBqudC8k5LIUWwHVmXCPN0yLXQA483gXe3s x/2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@d-silva.org header.s=201810a header.b=VqhZZ2C9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q19si9491895pjp.24.2019.06.17.00.58.45; Mon, 17 Jun 2019 00:59:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@d-silva.org header.s=201810a header.b=VqhZZ2C9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726106AbfFQH5Z (ORCPT + 99 others); Mon, 17 Jun 2019 03:57:25 -0400 Received: from ushosting.nmnhosting.com ([66.55.73.32]:44842 "EHLO ushosting.nmnhosting.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725837AbfFQH5Y (ORCPT ); Mon, 17 Jun 2019 03:57:24 -0400 Received: from mail2.nmnhosting.com (unknown [202.169.106.97]) by ushosting.nmnhosting.com (Postfix) with ESMTPS id 8FFB42DC007F; Mon, 17 Jun 2019 03:57:23 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=d-silva.org; s=201810a; t=1560758243; bh=rFbuhIFz/h0VCo487ij807TQPU9Ah/028l0pxfTo07M=; h=From:To:Cc:References:In-Reply-To:Subject:Date:From; b=VqhZZ2C9MXgQs4mWEU46L5rHGLqpnIRoTGpY24OzxvqlwI7dZXTTYB8Y5aUj0N7mi 6yh2PHcCD4RfBeHo5jvQ47NUczbORBQk3PkDSmo0jUSECUTG14CVtDdBzTYggcARMs ov0YKiTLAO9aKWJjhBp9+yr2QFbljJZ+8UwThAaOO0lDNzeYbMHgWl7G+uH4KMs+R9 6P+FvhFcIo9JRvwTFwUBGFHUqAqMYuaAVNL71EdG28Qfhl5nw+kdcbduv4/FvViN8a VPig2zlIymRNN+WfjFAG8fNGX2J5noMfMWQY1v7hZEThQ3EOebgS1hJMHT9TU6wleJ V63ouJV7+Kf8gM5pf+YXMm8lRQQJ8yHcRMdtsVuzkB/7rULa6In1JGZs9CFF9IKBA7 rb8/aEtc1NIl36SEebXTOj/vqlZL/CnUsE+10n65b9mfGfkaThusbbMYO16F6wF5uW iUBE/dndXK+Qeu8nUEmyp3n65aao0p/EtXy5SrDrlWgfuy73yQi0kv0hG5U+z9/69Y Nkjsh+e7W9pQzI70dFHUMNZXX+c4L6DsME6TgMN8FOmM2JuYE3UUTOIt3P+m/xo4jY hWza4hDgNn56Xyq7292bmWLpXV9CpzI7TpkQAo107TJeWQMj0kaJFWM1/ddpmQhfkf nwLifMmxknexkWaFavoo+4Sw= Received: from Hawking (ntp.lan [10.0.1.1]) (authenticated bits=0) by mail2.nmnhosting.com (8.15.2/8.15.2) with ESMTPSA id x5H7vGaN057238 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 17 Jun 2019 17:57:16 +1000 (AEST) (envelope-from alastair@d-silva.org) From: "Alastair D'Silva" To: "'Michal Hocko'" , "'Alastair D'Silva'" Cc: "'Arun KS'" , "'Mukesh Ojha'" , "'Logan Gunthorpe'" , "'Wei Yang'" , "'Peter Zijlstra'" , "'Ingo Molnar'" , , "'Qian Cai'" , "'Thomas Gleixner'" , "'Andrew Morton'" , "'Mike Rapoport'" , "'Baoquan He'" , "'David Hildenbrand'" , "'Josh Poimboeuf'" , "'Pavel Tatashin'" , "'Juergen Gross'" , "'Oscar Salvador'" , "'Jiri Kosina'" , References: <20190617043635.13201-1-alastair@au1.ibm.com> <20190617043635.13201-5-alastair@au1.ibm.com> <20190617074715.GE30420@dhcp22.suse.cz> In-Reply-To: <20190617074715.GE30420@dhcp22.suse.cz> 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 Message-ID: <068b01d524e2$4a5f5c30$df1e1490$@d-silva.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQKozGZqZYmaEl7M6DfiQR95qivs4QInXwcPAp6henSk0fuP8A== Content-Language: en-au X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mail2.nmnhosting.com [10.0.1.20]); Mon, 17 Jun 2019 17:57:19 +1000 (AEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Michal Hocko > Sent: Monday, 17 June 2019 5:47 PM > To: Alastair D'Silva > Cc: alastair@d-silva.org; Arun KS ; Mukesh Ojha > ; Logan Gunthorpe ; Wei > Yang ; Peter Zijlstra ; > Ingo Molnar ; linux-mm@kvack.org; Qian Cai > ; Thomas Gleixner ; Andrew Morton > ; Mike Rapoport ; > Baoquan He ; David Hildenbrand ; > Josh Poimboeuf ; Pavel Tatashin > ; Juergen Gross ; Oscar > Salvador ; Jiri Kosina ; 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 > > > > 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 > > --- > > 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