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=-7.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 4C473C48BE5 for ; Thu, 17 Jun 2021 08:42:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C8B2D6135C for ; Thu, 17 Jun 2021 08:42:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C8B2D6135C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 18DD46B0074; Thu, 17 Jun 2021 04:42:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 13D496B0075; Thu, 17 Jun 2021 04:42:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ED1B36B0078; Thu, 17 Jun 2021 04:42:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0149.hostedemail.com [216.40.44.149]) by kanga.kvack.org (Postfix) with ESMTP id BA30D6B0074 for ; Thu, 17 Jun 2021 04:42:37 -0400 (EDT) Received: from smtpin37.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 4079519B3D for ; Thu, 17 Jun 2021 08:42:37 +0000 (UTC) X-FDA: 78262574754.37.877592F Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf22.hostedemail.com (Postfix) with ESMTP id 4648CC00CBE9 for ; Thu, 17 Jun 2021 08:42:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623919356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sS6kybXx9hY6peXNH5/f9ArBP3605EB1bdQQ5Et7bb4=; b=BH3ca2tvy7w+N2Q5cJSox6o2mSbzlby3hQ7JRc3+75fWwU0Qt7jmZAVg27erv6LV1kXQ0/ x61Ugi5rkk9bmWjOZ+VEdTP3wXrqYLHMC7uLG8lvobH+WCoc9ceco4B83NfQyX38AL7Svw f8wCDDx3ofq4fBmQzcuiIFscHfhKxys= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-172-253pwmD8PomnbBbgW1vfHw-1; Thu, 17 Jun 2021 04:42:34 -0400 X-MC-Unique: 253pwmD8PomnbBbgW1vfHw-1 Received: by mail-wm1-f72.google.com with SMTP id w186-20020a1cdfc30000b02901ced88b501dso1865369wmg.2 for ; Thu, 17 Jun 2021 01:42:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=sS6kybXx9hY6peXNH5/f9ArBP3605EB1bdQQ5Et7bb4=; b=h1322yHrmIdVJvIAvdPCjIKMCjAnl/7QH/457+I+rls7fLrocpujNW3My8+jSQ3E5Y uRmGsvDKXfI+C9qHPHEDEu6UyBVA0bPrGrhdZqRyx6fxK6SdZof4eH7B1k0H8BHestE/ jlF5gpgGIGCs02G6CSuatN5xLQOJo4aJ6z3WQv8ldX57GlJ/I3G18CZUucx2kUWmd7/d +s/1UUWMxacOEWd/W05y2ll6Um8bjYwhOT4l6SgLeYH+BPLDbhoDT331h3uohSSaSLQp hWIvul0p42l94ngZd+7ZvkUY+4VR0LRymlLHIo+w6vBEYs61Yba2GLxglLWEJBtMizoj uq9w== X-Gm-Message-State: AOAM531AX4SRBrwaS9mYcwVNEpVETko6AgRoLXv1wwN2KSODTjTFwQ3S wBxicctXBJ3BSCr/ZmYTzonSuj8TrpxJohYbONbpT1J7hxSL9kBaPvD2AmAP/6RfSx74/RotRK8 kYgDDP4Virq8= X-Received: by 2002:a5d:6a41:: with SMTP id t1mr4339168wrw.113.1623919353797; Thu, 17 Jun 2021 01:42:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgyAySce1qxN63jHG7zCIwNglZXJq5pK6V0M+5PBzfDOhc3A7qqxXGjPafRDi1waNvg3aeUg== X-Received: by 2002:a5d:6a41:: with SMTP id t1mr4339135wrw.113.1623919353505; Thu, 17 Jun 2021 01:42:33 -0700 (PDT) Received: from [192.168.3.132] (p5b0c6170.dip0.t-ipconnect.de. [91.12.97.112]) by smtp.gmail.com with ESMTPSA id l10sm4681548wrv.82.2021.06.17.01.42.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Jun 2021 01:42:33 -0700 (PDT) Subject: Re: vmemmap alloc failure in hot_add_req() To: Nathan Chancellor Cc: "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , linux-hyperv@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Oscar Salvador , Hillf Danton References: <20210612021115.2136-1-hdanton@sina.com> <951ddbaf-3d74-7043-4866-3809ff991cfd@redhat.com> From: David Hildenbrand Organization: Red Hat Message-ID: <98cba3fa-f787-081f-b833-cfea3a124254@redhat.com> Date: Thu, 17 Jun 2021 10:42:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=BH3ca2tv; spf=none (imf22.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 4648CC00CBE9 X-Stat-Signature: pjb3okyum74kj6fz5ms1s953gxxste4r X-HE-Tag: 1623919345-541013 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000349, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > It does look like this kernel configuration has > CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y. Okay, so then it's most likely really more of an issue with fragmented physical memory -- which is suboptimal but not a show blocker in your setup. (there are still cases where memory onlining can fail, especially with kasan running, but these are rather corner cases) > >> If it's not getting onlined, you easily sport after hotplug e.g., via >> "lsmem" that there are quite some offline memory blocks. >> >> Note that x86_64 code will fallback from populating huge pages to >> populating base pages for the vmemmap; this can happen easily when under >> memory pressure. > > Not sure if it is relevant or not but this warning can show up within a > minute of startup without me doing anything in particular. I remember that Hyper-V will start with a certain (configured) boot VM memory size and once the guest is up and running, use memory stats of the guest to decide whether to add (hotplug) or remove (balloon inflate) memory from the VM. So this could just be Hyper-V trying to apply its heuristics. > >> If adding memory would fail completely, you'd see another "hot_add >> memory failed error is ..." error message from hyper-v in the kernel >> log. If that doesn't show up, it's simply suboptimal, but hotplugging >> memory still succeeded. > > I did notice that from the code in hv_balloon.c but I do not think I > have ever seen that message in my logs. Okay, so at least hotplugging memory is working. -- Thanks, David / dhildenb