Received: by 10.213.65.68 with SMTP id h4csp528372imn; Tue, 13 Mar 2018 11:57:33 -0700 (PDT) X-Google-Smtp-Source: AG47ELt0F1JADjgF8+Rt92qUTW2HIbAMTq+lhO6afUUrSea7aYAV9JSG2B8cga+tB/aLF2EYTtvN X-Received: by 2002:a17:902:680c:: with SMTP id h12-v6mr1553839plk.46.1520967453218; Tue, 13 Mar 2018 11:57:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520967453; cv=none; d=google.com; s=arc-20160816; b=DjjPXPqr0ygU570cvVU8VfcUBR8QieuTCUH1Es98sm5X6iehTWVWdaEwZaf0xUdxJ4 QxWT53pf8FHSP6Ev/VcviYTwZWwXClPfiVzFR5VrqCZaQdufVNnW1hCV0FnqghN0qG6c Od+OnWDnlnyO+sw8EoecfYIzS0vBjcd7UzBRMdWwBC9d6NFBtTNy49ptHVG6C/KdUjHP LIy19g8sSrtPdsHFfdfPH/eV51wMplVxDSzpXT2VVTprg6uD5hmJgtMzTC4bClppuUcr kiCpQXQA4JoBoaimyCm4hZ2NOxObJRPFHeL+ClgjhqwHbvb6qZbe4pVTnIBxJmbZMDEo iQAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=R+Yvw4cevArj8PfCIVB19laZ5cM+D0HJ3+n5NQcO2rE=; b=LrzDs8bMvMrpgIE61F/M414uvI9OWKonLwav5se0mvxx3hnIpStjxoE6pbAEu7UzFD QpwhtLkS7BHtvg/Hn0k6L3mXJgH7tQlbmPh4HAYB1rR1cRzvadfN4fjXwp7369GFcUDh T+ytOjDncFQkZ0J6ddpIccq0O6hNWdaKOP3xDTMGHQVpsTjUzEoohH4yfimwkmwWG6Gi wMoDnCQ7Fto8gTieeEaG50c6sMh3MpJQiksIHTk/qYOccpljrDEHr0jWjhCj3PWJKMpD D7ngHdA4j7l9ASNJAb+dY1hZEFhlvk/INSEtjZxwCFjM/UtAthr3dW5brD2EpLAcGFtH 3epw== ARC-Authentication-Results: i=1; mx.google.com; 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 w27si604493pfl.142.2018.03.13.11.56.55; Tue, 13 Mar 2018 11:57:33 -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; 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 S1752375AbeCMSzw (ORCPT + 99 others); Tue, 13 Mar 2018 14:55:52 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60216 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751901AbeCMSzv (ORCPT ); Tue, 13 Mar 2018 14:55:51 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.9.71]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 294F7FEF; Tue, 13 Mar 2018 18:55:50 +0000 (UTC) Date: Tue, 13 Mar 2018 11:55:49 -0700 From: Andrew Morton To: Pavel Tatashin Cc: steven.sistare@oracle.com, daniel.m.jordan@oracle.com, m.mizuma@jp.fujitsu.com, mhocko@suse.com, catalin.marinas@arm.com, takahiro.akashi@linaro.org, gi-oh.kim@profitbricks.com, heiko.carstens@de.ibm.com, baiyaowei@cmss.chinamobile.com, richard.weiyang@gmail.com, paul.burton@mips.com, miles.chen@mediatek.com, vbabka@suse.cz, mgorman@suse.de, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [v5 1/2] mm: disable interrupts while initializing deferred pages Message-Id: <20180313115549.7badec1c6b85eb5a1cf21eb6@linux-foundation.org> In-Reply-To: <20180313160430.hbjnyiazadt3jwa6@xakep.localdomain> References: <20180309220807.24961-1-pasha.tatashin@oracle.com> <20180309220807.24961-2-pasha.tatashin@oracle.com> <20180312130410.e2fce8e5e38bc2086c7fd924@linux-foundation.org> <20180313160430.hbjnyiazadt3jwa6@xakep.localdomain> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 13 Mar 2018 12:04:30 -0400 Pavel Tatashin wrote: > > > > > --- a/mm/page_alloc.c > > > +++ b/mm/page_alloc.c > > > @@ -1506,7 +1506,6 @@ static void __init deferred_free_pages(int nid, int zid, unsigned long pfn, > > > } else if (!(pfn & nr_pgmask)) { > > > deferred_free_range(pfn - nr_free, nr_free); > > > nr_free = 1; > > > - cond_resched(); > > > } else { > > > nr_free++; > > > > And how can we simply remove these cond_resched()s? I assume this is > > being done because interrupts are now disabled? But those were there > > for a reason, weren't they? > > We must remove cond_resched() because we can't sleep anymore. They were > added to fight NMI timeouts, so I will replace them with > touch_nmi_watchdog() in a follow-up fix. This makes no sense. Any code section where we can add cond_resched() was never subject to NMI timeouts because that code cannot be running with disabled interrupts.