Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1892313imu; Fri, 14 Dec 2018 02:21:09 -0800 (PST) X-Google-Smtp-Source: AFSGD/ViEuHlpm91O4QQqDerGIGCtogkGNXhGYzKaioph6yQzZYLoRZMMAGBdB2ZG/El8ttSmNZ1 X-Received: by 2002:a17:902:8541:: with SMTP id d1mr2359288plo.205.1544782869857; Fri, 14 Dec 2018 02:21:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544782869; cv=none; d=google.com; s=arc-20160816; b=pnM66V4UkDCLEnv2BitwSr3N0A4UEBEo/QgHdOZhS6oM2s4raTsC1nqIKVMOQOFu8d H/RksWJjM9PSyvBICg3fUJ3ddAAuSizNR+RlPwKJz4iQE/G1K68OHGszUvNBqsxwfERK qzcPTz3HNtirmIcjDz1yjNFOspOYYL1bcF1YJe9Uv9TlPvwqoLEG5TjdpN2ypy6miRJA L+QuWSsIKRY0B02RoqFn44+8NxrrI+pJp4qvQK1jAFD7QeskRedZycOV3eKeNvTPp+C8 cUMufPeB3441OKSTyY5360S0lO958Cama/K0rP9/jPPIPMX3SUcFBiO46blovSOiUbcp pTBw== 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:message-id:subject:cc :to:from:date; bh=lHulh07TdmW17JnoF1uNqlqsBdU3H3SeRwrwkt1WPVA=; b=mItoeGXGaNGKp07QkdmWDSHjnbYN+goqNloYug59N2KcvKead6jS0iYcG3qa0LHpJb kksYUDI4DuGvgX7QLux2xadWaJpzt5ET60ZNNt0e7VumBS1lk2hdYt03NWD8XpB1zJck uzFgd+dF6bAtMNYTq3KcAA64bEmBGDfADe/vxBZVILnkYn4Edk4zkFIjUiPfYDNQLqZb QyZPHGSDMfxafQ/4BednSvuYmfOkwdJE7gFa0dOOYZ2Z3gbJDVFq/WMNKlMSkAnOqdwf aeppQsZ9tZtx4dhpeCOhMUyqWqEgIuIcdpaWWbOJylLt1op9xvp2CeVNTjF3BQyWPuO8 A91g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l17si4012825pfd.236.2018.12.14.02.20.54; Fri, 14 Dec 2018 02:21:09 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729365AbeLNKUC (ORCPT + 99 others); Fri, 14 Dec 2018 05:20:02 -0500 Received: from mx2.suse.de ([195.135.220.15]:52486 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726344AbeLNKUC (ORCPT ); Fri, 14 Dec 2018 05:20:02 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C74B4AD85; Fri, 14 Dec 2018 10:20:00 +0000 (UTC) Date: Fri, 14 Dec 2018 11:19:59 +0100 From: Michal Hocko To: Zaslonko Mikhail Cc: Wei Yang , Mikhail Zaslonko , 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: <20181214101651.GE5624@dhcp22.suse.cz> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <674c53e2-e4b3-f21f-4613-b149acef7e53@linux.bm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [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. -- Michal Hocko SUSE Labs