Received: by 10.223.176.5 with SMTP id f5csp308497wra; Tue, 30 Jan 2018 11:52:30 -0800 (PST) X-Google-Smtp-Source: AH8x224FFWo9SjjpG3kYQNWp56ViGgwu2kkTwLZl4S3avhRWx9fJcPK04H9AW77KCJauW6EZpb88 X-Received: by 10.98.192.10 with SMTP id x10mr31683967pff.27.1517341950639; Tue, 30 Jan 2018 11:52:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517341950; cv=none; d=google.com; s=arc-20160816; b=MF58RsjSu6F7wN1RH/2LE2rF6q06i1U7OuqipK185A33lsihq/kNnhh6y8eQtYP30/ MldORIlMcTPc5jxlRUhY9+sSKLTpXYJs5bRNb4A8OjdnPhTuAVZqP9vhPe1BfJUjzMu2 FPpOW8tAJGW3zZWpV1EPCxFRkaQ+tw1UWKymJgegCJjca9ARWfl19di7p+hRpaw01VUo 4s0pBsibMG1q0cJHnjLpLMwe768H/Pg9D3TxhY4OlHGXLo4Pm5K4W80J0vxTDEfkPRaU eHwgk+7jeekF3lzTQOrXqtAgCyQlvWYqwsGK4Ha1/3Jl6/0LN4tav74gHJWxduthJI7I GuXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=qsp0XXdl9v7ESJ3WHx7v9yClJgGTdP5Qy4FFVzTBMcU=; b=uE6coKYKq4cVRM4gj4QQFQI9v5/D/OOPVVb5/TQqroPzsVw1WOAt6EajC1Lu6KK+AN QM4jM79llKDx1lvG4kUKvBftG5epfEQ1W7C50mFnVCUhmSgkfnUOB2Jd9Tw7lD0kqwhQ HVEfvs/I+MCDH4HIFFh9+moNURLUIaqqHCVjV+ZekrijHL+oHbdN3z+4QKNdR5K9RKix 61WXqhvwj9zM03lTlcdMgdf6oGobTHl//NhmOnwKpCG32uAu3HlNSrpURJK5GdsV6bX4 engdwJUsy2O58kqPt2pIdy8ETUGbfXqa7ytqAoCx7rugKpuMGJpjW50MGavsUY12BWjZ HvHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=udO9NtZR; 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=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1si11040438pfk.3.2018.01.30.11.52.16; Tue, 30 Jan 2018 11:52:30 -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=@oracle.com header.s=corp-2017-10-26 header.b=udO9NtZR; 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=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752841AbeA3TMt (ORCPT + 99 others); Tue, 30 Jan 2018 14:12:49 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:35988 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752047AbeA3TMr (ORCPT ); Tue, 30 Jan 2018 14:12:47 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w0UJC7cV088405 for ; Tue, 30 Jan 2018 19:12:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : in-reply-to : references : from : date : message-id : subject : to : cc : content-type; s=corp-2017-10-26; bh=qsp0XXdl9v7ESJ3WHx7v9yClJgGTdP5Qy4FFVzTBMcU=; b=udO9NtZRmrr09KnkRGwJxYC0CKIqFP2I/0YObEn336b7GxN2yD/HrwNK2JVGQ/BL0OxQ QdB50xAFEKEb2Sd2NpRLYRTTOxNE4W/D4JYNA5m4wLtSOINgj9y+zEkGl3MtWinu8bjG d5KYnLabN1TdH/L29zK6K8BYAIMrmIru+Nae9jvIN6q6B1FejEImWXxXOZRNmNlcA5A4 qX85fUfFYNuj0J0xbXeiFpta7AO/5FMiyipdau8xlmO7Qden7HEEIrNDhB5uZyxh/lJU L8T7LOgSGoxbec6u/Shv1EEpiTezMB82mJZcq0wXLmHnqIsSUi134nijXRGXszJ0PJin 0A== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2ftwf0rc9t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 30 Jan 2018 19:12:46 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w0UJCj8f007412 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 30 Jan 2018 19:12:45 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w0UJCjGU025057 for ; Tue, 30 Jan 2018 19:12:45 GMT Received: from mail-ot0-f174.google.com (/74.125.82.174) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 30 Jan 2018 11:12:45 -0800 Received: by mail-ot0-f174.google.com with SMTP id a7so8125892otk.9 for ; Tue, 30 Jan 2018 11:12:45 -0800 (PST) X-Gm-Message-State: AKwxytfxZqml1rWvGjYtd0ZegxO9zr3KccyMixF5MJVo5DuQXf9Z8DDz rvrldLlEiYqOwjfJz1ms03/ZWTwFc10kIAXUUg== X-Received: by 10.157.42.130 with SMTP id e2mr22573249otb.87.1517339561441; Tue, 30 Jan 2018 11:12:41 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.177.3 with HTTP; Tue, 30 Jan 2018 11:12:41 -0800 (PST) In-Reply-To: <20180130182947.GK21609@dhcp22.suse.cz> References: <20180130083006.GB1245@in.ibm.com> <20180130091600.GA26445@dhcp22.suse.cz> <20180130092815.GR21609@dhcp22.suse.cz> <20180130095345.GC1245@in.ibm.com> <20180130101141.GW21609@dhcp22.suse.cz> <20180130182947.GK21609@dhcp22.suse.cz> From: Pavel Tatashin Date: Tue, 30 Jan 2018 14:12:41 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Memory hotplug not increasing the total RAM To: Michal Hocko Cc: Bharata B Rao , Linux Kernel Mailing List , Linux Memory Management List , Andrew Morton Content-Type: text/plain; charset="UTF-8" X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8790 signatures=668657 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=678 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801300234 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > You might be very well correct but the hotplug code is quite subtle and > we do depend on PageReserved at some unexpected places so it is not that > easy I am afraid. My TODO list in the hotplug is quite long. If you feel > like you want to work on that I would be more than happy. You are correct, PageReserved might be tested in offlined memory, if we go with the proposed solution, we might even need to add "struct page" poisoning instead of memset(0) in sparse_add_one_section when debugging is enabled. Similar to what we do during boot in memblock_virt_alloc_raw() The fix would imply to ensure that PageReserved is never tested and page_to_nid is never executed for offlined memory. I will study for possible solutions. Thank you, Pavel