Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1761656imm; Thu, 19 Jul 2018 07:29:21 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdK867n6XbI03y9lqQSeGEm+nc4jJ3aOcHEpSA6SBhFqNurrDU1vZgx6UB/DPQ7FSQGgDW4 X-Received: by 2002:aa7:8307:: with SMTP id t7-v6mr9821303pfm.81.1532010561376; Thu, 19 Jul 2018 07:29:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532010561; cv=none; d=google.com; s=arc-20160816; b=ZMH9ZMMzkiy4aXUljV/jFjXgqbSp/0puBKOO5ewp7wN/hkk/txvqVHFG6pQFLdDt6j bkRj/thZOmx2+sHztHrUpEMo8+rMUywCCgh99jHWmGWCVHbR9hZP4kScnyzMr5Bg5kX0 P5I/9VEFo8P67b3wYLM05Qj1ZGqTT53s/4t3eWJu8te/f76Bnjp1lGZco5oLm+8ui6Uz tGtv0ab67wsbZme6WREo8ZLdNr8P+yfQsiS9g8z3jdqNrjoe6OizOJ5hr+3j8EfygEay 6AjoXgz9UT9mDcDzHVYNqJqB6h+JBCfcmI6XNiNuZH7gMpFMSLKioRcNKAJ4rLbR9cnK Xokw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=EaN9yF9FxgA2LxvWt5nh9cj9OblEct0qTSJ6jqk0Z3Q=; b=HlAcDDyEm04dwtH2p9mPJ20UkxihkU4yRVDmDCzXmVTjlrMmeBRDiea+H2pX1ewnef 3cPoQjVOK6TUpT3T863QDmCiD/il58y6RseqdIkVzQL2u/JVbIZvnFCqoyoNBSddMh2K 5ezl+M3O+5ylJL6PYGaftU28uIddkt4g7sDEKK3AbaFdTJD2rSwlf1lDp0C1FL5RIpiR jMoyqYxlrgGuT9+cYlWMkLnK9OH0XFI0oMXsy6TVyWtM/OAyy+j89IQ8rw5Rb7D7Yx1T Z1IqeXapoIt51vdf/YHGeZLbCN3JhTJIJnkgkzozCk8gJJVkKQVYlz91nbuSdxcsHz+X iH1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=PRxscx2A; 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 y9-v6si5840989pll.291.2018.07.19.07.29.06; Thu, 19 Jul 2018 07:29:21 -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-2018-07-02 header.b=PRxscx2A; 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 S1731661AbeGSPLu (ORCPT + 99 others); Thu, 19 Jul 2018 11:11:50 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:46554 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731113AbeGSPLt (ORCPT ); Thu, 19 Jul 2018 11:11:49 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w6JENmv9078558 for ; Thu, 19 Jul 2018 14:28:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : references : in-reply-to : from : date : message-id : subject : to : cc : content-type; s=corp-2018-07-02; bh=EaN9yF9FxgA2LxvWt5nh9cj9OblEct0qTSJ6jqk0Z3Q=; b=PRxscx2APrLNgNLbiv+xRS3PIpzTz2RkHfxhcyZnStlHtZ/iDJlzx/zGUxbavHbyYCxf cxgGeCAZs7BhwiEKNwlW1EXIZVoY22AhR0fovzZLqSNcjLTviYvdNmHoj4yNtIuZAr59 qkn+kz6IVkwIfJwq19SFYwwSMBWFSjfXINWI77vK+nN13mNLDlrsQoJvNa2BhwTeV0iT OYWVtfKXf/oemRnqEcbws3N1Pz1DicyTxWYsWR42fmlcXmvN2P1qmnZg69ye37m4eTqs E8C+HGa/e1uHgB045v381kcfi1Ubllvnjd1l+xjo66QapZWuxgYVzGWCkhkJk+xb7vHk Vw== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2130.oracle.com with ESMTP id 2k7a3tatbj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 19 Jul 2018 14:28:23 +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 w6JESLuK030901 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 19 Jul 2018 14:28:22 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w6JESLxc024642 for ; Thu, 19 Jul 2018 14:28:21 GMT Received: from mail-it0-f41.google.com (/209.85.214.41) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 19 Jul 2018 07:28:21 -0700 Received: by mail-it0-f41.google.com with SMTP id v71-v6so9946954itb.3 for ; Thu, 19 Jul 2018 07:28:21 -0700 (PDT) X-Gm-Message-State: AOUpUlFPWfvgZd4nP46fvu1ytabVwl6uM/5zlsS9hikPIE2DYrhfOeA8 b7C3HNalwmHuUynGBKJ/2ep04Jo7twGNfNnhgEY= X-Received: by 2002:aca:e089:: with SMTP id x131-v6mr10315727oig.221.1532010500763; Thu, 19 Jul 2018 07:28:20 -0700 (PDT) MIME-Version: 1.0 References: <20180719132740.32743-1-osalvador@techadventures.net> <20180719132740.32743-6-osalvador@techadventures.net> <20180719134622.GE7193@dhcp22.suse.cz> <20180719135859.GA10988@techadventures.net> <20180719140308.GG7193@dhcp22.suse.cz> In-Reply-To: <20180719140308.GG7193@dhcp22.suse.cz> From: Pavel Tatashin Date: Thu, 19 Jul 2018 10:27:44 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 5/5] mm/page_alloc: Only call pgdat_set_deferred_range when the system boots To: mhocko@kernel.org Cc: osalvador@techadventures.net, Andrew Morton , Vlastimil Babka , aaron.lu@intel.com, iamjoonsoo.kim@lge.com, LKML , Linux Memory Management List , osalvador@suse.de Content-Type: text/plain; charset="UTF-8" X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8958 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=10 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-1806210000 definitions=main-1807190155 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 19, 2018 at 10:03 AM Michal Hocko wrote: > > On Thu 19-07-18 15:58:59, Oscar Salvador wrote: > > On Thu, Jul 19, 2018 at 03:46:22PM +0200, Michal Hocko wrote: > > > On Thu 19-07-18 15:27:40, osalvador@techadventures.net wrote: > > > > From: Oscar Salvador > > > > > > > > We should only care about deferred initialization when booting. > > > > > > Again why is this worth doing? > > > > Well, it is not a big win if that is what you meant. > > > > Those two fields are only being used when dealing with deferred pages, > > which only happens at boot time. > > > > If later on, free_area_init_node gets called from memhotplug code, > > we will also set the fields, although they will not be used. > > > > Is this a problem? No, but I think it is more clear from the code if we > > see when this is called. > > So I would say it was only for code consistency. > > Then put it to the changelog. > > > If you think this this is not worth, I am ok with dropping it. > > I am not really sure. I am not a big fan of SYSTEM_BOOTING global > thingy so I would rather not spread its usage. I agree, I do not think this patch is necessary. Calling pgdat_set_deferred_range() does not hurt in hotplug context, and it is cheap too. SYSTEM_BOOTING sometimes useful, but it is better to use it only where necessary, where without this "if" we will encounter some bugs. Thank you, Pavel