Received: by 10.213.65.68 with SMTP id h4csp552304imn; Tue, 13 Mar 2018 12:47:42 -0700 (PDT) X-Google-Smtp-Source: AG47ELv2vKu1W87oI3RK7wkmoR4Y/mxhxBmhyZgji3SrfbfVAF5zlCzYdzqv/pdScVE1vF4p3Fzd X-Received: by 10.99.114.77 with SMTP id c13mr1423380pgn.286.1520970462914; Tue, 13 Mar 2018 12:47:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520970462; cv=none; d=google.com; s=arc-20160816; b=BKKFP5scHOQU0GyrwbPkJc6G0kQ8LlfHUWEGa4amW5/qImu30Md9g8fex+nYLj8Td6 dGn1mSAnGet0fMTV+jFby9OotLnViPV33w8rxnLbbPg7gSP5uONnbgAFoJzabjJPcyNE 22060eHzd8EZmHJ0vcX0pHihBjn2fzcmYD92c5KEzvPo+QGMT9+iWVmk6zXNdvSw7QBM llwUjGcVTjn/cJ3PSD+VdLHXQ7eKMSiRlx+jQgVgpA/BODsoPENvtcIsPPVybcuTAgpt p83+99yUb+pM4Ib4bu0fTlF/fC0OaqD6Sm2+eoyIPqdOEnX0/gyIuisYZEd1I0JwbZHw P1AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=7QT1qdkPqjzZEo/XLwc4oDdgGCXJ++EFvUy32qhdSgA=; b=CF/rYLM+ZPHuDxo0euy/RHD/xCeZxdUVaZ+R+DGzwjY/Vi6RYTnASGou4XD9f6Fb22 iOQlTa2lMtDHqdBjNom4uRNoHGlIk6wHegIN3SU5f3Ml3AU0hG89iy/1e45dHofCwWvZ 7lofER4VP40anP9OFl/BUjegF5TVH9gGCVKi7EEW1FGz3xohrCrxXc3oR00r1x8Rj942 3+2lXLHn+XdXOGNz6mRgPQk/BOwsd4DT8Vlm8xbo0dyLUHM8xIahBZx+z3F6XWh02oiu qdVHAvq9v9EIrSMIw2o8GlSPD2GpqYKMgMuLdnEqgA5IICjbqqQ921YVVjr/8m8ZSYhX n/YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=bgnu6E+K; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y11-v6si623724plg.173.2018.03.13.12.47.28; Tue, 13 Mar 2018 12:47:42 -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=@oracle.com header.s=corp-2017-10-26 header.b=bgnu6E+K; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752787AbeCMTq0 (ORCPT + 99 others); Tue, 13 Mar 2018 15:46:26 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:53360 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752731AbeCMTqZ (ORCPT ); Tue, 13 Mar 2018 15:46:25 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2DJfmL3029195; Tue, 13 Mar 2018 19:45:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=7QT1qdkPqjzZEo/XLwc4oDdgGCXJ++EFvUy32qhdSgA=; b=bgnu6E+K9JW+NXi2iIfN7oHLEoEa/e/4+lC8BO71IOgrLLzBfPM7xcJfQ3k/JPq+wG8W Li/9FdJT01UiHdQy5c8z4b4KQwlxsoR9gwMrQzTurAyiuHe+82Tjvi+y7AkLQ+hYFM2m gBVEwVyCQL5rQYK2MA/0KXfZHIkQq41HMrA2yzJ2yXTQ7PeuEzC7G9NWkpt6wNOIwi/P Flj5mHeTO0S3Z65UDMcieF8TwPtsZ2+u29IRzexqfaQ2e1oPcJNEIpkYwpG4vYiqPTMW Iq90wdNWvjCd4npJIzrRg/yUw0DkP5odUkZOyeXkhNZckf62hNbdt40nH0TsDAt2+fKL Dw== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2gpkm88eef-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Mar 2018 19:45:54 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w2DJjrqR021738 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Mar 2018 19:45:53 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w2DJjnZj014139; Tue, 13 Mar 2018 19:45:49 GMT Received: from xakep.localdomain (/98.216.35.41) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 13 Mar 2018 12:45:49 -0700 Date: Tue, 13 Mar 2018 15:45:46 -0400 From: Pavel Tatashin To: Andrew Morton 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: <20180313194546.k62tni4g4gnds2nx@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> <20180313115549.7badec1c6b85eb5a1cf21eb6@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180313115549.7badec1c6b85eb5a1cf21eb6@linux-foundation.org> User-Agent: NeoMutt/20180223 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8831 signatures=668690 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803130220 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > > 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. > Hi Andrew, I was talking about this patch: 9b6e63cbf85b89b2dbffa4955dbf2df8250e5375 mm, page_alloc: add scheduling point to memmap_init_zone Which adds cond_resched() to memmap_init_zone() to avoid NMI timeouts. memmap_init_zone() is used both, early in boot, when non-deferred struct pages are initialized, but also may be used later, during memory hotplug. As I understand, the later case could cause the timeout on non-preemptible kernels. My understanding, is that the same logic was used here when cond_resched()s were added. Please correct me if I am wrong. Thank you, Pavel