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.3 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 65D4CC433ED for ; Fri, 9 Apr 2021 19:05:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 02DCE61165 for ; Fri, 9 Apr 2021 19:05:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 02DCE61165 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 987266B006C; Fri, 9 Apr 2021 15:05:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 95E266B0070; Fri, 9 Apr 2021 15:05:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7D7886B0071; Fri, 9 Apr 2021 15:05:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0117.hostedemail.com [216.40.44.117]) by kanga.kvack.org (Postfix) with ESMTP id 61E806B006C for ; Fri, 9 Apr 2021 15:05:38 -0400 (EDT) Received: from smtpin36.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 2687C18499AC0 for ; Fri, 9 Apr 2021 19:05:38 +0000 (UTC) X-FDA: 78013757556.36.9C69199 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf15.hostedemail.com (Postfix) with ESMTP id 82252A000148 for ; Fri, 9 Apr 2021 19:05:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617995137; 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=MD6fT2WmgURb9WkY36QJuynGDfPwVK4tcjKqqbkDs38=; b=HDhlbE3c5ffkEVOIADIkVEmVW57Rk2MUVrNhdi7laFQzO/06kpw9Q5jBesW48ZnZ/wGA4N 0FBHUKH1Ot6I+57LWMG8x6RhFAkJISCg3DcL6XQvCPYY/uCYagQdkGy7I/RYN/KU4emViO N+PtqAageCR88m/GZIGM7SN+fgcIz38= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-558-0Ff2iCCONNi1oMX_ByaBPQ-1; Fri, 09 Apr 2021 15:05:35 -0400 X-MC-Unique: 0Ff2iCCONNi1oMX_ByaBPQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0EEF6801814; Fri, 9 Apr 2021 19:05:34 +0000 (UTC) Received: from [10.36.115.11] (ovpn-115-11.ams2.redhat.com [10.36.115.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1D2D32C01F; Fri, 9 Apr 2021 19:05:26 +0000 (UTC) Subject: Re: [PATCH] mm/memory_hotplug: Make unpopulated zones PCP structures unreachable during hot remove To: Mel Gorman , Michal Hocko Cc: Andrew Morton , Linux-MM , LKML , Oscar Salvador , "Michael S. Tsirkin" , Vlastimil Babka , Alexander Duyck , Minchan Kim References: <20210409120957.GM3697@techsingularity.net> <20210409134221.GO3697@techsingularity.net> <20210409151259.GP3697@techsingularity.net> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <9317b74e-f706-27eb-6e5c-3dc0f3ee98b8@redhat.com> Date: Fri, 9 Apr 2021 21:05:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210409151259.GP3697@techsingularity.net> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 82252A000148 X-Stat-Signature: rfniwqo1a4cs7t95ntu9fg11dexq5aq9 Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf15; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=63.128.21.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617995136-983884 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: >>> zone_pcp_reset still needs to exist to drain the remaining vmstats or >>> it'll break 5a883813845a ("memory-hotplug: fix zone stat >>> mismatch"). >> >> Are you sure we are reseting vmstats in the hotremove. I do not see >> anything like that. Maybe this was needed at the time. I will double >> check. > > zone_pcp_reset calls drain_zonestat to apply the per-cpu vmstat deltas > to the atomic per-zone and global stats. > > If anything, the minimal "fix" is to simply delete IRQ disable/enable on > the grounds that IRQs protect nothing and assume the existing hotplug > paths guarantees the PCP cannot be used after zone_pcp_enable(). That ^ that sounds sane to me > should be the case already because all the pages have been freed and > there is nothing to even put into the PCPs but I worried that the PCP > structure itself might still be reachable even if it's useless which is > why I freed the structure once they could not be reached via zonelists. > -- Thanks, David / dhildenb