From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81B0EC2BA2B for ; Thu, 16 Apr 2020 06:19:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2F8A52078A for ; Thu, 16 Apr 2020 06:19:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2F8A52078A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 70CF18E008A; Thu, 16 Apr 2020 02:19:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6BDD38E0001; Thu, 16 Apr 2020 02:19:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D51A8E008A; Thu, 16 Apr 2020 02:19:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0054.hostedemail.com [216.40.44.54]) by kanga.kvack.org (Postfix) with ESMTP id 433FA8E0001 for ; Thu, 16 Apr 2020 02:19:11 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id F3E165823 for ; Thu, 16 Apr 2020 06:19:10 +0000 (UTC) X-FDA: 76712715702.02.spoon72_8a564a177e936 X-HE-Tag: spoon72_8a564a177e936 X-Filterd-Recvd-Size: 4003 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by imf25.hostedemail.com (Postfix) with ESMTP for ; Thu, 16 Apr 2020 06:19:10 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id i10so3363258wrv.10 for ; Wed, 15 Apr 2020 23:19:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=haajFqWOpRJreRTyzwRLBENBKY1jRYi5OSxNLILpaiI=; b=mkKf0BfspPpsFzsqtgQYgHlyOiPfhZ3VmeyMG/wx23WyddI2UHpnClm06Se/YtkxHV xqypApGeLiIncmnuce4YWM3DB8hjsBzkukXGbxZiW9GGMee6tLZjf29DM+YkzVWYY03e JkedgdC7cJtxWtMA70QIRpvdehAQXVLn5cRINCJWEcHB0pxx/Um9mJbGgCk5dc5whgKE f9V/1hkBt60CEIclTlthtkr+hhiXg0JYOJ0+7/sPmz4Gf9AUhbEqLY13BR5p3Y+EP1cy e4NoRQHO9z3DJd6bz8pG3ozoS4JiEXDyc3JOUNzT7Fyav2nxhl0RacZxhFSjZXoQPq3f Y89g== X-Gm-Message-State: AGi0PuYefWJ/F/kCzcLbeLtw2LmMiVCx/vkCWtcG9IFyEFDmz6gwOX5j gv/qniDpIs5jCfcNwvPpY8c= X-Google-Smtp-Source: APiQypKkZMIkiyYBgrloelSVESTBcV5kX27Ao3yrPl5Q1JjY/dcsEUmpckaldqLO+JBqYK8nwo6msA== X-Received: by 2002:a5d:4005:: with SMTP id n5mr7646223wrp.242.1587017949484; Wed, 15 Apr 2020 23:19:09 -0700 (PDT) Received: from localhost (ip-37-188-180-223.eurotel.cz. [37.188.180.223]) by smtp.gmail.com with ESMTPSA id j11sm4777116wrr.62.2020.04.15.23.19.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 23:19:08 -0700 (PDT) Date: Thu, 16 Apr 2020 08:19:07 +0200 From: Michal Hocko To: "Verma, Vishal L" Cc: "Williams, Dan J" , "linux-mm@kvack.org" , "linux-nvdimm@lists.01.org" , "david@redhat.com" , "dave.hansen@linux.intel.com" Subject: Re: [PATCH v3] mm/memory_hotplug: refrain from adding memory into an impossible node Message-ID: <20200416061907.GA26707@dhcp22.suse.cz> References: <20200414235812.6158-1-vishal.l.verma@intel.com> <20200415104338.GF4629@dhcp22.suse.cz> <7a37b7c03e983ceb32337325fa2a724fa614607b.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7a37b7c03e983ceb32337325fa2a724fa614607b.camel@intel.com> 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: On Wed 15-04-20 20:32:00, Verma, Vishal L wrote: > On Wed, 2020-04-15 at 12:43 +0200, Michal Hocko wrote: > > On Tue 14-04-20 17:58:12, Vishal Verma wrote: > > [...] > > > +static int check_hotplug_node(int nid) > > > +{ > > > + int alt_nid; > > > + > > > + if (node_possible(nid)) > > > + return nid; > > > + > > > + alt_nid = numa_map_to_online_node(nid); > > > + if (alt_nid == NUMA_NO_NODE) > > > + alt_nid = first_online_node; > > > + WARN_TAINT(1, TAINT_FIRMWARE_WORKAROUND, > > > + "node %d expected, but was absent from the node_possible_map, using %d instead\n", > > > + nid, alt_nid); > > > > I really do not like this. Why should we try to be clever and change the > > node id requested by the caller? I would just stick with node_possible > > check and be done with this. > > Hi Michal, > > Being clever allows us to still use the memory even if it is in a non- > optimal configuration. Failing here leaves the user no path to add this > memory until the firmware is fixed. It is the tradeoff between some > usability vs. how loud we want to be for the failure. Doing that papers over something that is clearly a FW issue and makes it "my performance is suboptimal" deal with it OS problem. Really, is this something we have to care about. Your changelog talks about a Qemu misconfiguration which is trivial to fix. Has this ever been observed with a real HW? -- Michal Hocko SUSE Labs