From patchwork Thu May 24 03:22:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 10422657 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0B76B6019D for ; Thu, 24 May 2018 03:22:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD05C29078 for ; Thu, 24 May 2018 03:22:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD297292A8; Thu, 24 May 2018 03:22:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5285029078 for ; Thu, 24 May 2018 03:22:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3A0F26B026E; Wed, 23 May 2018 23:22:27 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 350D66B0270; Wed, 23 May 2018 23:22:27 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 23FF36B0271; Wed, 23 May 2018 23:22:27 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wm0-f72.google.com (mail-wm0-f72.google.com [74.125.82.72]) by kanga.kvack.org (Postfix) with ESMTP id BE62E6B026E for ; Wed, 23 May 2018 23:22:26 -0400 (EDT) Received: by mail-wm0-f72.google.com with SMTP id f63-v6so293453wmi.4 for ; Wed, 23 May 2018 20:22:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:subject:to :references:cc:from:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:message-id; bh=hbE9VaWtfc5a76E8cRvQrPtZdZOuFaZ+VLuenQjtYYw=; b=FtCKqNGpy4NYrWdyufORIeKY9oNicrLFcPL3AVWE6h5Sa8EiphTy8qTfCMN1S+dn/V A//PblhEta1vAc8ZfBGG+3xehvq2WMsAcjaXjvJucqVQnE/0s23xpK3tpvG+SftQn1oz b9YFFp41reIOudn5YHaB984xYPPLcDgY3dNlv7jVUrSc0HO91eaL8r2CSL8FAWsAORJA +FCAj4izG5lOeHxMXQsYzUXT/tIcJQoZsjfcqjC1/fYEXRkmWiJH2IFYkJj8Ja39ZUJp BfsQnshulXaMI/kx/zO1g8V/KK3fkoJ43bB9fT/zrEoUbRJ3fdlF4jkLuIVYcHesyqCS ZmPA== X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.158.5 is neither permitted nor denied by best guess record for domain of khandual@linux.vnet.ibm.com) smtp.mailfrom=khandual@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com X-Gm-Message-State: ALKqPwd78oXthmJ/PAX0c69z/Iqg+iIkde1NMfR3CGnr/VjKTQA4TlzJ tYl6SpCmxpzeGa0gpWlCXmLabmvl4fMST62x1M7zX3y8koPydexukxv1TazGqyTVodn8l8QPzQi +LWjFIAjCCeqM5L4BtVkNCtV87R5l5PHTkdUd07k02A++m5hy032JDERi3X34IZA= X-Received: by 2002:a50:d514:: with SMTP id u20-v6mr9829551edi.73.1527132146298; Wed, 23 May 2018 20:22:26 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpvEx9HNAeUxZI69p7p1R3Smd0mdo1wAwHnACGnXZVVFqYpkh/zW0MXCsaq+Eh8pbO7+a5y X-Received: by 2002:a50:d514:: with SMTP id u20-v6mr9829503edi.73.1527132145358; Wed, 23 May 2018 20:22:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527132145; cv=none; d=google.com; s=arc-20160816; b=kc9pbPrgC6Qs7+InondqSRJxqvIJVJS2ulg/Nnp3Aj3ojeZHC0C+RD5sSecMIJ71/v hOjrMpzXVJ2AvnBlGdDhBY8997WgXIlKp1LtWUAPri9Ggtp7Llu7nXevEfRrv9mXlMyc zJ2gtLrTNtj6+iRCE7Uch6aoHdJLBSPVmfiNY47ECyILtD8XLcYIymZZbm7hq/mvxL2C kbDM5r16LH8tFvVFkALYo61hoqC2f4kWdSyek9/oe/okdwGZ0PjeqvuRxM0xYxsUjLNC YH3TGvIZl1x4mDtL/bPv/h7COv6e3VJH5xt0iXWvzhcytKnPy1UaNn/MTV/AMaf82vZi EZjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:content-transfer-encoding:in-reply-to:mime-version :user-agent:date:from:cc:references:to:subject :arc-authentication-results; bh=hbE9VaWtfc5a76E8cRvQrPtZdZOuFaZ+VLuenQjtYYw=; b=otIoccTTosptWPG61Ehj+M6L8Nt2TCxFJDItz1A5OpkHfJWin9Uf33eRPwB06H5beI Dy49Ml5HyZ2aHR6FfU0U+fyM2LbHxvVY3ub7gA6bO7NaAsLJ4wC3ojxIMo6WZj3ifCFw ry2+MehdVrToy7gmAKvQ8mXMa2/lraJtTVQGAWT7yXzsHCxBJ0zJi4Z+pBCz8lrfj65z cVM+UStHt8lfBAcEGLF5935WF7r8QOyZV2OHvTzVDRMh60JNQnOrgEDGEOBcfr3Ny4fe 4aREXhFHIGkcomTnrVEry5oEgWLMwS8ufWb8CDUUTCgXWhTvboerVV/jwkSsJW/Ql2KF qj7w== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 148.163.158.5 is neither permitted nor denied by best guess record for domain of khandual@linux.vnet.ibm.com) smtp.mailfrom=khandual@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com. [148.163.158.5]) by mx.google.com with ESMTPS id m7-v6si3554558edm.35.2018.05.23.20.22.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 May 2018 20:22:25 -0700 (PDT) Received-SPF: neutral (google.com: 148.163.158.5 is neither permitted nor denied by best guess record for domain of khandual@linux.vnet.ibm.com) client-ip=148.163.158.5; Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.158.5 is neither permitted nor denied by best guess record for domain of khandual@linux.vnet.ibm.com) smtp.mailfrom=khandual@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4O3JPIu116432 for ; Wed, 23 May 2018 23:22:24 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0b-001b2d01.pphosted.com with ESMTP id 2j5gbvj8tm-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 23 May 2018 23:22:23 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 24 May 2018 04:22:22 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 24 May 2018 04:22:18 +0100 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4O3MHoU3801360; Thu, 24 May 2018 03:22:17 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8852C42042; Thu, 24 May 2018 04:12:58 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0BE6042045; Thu, 24 May 2018 04:12:56 +0100 (BST) Received: from [9.202.15.56] (unknown [9.202.15.56]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 24 May 2018 04:12:55 +0100 (BST) Subject: Re: [PATCH 2/2] mm: do not warn on offline nodes unless the specific node is explicitly requested To: Michal Hocko , Anshuman Khandual References: <20180523125555.30039-1-mhocko@kernel.org> <20180523125555.30039-3-mhocko@kernel.org> <11e26a4e-552e-b1dc-316e-ce3e92973556@linux.vnet.ibm.com> <20180523140601.GQ20441@dhcp22.suse.cz> Cc: Andrew Morton , Oscar Salvador , Vlastimil Babka , Pavel Tatashin , Reza Arbab , Igor Mammedov , Vitaly Kuznetsov , LKML , linux-mm@kvack.org From: Anshuman Khandual Date: Thu, 24 May 2018 08:52:14 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20180523140601.GQ20441@dhcp22.suse.cz> X-TM-AS-GCONF: 00 x-cbid: 18052403-0020-0000-0000-00000420A50F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18052403-0021-0000-0000-000042B5E63A Message-Id: <094afec3-5682-f99d-81bb-230319c78d5d@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-24_01:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805240039 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP On 05/23/2018 07:36 PM, Michal Hocko wrote: > On Wed 23-05-18 19:15:51, Anshuman Khandual wrote: >> On 05/23/2018 06:25 PM, Michal Hocko wrote: >>> when adding memory to a node that is currently offline. >>> >>> The VM_WARN_ON is just too loud without a good reason. In this >>> particular case we are doing >>> alloc_pages_node(node, GFP_KERNEL|__GFP_RETRY_MAYFAIL|__GFP_NOWARN, order) >>> >>> so we do not insist on allocating from the given node (it is more a >>> hint) so we can fall back to any other populated node and moreover we >>> explicitly ask to not warn for the allocation failure. >>> >>> Soften the warning only to cases when somebody asks for the given node >>> explicitly by __GFP_THISNODE. >> >> node hint passed here eventually goes into __alloc_pages_nodemask() >> function which then picks up the applicable zonelist irrespective of >> the GFP flag __GFP_THISNODE. > > __GFP_THISNODE should enforce the given node without any fallbacks > unless something has changed recently. Right. I was just saying requiring given preferred node to be online whose zonelist (hence allocation zone fallback order) is getting picked up during allocation and warning when that is not online still makes sense. We should only hide the warning if the allocation request has __GFP_NOWARN. > >> Though we can go into zones of other >> nodes if the present node (whose zonelist got picked up) does not >> have any memory in it's zones. So warning here might not be without >> any reason. > > I am not sure I follow. Are you suggesting a different VM_WARN_ON? I am just suggesting this instead. diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 036846fc00a6..7f860ea29ec6 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -464,7 +464,7 @@ static inline struct page * __alloc_pages_node(int nid, gfp_t gfp_mask, unsigned int order) { VM_BUG_ON(nid < 0 || nid >= MAX_NUMNODES); - VM_WARN_ON(!node_online(nid)); + VM_WARN_ON(!(gfp_mask & __GFP_NOWARN) && !node_online(nid)); return __alloc_pages(gfp_mask, order, nid); }