From patchwork Wed May 23 08:37:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Hocko X-Patchwork-Id: 10420669 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 E95C760327 for ; Wed, 23 May 2018 08:38:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D8EB028E81 for ; Wed, 23 May 2018 08:38:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CDBF728EA3; Wed, 23 May 2018 08:38:01 +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 6CA0928E81 for ; Wed, 23 May 2018 08:38:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 47CAC6B0005; Wed, 23 May 2018 04:38:00 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 3DE1C6B000A; Wed, 23 May 2018 04:38:00 -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 2A6876B000D; Wed, 23 May 2018 04:38:00 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr0-f197.google.com (mail-wr0-f197.google.com [209.85.128.197]) by kanga.kvack.org (Postfix) with ESMTP id D49F76B0005 for ; Wed, 23 May 2018 04:37:59 -0400 (EDT) Received: by mail-wr0-f197.google.com with SMTP id q3-v6so10182285wrm.8 for ; Wed, 23 May 2018 01:37:59 -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:date:from:to :cc:subject:message-id:references:mime-version:content-disposition :in-reply-to:user-agent; bh=QWr3UTI01npuRTfojvGFT7blMiO58ealRKd78W+GUTw=; b=V58UolpCJHraKRtx+9BqTwpu+S4xjl0IOW1GsiBy80i6kxXBnA4dD849euLuw+Q2WF knovVxr7J4gdzUznmeNWZJJlazM6whirBtsrELbAtnYEYwi4wAdWKSOZ4cHpTF7HUP4c OjoonWmKNGste5J/mUXgjWTe93wl8OjuZK+kkUNIOew0y1wAtwyLH3FqBLRYfDohc5XS PeU5wqzOjx6u0d0Zu+cDqcH9JUpxyQ8Ux+mXKgDwm7c4HMN6E5zF5BLVDTVppe3TUF16 xYY8QwugaPnpbwfoVQk0oC++sYdPCkqlUMAiGlsxoDSdT5GNdf4B7hZyS5cjTI+iBFdF rMCw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of mhocko@suse.com designates 195.135.220.15 as permitted sender) smtp.mailfrom=mhocko@suse.com X-Gm-Message-State: ALKqPwe33NkXMSv3a/r6zwKJfQOqifOTUl+6tpP4Sihb31QKiR8kqBht NVvhfMO0bHqB9oskwfDXyS4X7wRqWPq54ydABUOzhHP597QZqmLMQ+QkytX0vlKPWwVVu1gmess 2GenGSiZ8w5O/FM7+uNTfC3PBlRFbY2IOUcGCY/+fsHbVTQ1ZhtBUzs1VyWmLGNCAjA== X-Received: by 2002:a50:9a44:: with SMTP id o62-v6mr6160976edb.311.1527064679300; Wed, 23 May 2018 01:37:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpi9fDy82hjlkAy/gH56D++Yy/ESPOJ0haHWjyQRMvj+WyQ17nn6gr1ps/4lO0Iiqb2T1pB X-Received: by 2002:a50:9a44:: with SMTP id o62-v6mr6160928edb.311.1527064678568; Wed, 23 May 2018 01:37:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527064678; cv=none; d=google.com; s=arc-20160816; b=ErUeb29eyM5I/4oNvJpJ9GgJWEsxjD/+TGNlfdtWzsuEI/G+24no3UKmLQ1tmIu9cx 4wTHI9Pog7ErNWsfh1OAh4jRy7sfSiYviNNGjrYuOK+6HazAl/5eutbfeD5VYh5+x5Iy /+X1/S10qWKrRzfLX8wk/3+4moYI/QyZVFy/UFz3uy1SwH50otonOZDabpVX5CFhKVfI wxp22ODfn3qSsUNEJx92MNVg+htfYZCi1EBm4hYAjRQkGB6DxTx9I9tk97kKGigRrpxW ETMLZ02A4/i21fcB+L/NxYMVkIweKEYnOmFdpjP9Z2uJh0wsfYcYpyojxSNCidWZ/fbu oT+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:arc-authentication-results; bh=QWr3UTI01npuRTfojvGFT7blMiO58ealRKd78W+GUTw=; b=GDvztpQm1B+3DSdGbJcgzjCgQkEcwqt3Cl+NcUb1MZmhvfxe9s9vtul9Bt5maMEeqi 9mfIiqgu32vUyZYWT3cszOhS9+LtykXle9qqr6v8Q245LNcDuVDe/TeBm9JR4jtdY6Nc A8e95QIgqGhO2XovJvoO9irhUAMzLNboNcEt3zuyHi8pGgpqLV6yVSp902+tPop14ISs NUFZGhMKYC4vZin4Pcc6AAfoKhscPuqB3DzwdgCqcWZ+qun50J8pi7LpyAlPHIwfDXed UQ27z0N8YTpT2HedkD00X/kuy9VNq0YvD8OuTYVd1ITrLASHR4zXRgWqon3XIoJk52HM wtMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of mhocko@suse.com designates 195.135.220.15 as permitted sender) smtp.mailfrom=mhocko@suse.com Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id z3-v6si2379027edc.272.2018.05.23.01.37.58 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 23 May 2018 01:37:58 -0700 (PDT) Received-SPF: pass (google.com: domain of mhocko@suse.com designates 195.135.220.15 as permitted sender) client-ip=195.135.220.15; Authentication-Results: mx.google.com; spf=pass (google.com: domain of mhocko@suse.com designates 195.135.220.15 as permitted sender) smtp.mailfrom=mhocko@suse.com X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B98AFAB9F; Wed, 23 May 2018 08:37:57 +0000 (UTC) Date: Wed, 23 May 2018 10:37:56 +0200 From: Michal Hocko To: Oscar Salvador Cc: linux-mm@kvack.org, vbabka@suse.cz, pasha.tatashin@oracle.com, dan.j.williams@intel.com Subject: Re: [RFC] trace when adding memory to an offline nod Message-ID: <20180523083756.GJ20441@dhcp22.suse.cz> References: <20180523080108.GA30350@techadventures.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180523080108.GA30350@techadventures.net> User-Agent: Mutt/1.9.5 (2018-04-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, 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 Wed 23-05-18 10:01:08, Oscar Salvador wrote: > Hi guys, > > while testing memhotplug, I spotted the following trace: > > ===== > linux kernel: WARNING: CPU: 0 PID: 64 at ./include/linux/gfp.h:467 vmemmap_alloc_block+0x4e/0xc9 This warning is too loud and not really helpful. We are doing gfp_t gfp_mask = GFP_KERNEL|__GFP_RETRY_MAYFAIL|__GFP_NOWARN; page = alloc_pages_node(node, gfp_mask, order); so we do not really insist on the allocation succeeding on the requested node (it is more a hint which node is the best one but we can fallback to any other node). Moreover we do explicitly do not care about allocation warnings by __GFP_NOWARN. So maybe we want to soften the warning like this? 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_THISNODE) && !node_online(nid)); return __alloc_pages(gfp_mask, order, nid); }