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=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 AAE5EC4743E for ; Tue, 8 Jun 2021 11:19:09 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 473BE61008 for ; Tue, 8 Jun 2021 11:19:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 473BE61008 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id F13194041C; Tue, 8 Jun 2021 11:19:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id utNrmyq63dbq; Tue, 8 Jun 2021 11:19:04 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTP id 18D4740425; Tue, 8 Jun 2021 11:19:04 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id E48F8C000B; Tue, 8 Jun 2021 11:19:03 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id AB42DC0001 for ; Tue, 8 Jun 2021 11:19:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 94C6B402CF for ; Tue, 8 Jun 2021 11:19:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LHjtS8AomFsn for ; Tue, 8 Jun 2021 11:19:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 7E99F400D0 for ; Tue, 8 Jun 2021 11:19:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623151140; 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=CBLtrFhiRKeFc7Q7qn/8AZzS8tEb5Usg8INInZ6WYCs=; b=NCgNublPpUc65Nv9VMJ1ZXh7G8ulTDOg+GeMHxs5AdLA5wdvFcVbC1riX+BPiVNsB1FrsM bnC+0xwjq5QRyorxATrmLJeJ+9atPcJONYGUkeK4ty51NCsaD10GHwoNsQYLa0rZLMLaHb stXbO8E4RkU/aCKdNnYhnSeQhE4W4a0= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-27-I0nXD3VeMxiiyu3gv_Jd3g-1; Tue, 08 Jun 2021 07:18:58 -0400 X-MC-Unique: I0nXD3VeMxiiyu3gv_Jd3g-1 Received: by mail-wr1-f70.google.com with SMTP id f22-20020a5d58f60000b029011634e39889so9272464wrd.7 for ; Tue, 08 Jun 2021 04:18:58 -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=CBLtrFhiRKeFc7Q7qn/8AZzS8tEb5Usg8INInZ6WYCs=; b=ul91tzYaxXRg9/B5QCE0V0GNCBos2taEUdy6S+9jfj78scpwl6+kWQT67ccJ8g1k0a MYYkv0828TKzcBANftDJ43T60frjrpvMrCcW2JIMJsK0QzlRU0aNfEwGpdkYqwNMzJPR FPp/vik40W0fOlr3Ca9XfT/KKZoLgVJYszjLbHjsScsiuqilTRY8LPaaBHiN3HRPkgQQ 82U5zFv3J2CPA3XAlvbLWoEvVi3JHuPDOuPCpbYiMCdcU02o18xeXQ0pvKF0s+fASAtf 7sKtgNUr8K0NOAYiG3eOMj9T1nVn782qGtj01AvXhGUCPFx5RqabA+OQgTftVhBFbO5+ b8zw== X-Gm-Message-State: AOAM5314Srrv16oYEJTsdAorgIV523SvAQJvANzW7fgHGSQaw/YODzu8 vjssc5P186cFsjiljTwM79Id6gSiQAb2Mx2/Qgu+1rF/tc8HX3XwXT34C2MUugV5igmVNL8uQDW vDVrJXvJwaO+RdA3cXGIQRjKqVctPVh976GinqH57GA== X-Received: by 2002:adf:df86:: with SMTP id z6mr22061231wrl.255.1623151137733; Tue, 08 Jun 2021 04:18:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrB9z1bqXKLNgH1xZgLenFDxAm/18wrzcUUIce09tn+BporQC3UeSbXcvGrkz4TceLSHiMMw== X-Received: by 2002:adf:df86:: with SMTP id z6mr22061199wrl.255.1623151137577; Tue, 08 Jun 2021 04:18:57 -0700 (PDT) Received: from [192.168.3.132] (p5b0c61cf.dip0.t-ipconnect.de. [91.12.97.207]) by smtp.gmail.com with ESMTPSA id u2sm19236473wrn.38.2021.06.08.04.18.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Jun 2021 04:18:57 -0700 (PDT) Subject: Re: [PATCH v1 05/12] mm/memory_hotplug: remove nid parameter from remove_memory() and friends To: Michael Ellerman , linux-kernel@vger.kernel.org References: <20210607195430.48228-1-david@redhat.com> <20210607195430.48228-6-david@redhat.com> <87y2bkehky.fsf@mpe.ellerman.id.au> From: David Hildenbrand Organization: Red Hat Message-ID: <7463b3ed-07d3-7157-629d-a85a3ff558d6@redhat.com> Date: Tue, 8 Jun 2021 13:18:55 +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: <87y2bkehky.fsf@mpe.ellerman.id.au> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Cc: nvdimm@lists.linux.dev, Wei Yang , "Michael S. Tsirkin" , Benjamin Herrenschmidt , Dave Hansen , virtualization@lists.linux-foundation.org, linux-mm@kvack.org, Paul Mackerras , Laurent Dufour , Dave Jiang , Vishal Verma , linux-acpi@vger.kernel.org, Anton Blanchard , Len Brown , Nathan Lynch , Pavel Tatashin , Anshuman Khandual , Dan Williams , Michal Hocko , Vlastimil Babka , Oscar Salvador , Pankaj Gupta , Scott Cheloha , "Rafael J. Wysocki" , Hui Zhu , "Aneesh Kumar K.V" , Andrew Morton , linuxppc-dev@lists.ozlabs.org, Marek Kedzierski , Mike Rapoport X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" On 08.06.21 13:11, Michael Ellerman wrote: > David Hildenbrand writes: >> There is only a single user remaining. We can simply try to offline all >> online nodes - which is fast, because we usually span pages and can skip >> such nodes right away. > > That makes me slightly nervous, because our big powerpc boxes tend to > trip on these scaling issues before others. > > But the spanned pages check is just: > > void try_offline_node(int nid) > { > pg_data_t *pgdat = NODE_DATA(nid); > ... > if (pgdat->node_spanned_pages) > return; > > So I guess that's pretty cheap, and it's only O(nodes), which should > never get that big. Exactly. And if it does turn out to be a problem, we can walk all memory blocks before removing them, collecting the nid(s). -- Thanks, David / dhildenb _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization 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.5 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 31A73C4743D for ; Tue, 8 Jun 2021 11:19:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1B2A661029 for ; Tue, 8 Jun 2021 11:19:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231876AbhFHLUy (ORCPT ); Tue, 8 Jun 2021 07:20:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:23796 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231609AbhFHLUx (ORCPT ); Tue, 8 Jun 2021 07:20:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623151140; 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=CBLtrFhiRKeFc7Q7qn/8AZzS8tEb5Usg8INInZ6WYCs=; b=NCgNublPpUc65Nv9VMJ1ZXh7G8ulTDOg+GeMHxs5AdLA5wdvFcVbC1riX+BPiVNsB1FrsM bnC+0xwjq5QRyorxATrmLJeJ+9atPcJONYGUkeK4ty51NCsaD10GHwoNsQYLa0rZLMLaHb stXbO8E4RkU/aCKdNnYhnSeQhE4W4a0= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-432-u6Ex2_oLOwyXGw60vwaqLQ-1; Tue, 08 Jun 2021 07:18:58 -0400 X-MC-Unique: u6Ex2_oLOwyXGw60vwaqLQ-1 Received: by mail-wr1-f72.google.com with SMTP id z13-20020adfec8d0000b0290114cc6b21c4so9244175wrn.22 for ; Tue, 08 Jun 2021 04:18:58 -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=CBLtrFhiRKeFc7Q7qn/8AZzS8tEb5Usg8INInZ6WYCs=; b=orQuQSJCbB/ub6KNdm/hH+TE3mPx1RBtce9/fDMoWye/vtl2vWGMaDSOqVAGxCpqcO ZmxajrafoLfcrjKMaxKaq4r1o085+KNOKSUcxCh9gsOj7uQTH5dL/UVzQtY+vCWaFkkK I6PEJwq6iNDS/Z5tFxuOMfdXOsBFHLtZU/urCBvfrKWNUTnFTdXvrkidqq5Bm7O4T945 6kF1/RTemH5sRNDmsqL0ACvCZCDbFfAfSGXlBtbF2feVX7H3IpgXmVDW0KA4KQ/2dYZw 5MMdkJ/bHb19M0ynoEcTNwRkyZyF7ipFjEpLlTzwOG1/ZRltcd9Bpk0MY3x0RD+EPdW2 wdHQ== X-Gm-Message-State: AOAM532kqFl5UU2vYALFyxPKBLGy16Yvs9D+Ie8J7GHAtv0McBWBKvov /Vs6OSCSOyo0k8m9q6D6JBZ64x7Gz3dXn8sOqfA2/BkZwO0s7gn85n4Lpuopg3pBGsPvUy9mcZB qdwZUCzATXz8+vzQKaE2ahtDU X-Received: by 2002:adf:df86:: with SMTP id z6mr22061245wrl.255.1623151137784; Tue, 08 Jun 2021 04:18:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrB9z1bqXKLNgH1xZgLenFDxAm/18wrzcUUIce09tn+BporQC3UeSbXcvGrkz4TceLSHiMMw== X-Received: by 2002:adf:df86:: with SMTP id z6mr22061199wrl.255.1623151137577; Tue, 08 Jun 2021 04:18:57 -0700 (PDT) Received: from [192.168.3.132] (p5b0c61cf.dip0.t-ipconnect.de. [91.12.97.207]) by smtp.gmail.com with ESMTPSA id u2sm19236473wrn.38.2021.06.08.04.18.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Jun 2021 04:18:57 -0700 (PDT) Subject: Re: [PATCH v1 05/12] mm/memory_hotplug: remove nid parameter from remove_memory() and friends To: Michael Ellerman , linux-kernel@vger.kernel.org Cc: Andrew Morton , Vitaly Kuznetsov , "Michael S. Tsirkin" , Jason Wang , Marek Kedzierski , Hui Zhu , Pankaj Gupta , Wei Yang , Oscar Salvador , Michal Hocko , Dan Williams , Anshuman Khandual , Dave Hansen , Vlastimil Babka , Mike Rapoport , "Rafael J. Wysocki" , Len Brown , Pavel Tatashin , virtualization@lists.linux-foundation.org, linux-mm@kvack.org, linux-acpi@vger.kernel.org, Benjamin Herrenschmidt , Paul Mackerras , Vishal Verma , Dave Jiang , Nathan Lynch , Laurent Dufour , "Aneesh Kumar K.V" , Scott Cheloha , Anton Blanchard , linuxppc-dev@lists.ozlabs.org, nvdimm@lists.linux.dev References: <20210607195430.48228-1-david@redhat.com> <20210607195430.48228-6-david@redhat.com> <87y2bkehky.fsf@mpe.ellerman.id.au> From: David Hildenbrand Organization: Red Hat Message-ID: <7463b3ed-07d3-7157-629d-a85a3ff558d6@redhat.com> Date: Tue, 8 Jun 2021 13:18:55 +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: <87y2bkehky.fsf@mpe.ellerman.id.au> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08.06.21 13:11, Michael Ellerman wrote: > David Hildenbrand writes: >> There is only a single user remaining. We can simply try to offline all >> online nodes - which is fast, because we usually span pages and can skip >> such nodes right away. > > That makes me slightly nervous, because our big powerpc boxes tend to > trip on these scaling issues before others. > > But the spanned pages check is just: > > void try_offline_node(int nid) > { > pg_data_t *pgdat = NODE_DATA(nid); > ... > if (pgdat->node_spanned_pages) > return; > > So I guess that's pretty cheap, and it's only O(nodes), which should > never get that big. Exactly. And if it does turn out to be a problem, we can walk all memory blocks before removing them, collecting the nid(s). -- Thanks, David / dhildenb 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=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 92D82C47082 for ; Tue, 8 Jun 2021 11:19:30 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D792861289 for ; Tue, 8 Jun 2021 11:19:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D792861289 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4FznnY0KLXz3bw0 for ; Tue, 8 Jun 2021 21:19:29 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=NCgNublP; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=NCgNublP; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=216.205.24.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=david@redhat.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=NCgNublP; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=NCgNublP; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Fznn34p1Zz2xZL for ; Tue, 8 Jun 2021 21:19:03 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623151140; 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=CBLtrFhiRKeFc7Q7qn/8AZzS8tEb5Usg8INInZ6WYCs=; b=NCgNublPpUc65Nv9VMJ1ZXh7G8ulTDOg+GeMHxs5AdLA5wdvFcVbC1riX+BPiVNsB1FrsM bnC+0xwjq5QRyorxATrmLJeJ+9atPcJONYGUkeK4ty51NCsaD10GHwoNsQYLa0rZLMLaHb stXbO8E4RkU/aCKdNnYhnSeQhE4W4a0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623151140; 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=CBLtrFhiRKeFc7Q7qn/8AZzS8tEb5Usg8INInZ6WYCs=; b=NCgNublPpUc65Nv9VMJ1ZXh7G8ulTDOg+GeMHxs5AdLA5wdvFcVbC1riX+BPiVNsB1FrsM bnC+0xwjq5QRyorxATrmLJeJ+9atPcJONYGUkeK4ty51NCsaD10GHwoNsQYLa0rZLMLaHb stXbO8E4RkU/aCKdNnYhnSeQhE4W4a0= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-27-wEmgU3r0OYKmd6x7F-azbQ-1; Tue, 08 Jun 2021 07:18:58 -0400 X-MC-Unique: wEmgU3r0OYKmd6x7F-azbQ-1 Received: by mail-wr1-f71.google.com with SMTP id u20-20020a0560001614b02901115c8f2d89so9229231wrb.3 for ; Tue, 08 Jun 2021 04:18:58 -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=CBLtrFhiRKeFc7Q7qn/8AZzS8tEb5Usg8INInZ6WYCs=; b=PhmMugDd0/hFNyjawJSN1V01PBTN4OtXjmGyP7CmitF/iRPtg7jCZN+JjRi6kWgDLt doORgZFkjcgBEbCCyxa3vAI6GfRh9KcAd9URwle76j5Kfh7cVSrHbjA0g8xy2zqUpqMG c/JQ8qXqWq4gHzNF1pKux2sfrfx3eYqjwsVoSFjMjhcLPL4yfkNwFXmZAS8EEN592B0K WRBAeKUjOr/6+pLgtOkz2/FoUdanYZZRoATocch0l4daC/xgx6+lw7niAZc9KZfSixdz P6/SlarXmG1tn4Bn9u1zTZvt7CBeTwyQDyjmq+/aAYVm1OC1orN48UrJnSXFCGbmq04e JY0g== X-Gm-Message-State: AOAM533AwTl0fNTDOv5OSygHxDOOkLGVpd3dLebgSR4dsVnJ25UvZf7f 4R1N49UIvsGr3gfeN3NNFXO6spH+KrJzEIUTT8Czk1hzNOF54eifD7N7/95vitKeu907xY5Bpxt wxwYoZGeZPWOnwC3Rnbp6Yq3SaA== X-Received: by 2002:adf:df86:: with SMTP id z6mr22061218wrl.255.1623151137733; Tue, 08 Jun 2021 04:18:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrB9z1bqXKLNgH1xZgLenFDxAm/18wrzcUUIce09tn+BporQC3UeSbXcvGrkz4TceLSHiMMw== X-Received: by 2002:adf:df86:: with SMTP id z6mr22061199wrl.255.1623151137577; Tue, 08 Jun 2021 04:18:57 -0700 (PDT) Received: from [192.168.3.132] (p5b0c61cf.dip0.t-ipconnect.de. [91.12.97.207]) by smtp.gmail.com with ESMTPSA id u2sm19236473wrn.38.2021.06.08.04.18.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Jun 2021 04:18:57 -0700 (PDT) Subject: Re: [PATCH v1 05/12] mm/memory_hotplug: remove nid parameter from remove_memory() and friends To: Michael Ellerman , linux-kernel@vger.kernel.org References: <20210607195430.48228-1-david@redhat.com> <20210607195430.48228-6-david@redhat.com> <87y2bkehky.fsf@mpe.ellerman.id.au> From: David Hildenbrand Organization: Red Hat Message-ID: <7463b3ed-07d3-7157-629d-a85a3ff558d6@redhat.com> Date: Tue, 8 Jun 2021 13:18:55 +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: <87y2bkehky.fsf@mpe.ellerman.id.au> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com 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 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nvdimm@lists.linux.dev, Wei Yang , "Michael S. Tsirkin" , Jason Wang , Dave Hansen , virtualization@lists.linux-foundation.org, linux-mm@kvack.org, Paul Mackerras , Laurent Dufour , Dave Jiang , Vishal Verma , linux-acpi@vger.kernel.org, Len Brown , Nathan Lynch , Pavel Tatashin , Anshuman Khandual , Dan Williams , Michal Hocko , Vitaly Kuznetsov , Vlastimil Babka , Oscar Salvador , Pankaj Gupta , Scott Cheloha , "Rafael J. Wysocki" , Hui Zhu , "Aneesh Kumar K.V" , Andrew Morton , linuxppc-dev@lists.ozlabs.org, Marek Kedzierski , Mike Rapoport Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 08.06.21 13:11, Michael Ellerman wrote: > David Hildenbrand writes: >> There is only a single user remaining. We can simply try to offline all >> online nodes - which is fast, because we usually span pages and can skip >> such nodes right away. > > That makes me slightly nervous, because our big powerpc boxes tend to > trip on these scaling issues before others. > > But the spanned pages check is just: > > void try_offline_node(int nid) > { > pg_data_t *pgdat = NODE_DATA(nid); > ... > if (pgdat->node_spanned_pages) > return; > > So I guess that's pretty cheap, and it's only O(nodes), which should > never get that big. Exactly. And if it does turn out to be a problem, we can walk all memory blocks before removing them, collecting the nid(s). -- Thanks, David / dhildenb