Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp152726imu; Fri, 14 Dec 2018 16:27:50 -0800 (PST) X-Google-Smtp-Source: AFSGD/XsEHoanD8SA+nCOqX04zlwMUlHuwgvDQUo5R1lv3QbjJAPn5N1jiDGZNYFmoehyiqmajeh X-Received: by 2002:a17:902:209:: with SMTP id 9mr4860044plc.288.1544833670388; Fri, 14 Dec 2018 16:27:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544833670; cv=none; d=google.com; s=arc-20160816; b=u+JgLAWylsUfZvBcDCZ2k+PXpuUzzZEThwFBnKY3GX7Kca/+jvgM8V5JV7e8r4tFbG ZWN6L9tOKET8+6wnd9qexJ8vhNiKMXmVYWV4LTER5Aj3Y42R7dCvMNInF61BfVwmopkn X2noSWzXl+fudhNWLCopW8SgDovP4hoUpCZZ+3Fi8SDSrI0uXVBKsNnNrTAACEs/lRq5 iBS635eek+1BQhPPAB2yvMcgDBVuJv4vQduLGFcpcv1nIdEvLxuFXb6+vBpWAFlfMxHJ 5C5uii5fpmYMYLIpFkhBSG+37an67z1AewVfDJWbKPnu67Ws26hDLVjFIVSpcTVlULOQ WgoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=V95dr3G3RkBJgZIaKV8YGexD6Uh5VM+r1rC1lbrlLDQ=; b=iy0QzGpYDxBUfoq129vpjNhVRc4GBWLLbiWItpduL95RWb1aZtwsMSO453VQcRATLc daQZxv7a2zPO9q38LuLQOTrnTCpQ7ZgBvlPtR0uMk5EYvaz45TkkDW1RuZchN/V8KzTE UJMSqfDOO52rlnFxXkAycLKqNdWXmxQ5cupj25hmR29CyllGKUDjtzXVxXTa+kcKrdM5 hMY1QzFvX/y4EJXWUxLmAarkSV+7K98vCKb+MM3wNSR07IctWHj/bL8bYf3N35TrxW/y OZeK1FY3FdCQ0DcRGtUn7rqsyjakUfUvXEsdUvW0EQYWfL1Y92rwZYzVweE51rZwMGLO Yv2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Chca5DV3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r11si5197939pgg.327.2018.12.14.16.27.33; Fri, 14 Dec 2018 16:27:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Chca5DV3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727775AbeLOA0R (ORCPT + 99 others); Fri, 14 Dec 2018 19:26:17 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:36896 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726448AbeLOA0R (ORCPT ); Fri, 14 Dec 2018 19:26:17 -0500 Received: by mail-ed1-f68.google.com with SMTP id h15so6330421edb.4 for ; Fri, 14 Dec 2018 16:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-disposition:in-reply-to:user-agent; bh=V95dr3G3RkBJgZIaKV8YGexD6Uh5VM+r1rC1lbrlLDQ=; b=Chca5DV3SKqC6gAajVcbCfugnX6NpDFc5pzG91yZrXK9BYg0/JehLWNQEpVsQJy8R5 4DSvxTZaXrocMAf1eDtQHF6jF2V1W1x9rFWVwPHXs4bf0UncJIRG2blV82Fmpn48EK/c qxRLvlGTCTCZDtXp4Q+Z59gvWHjr/RR/n/qqfMD6XMiBCweJkJBhY/TsKz4M9P5zdojs RdhsbZp3coUcBCm7+oQcnG0n/kp2ZCJxfR4DEjRflVC6SpHgyepsH+uP5ADAL6qZVAh2 cc3LTe1gGQEpdxdPXwEuUftRqJc0QdWJb8qsuOOdYL88wX4FXlAjkTczSl/h6RPzjanH SRAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=V95dr3G3RkBJgZIaKV8YGexD6Uh5VM+r1rC1lbrlLDQ=; b=BQr0v2Z8r5ObfcaN4kGkPJWfmDeCg/VMCrOWM3APzb9ffQysYHMN/+GcnASA1IdTwF B5/pSI4vxc7YC/UIcqmIIv1/LlpYj/WIZXYFzMOc+PfsSgIVviKp6I7VOkhVgG3rWjsN 8PziXRSeEZ3LW/wdbZReSogcD5Zz4NhZXb6vyFPdA82PYzHEi/AGMrqQWe6KYmnNvr+a YAWlnaQkY48cMc9ZAo3Tb0V8hes+BUJVpke9cn9AdS7dbFEi73Dy52OLPEgVGT6JFXzi I5m4xDpbYFqMU0UxyMZDFTHuTcByoIzpu0mwEiraZjyd0DXuMsWVRJ6rGfBTpgOI0vsO 8Vrw== X-Gm-Message-State: AA+aEWYqTzYFDRrHZXviDyV/69iNp5VcfjEHDX1NlhoyLGigrZkXJKP0 VTuHhrSECwBFIIQW1lK7mug= X-Received: by 2002:a50:ae64:: with SMTP id c91mr4596263edd.222.1544833575203; Fri, 14 Dec 2018 16:26:15 -0800 (PST) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id d56sm1939734ede.76.2018.12.14.16.26.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 14 Dec 2018 16:26:14 -0800 (PST) Date: Sat, 15 Dec 2018 00:26:13 +0000 From: Wei Yang To: Michal Hocko Cc: Zaslonko Mikhail , Wei Yang , akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Pavel.Tatashin@microsoft.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, gerald.schaefer@de.ibm.com Subject: Re: [PATCH v2 1/1] mm, memory_hotplug: Initialize struct pages for the full memory section Message-ID: <20181215002613.gj3s62uuxad6n4rb@master> Reply-To: Wei Yang References: <20181212172712.34019-1-zaslonko@linux.ibm.com> <20181212172712.34019-2-zaslonko@linux.ibm.com> <20181213034615.4ntpo4cl2oo5mcx4@master> <20181213151209.hmrhrr5gvb256bzm@master> <674c53e2-e4b3-f21f-4613-b149acef7e53@linux.bm.com> <20181214101651.GE5624@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181214101651.GE5624@dhcp22.suse.cz> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 14, 2018 at 11:19:59AM +0100, Michal Hocko wrote: >[Your From address seems to have a typo (linux.bm.com) - fixed] > >On Fri 14-12-18 10:33:55, Zaslonko Mikhail wrote: >[...] >> Yes, it might still trigger PF_POISONED_CHECK if the first page >> of the pageblock is left uninitialized (poisoned). >> But in order to cover these exceptional cases we would need to >> adjust memory_hotplug sysfs handler functions with similar >> checks (as in the for loop of memmap_init_zone()). And I guess >> that is what we were trying to avoid (adding special cases to >> memory_hotplug paths). > >is_mem_section_removable should test pfn_valid_within at least. >But that would require some care because next_active_pageblock expects >aligned pages. Ble, this code is just horrible. I would just remove it >altogether. I strongly suspect that nobody is using it for anything >reasonable anyway. The only reliable way to check whether a block is >removable is to remove it. Everything else is just racy. > Sounds reasonable. The result return from removable sysfs is transient. If no user rely on this, remove this is a better way. >-- >Michal Hocko >SUSE Labs -- Wei Yang Help you, Help me