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.6 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 08E7FC4708D for ; Fri, 28 May 2021 09:08:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AA3416113D for ; Fri, 28 May 2021 09:08:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA3416113D 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 40F096B006C; Fri, 28 May 2021 05:08:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3E5D56B006E; Fri, 28 May 2021 05:08:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 287766B0070; Fri, 28 May 2021 05:08:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0089.hostedemail.com [216.40.44.89]) by kanga.kvack.org (Postfix) with ESMTP id ED9C86B006C for ; Fri, 28 May 2021 05:08:06 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 76FEB8249980 for ; Fri, 28 May 2021 09:08:06 +0000 (UTC) X-FDA: 78190062972.08.BE4CE79 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf10.hostedemail.com (Postfix) with ESMTP id E594641449E2 for ; Fri, 28 May 2021 09:07:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622192885; 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=t4+d8v/qkCpPOmJXEAWQ9CljZYiiDXo4O63BP6isPck=; b=HLMkz+C3AvccMkVUsqkQMcfu7Qri36Dw84kk9vjW88jkTb4cp992Yt2hdcZXT5y9aGtFxI 0THM5fiBFnLzK6TeQPz5E5BBLdsgjIOqq8xg09lJjGlwNKeyeta2qD6kzUjOul6Bhy3o6o 4r21XXe5v6sykNI9aMFTFeLY4jxu+00= 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-420-dAda2oODOASixL6SalHj4Q-1; Fri, 28 May 2021 05:08:03 -0400 X-MC-Unique: dAda2oODOASixL6SalHj4Q-1 Received: by mail-wr1-f70.google.com with SMTP id n2-20020adfb7420000b029010e47b59f31so773177wre.9 for ; Fri, 28 May 2021 02:08:03 -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:from:to:cc:references:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=t4+d8v/qkCpPOmJXEAWQ9CljZYiiDXo4O63BP6isPck=; b=umGI+y+WmXBUYe9M65FAFbEmIZfUdmgVpqL4zSArrw2BhZG+b83jjU1S3xvnahLOUk Do3bz3FGzm7GQtmk6QjN7gwzg2DUVy4JdR+siXxzbS3MUYW82Wp8963V4qkyZ7NW98tk bSc75Lb+qaOUPIE9NfnHg3zf9NwPvVZS6RBO629ToH/gGQ6TKYPg1ks7cWXdlHEeL6wb +OplJMHVa+qqrVr85a6klI/6eiezPHlJ5eSn/qFVK9w5oqcYNctutNI1b5a9jbEbGd/Z uYdsl+kIyIHlVfZ0fT44ZgV28xGJd0i7L/YQ0FbyLR9Om3pfdmLCckzoARxj1+ew9lyU 4nqQ== X-Gm-Message-State: AOAM5333nEUsvX/2auSExIHh/Sdu86HT+BLKoY9To9t1UbKaUO6+laBc iEikKdefTkkSG5all+F7GgCuNU0nMTZcCPXDhEU/DhgGRaMhNDB0UdXZZ8jzBWL665K5Xg+Kdlh 34NCdGdIJ8bw= X-Received: by 2002:a1c:7d13:: with SMTP id y19mr7412758wmc.41.1622192882687; Fri, 28 May 2021 02:08:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwStphUgOtrZgsXGu3HMG2jWcUMSuKIuhUwPBTShPcCPhJAw9GQpEe/8M8+3RQysprF6UZVkg== X-Received: by 2002:a1c:7d13:: with SMTP id y19mr7412742wmc.41.1622192882490; Fri, 28 May 2021 02:08:02 -0700 (PDT) Received: from [192.168.3.132] (p5b0c6870.dip0.t-ipconnect.de. [91.12.104.112]) by smtp.gmail.com with ESMTPSA id c64sm14091213wma.15.2021.05.28.02.08.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 May 2021 02:08:02 -0700 (PDT) Subject: Re: [PATCH 0/6 v2] Calculate pcp->high based on zone sizes and active CPUs From: David Hildenbrand To: Mel Gorman , Dave Hansen Cc: Andrew Morton , Hillf Danton , Dave Hansen , Vlastimil Babka , Michal Hocko , LKML , Linux-MM , "Tang, Feng" References: <20210525080119.5455-1-mgorman@techsingularity.net> <7177f59b-dc05-daff-7dc6-5815b539a790@intel.com> <20210528085545.GJ30378@techsingularity.net> <54ff0363-2f39-71d1-e26c-962c3fddedae@redhat.com> Organization: Red Hat Message-ID: Date: Fri, 28 May 2021 11:08:01 +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: <54ff0363-2f39-71d1-e26c-962c3fddedae@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=HLMkz+C3; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf10.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: E594641449E2 X-Stat-Signature: xt8f5owqcjpki13brwbi7nymbb9d83kt X-HE-Tag: 1622192877-605491 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 28.05.21 11:03, David Hildenbrand wrote: > On 28.05.21 10:55, Mel Gorman wrote: >> On Thu, May 27, 2021 at 12:36:21PM -0700, Dave Hansen wrote: >>> Hi Mel, >>> >>> Feng Tang tossed these on a "Cascade Lake" system with 96 threads and >>> ~512G of persistent memory and 128G of DRAM. The PMEM is in "volatile >>> use" mode and being managed via the buddy just like the normal RAM. >>> >>> The PMEM zones are big ones: >>> >>> present 65011712 = 248 G >>> high 134595 = 525 M >>> >>> The PMEM nodes, of course, don't have any CPUs in them. >>> >>> With your series, the pcp->high value per-cpu is 69584 pages or about >>> 270MB per CPU. Scaled up by the 96 CPU threads, that's ~26GB of >>> worst-case memory in the pcps per zone, or roughly 10% of the size of >>> the zone. > > When I read about having such big amounts of free memory theoretically > stuck in PCP lists, I guess we really want to start draining the PCP in > alloc_contig_range(), just as we do with memory hotunplug when offlining. > Correction: we already drain the pcp, we just don't temporarily disable it, so a race as described in offline_pages() could apply: "Disable pcplists so that page isolation cannot race with freeing in a way that pages from isolated pageblock are left on pcplists." Guess we'd then want to move the draining before start_isolate_page_range() in alloc_contig_range(). -- Thanks, David / dhildenb