Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4008079pxj; Tue, 8 Jun 2021 04:23:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8OJIq8oR7sSlkobqTUfSn+c4fGIQ1F28OaBh7Wke01eUX7VZUugulabYSIVhb1B8sfDez X-Received: by 2002:aa7:c04e:: with SMTP id k14mr24053028edo.157.1623151421171; Tue, 08 Jun 2021 04:23:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623151421; cv=none; d=google.com; s=arc-20160816; b=AU22K28CQri+hs5HQExw3Oj2aAmCtu9cDbkmTghvf6mkDML/jwJ2i4kCJT1YO6uOfz R1qGf5xeDQkRZJMfUX5IjIDlZ9pjwAIN7DebXNkiSziplXEbgEOYoKMxZHWSqeuklLCH +BIyGX8q+wZ2JIt/KgayWWbZeAmWW/31Qc7O7XAkEmmjpH6FmFKiHHP1f4Zl7rK2++HX zxnvNh7VlBH6Otutdfn3l7Ix1v6L6ylbS4GxOjxexV96YWNEoryDvnXzcFNEcxtKk7UC UINrtupgzL98pDv9nqgsi9jpJsKXDMzCZfEO7DzTfqowpvTGfEWe/Zi+JOCn8kAtSHRu 4EiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=CBLtrFhiRKeFc7Q7qn/8AZzS8tEb5Usg8INInZ6WYCs=; b=dAG1hPbj+6EFUQjBOogetKWPHaUKNX+i74N5rzqO1Xy9dVIXPpJKKpyrMHHwqXcKpx lGyqdadPNb3XAQ6oEGaQcJV1NwGv6e5Rlpss0oYpMLgIdd+IfOth34U4a2Xb2TzPtKL7 kMr/RdLstYDyjyIKY5yRQR4NOVX/RBVQWJBZ/fagaSjqxSQ+8HNFf91UD2Zodo6ue+dg hiQiPdHxVj274UoHdt825rsPeMUyCqr2xXMQc4w4COcRe8YMlwaIAK/TZc3mq/nkpW3c OLwwKgWHToHM7QL961azpa4cpELVce4SiR01BxuI03rDk+yCbVsKwHc3jT59zOtCP5GQ s77w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NCgNublP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f12si15185319ejt.376.2021.06.08.04.23.16; Tue, 08 Jun 2021 04:23:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NCgNublP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231330AbhFHLUy (ORCPT + 99 others); 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-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