From patchwork Thu Oct 11 22:13:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Duyck X-Patchwork-Id: 10637527 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 32FA73CF1 for ; Thu, 11 Oct 2018 22:17:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F1232C1FB for ; Thu, 11 Oct 2018 22:17:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12AB52C206; Thu, 11 Oct 2018 22:17:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F3F22C1FB for ; Thu, 11 Oct 2018 22:17:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BF7936B0008; Thu, 11 Oct 2018 18:16:59 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id B56E26B000A; Thu, 11 Oct 2018 18:16:59 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A43186B000C; Thu, 11 Oct 2018 18:16:59 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by kanga.kvack.org (Postfix) with ESMTP id 655266B000A for ; Thu, 11 Oct 2018 18:16:59 -0400 (EDT) Received: by mail-pg1-f199.google.com with SMTP id e6-v6so7650866pge.5 for ; Thu, 11 Oct 2018 15:16:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:subject:from :to:cc:date:message-id:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=ySD2/lL/cVXssri9oktKi8PgviEkOlvPvzuaaJIkOPM=; b=HbuW9YHeCN2jID5Zhn9vVX5dMq1bxshe/BYoBd6G5joEQaoMjpMtrE5jpy6OH2JHpv po0YOHvrOu6CHx4/PO6BOqJzpvpg8YqmzJb37qUdE/K88pv0LAjDDbbcOLuubttQEGRr r6jlfVxokZCTl60fR2LJOcytVO9PaDKRDolhRrllhY+wPIMWTQCXx5PWOhypyCLUlcLB Rt9ty8sLjn2KWCu34UCNKpesmJVQ24K/B2ARtIcqXS41sUMJe2USa8ZeJiHJNsL/4QQF l+xX11Oiygqpn72FkJ/jAVQDhJNRab6exok7y9Fdea6vYORVNu60eYFigEAmsp9JloKT bqYQ== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of alexander.h.duyck@linux.intel.com designates 134.134.136.126 as permitted sender) smtp.mailfrom=alexander.h.duyck@linux.intel.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Gm-Message-State: ABuFfogmL8dbF/Y+BPtcDQ35Tm5do9ZyO+f0g/i/CD6wqgiQJX55z8BK ek02cAwR+pzVqCB2LuISowwdiWYAbpGv5DPW/VYy/1toP0SqEx4Lok9UTznPFK+10mutES6+b4g rOZ7Ueygj97ib5BY4AtAbJY7N9q7oCGuhOQyxF6O7kni//aJwqhTjdg/wTp7UcJEk6A== X-Received: by 2002:a62:5e02:: with SMTP id s2-v6mr3474212pfb.146.1539296219097; Thu, 11 Oct 2018 15:16:59 -0700 (PDT) X-Google-Smtp-Source: ACcGV63ajWKJKPqaExbDbZh3Dqi+w1456ItxtQLbMs2jAdHdJgBJnyqS0H7cQeO3gUii6wHDJZqb X-Received: by 2002:a62:5e02:: with SMTP id s2-v6mr3474150pfb.146.1539296218016; Thu, 11 Oct 2018 15:16:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539296217; cv=none; d=google.com; s=arc-20160816; b=zJMgXa1d4V0C1zPZwxyiWFxizhW82D84JXdHjjzRrKCfG2x2IQaV/8UlwzEsHM32hq AS7KFaT/tkD5DAAMWDvTGussirQllAosUPhSIoYk2E+s/ytwXYqQrAyuQcVwfrZV2iaw d1MPdJ75yzurOnIcVID7FfheT/vhZuok8auHEu323VekbYGem+7iLjc2jNA4F5prlFK4 BOQX7c1ulsBuGsu+/7+JuidkAk0iB/eYbmshHMQ2EyIaiQqjDKCDKNZ4JPcQ3qoWuUrJ pZgJAxCHTfsHvxWghJJAlqJBsDjWTWkjZlZ/3e5TVvsxvjr+fXwlXwr70t1+GtFeDb+u Uk+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:message-id:date:cc:to:from:subject; bh=ySD2/lL/cVXssri9oktKi8PgviEkOlvPvzuaaJIkOPM=; b=Hq22WZQ6QlqS21sK5cxuIhCMB4W6RCJL+nQNKHOq9tc2IJjB5ArlZdHzrPznVAmCKt TSIQqoEQ8UyXUMOX26D/HqrovdljfoDL7Rmpi/5/Ypzz5JNMVRG2ld053EYSYYakG5J8 ClJfS7ycoO+viBtx+p+iUsZqLFPHcYr2+ndRHiIdYMTK0AjmYsWICoRnSIg8ledbj+li p2hLzrSfNQnjcYWuH2p3l2F24LL/5p/EsbHaoFMPnNM39WPtJhv1xPdYQPmCS3xg++sb rTl41oxUkk7CQqSmiNNyjEnUtUC1T0wnUSEtM3wGWmCF+MZ7GMNhN6bWNXIVpzKx/wvs zsjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of alexander.h.duyck@linux.intel.com designates 134.134.136.126 as permitted sender) smtp.mailfrom=alexander.h.duyck@linux.intel.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from mga18.intel.com (mga18.intel.com. [134.134.136.126]) by mx.google.com with ESMTPS id r29-v6si24916614pff.262.2018.10.11.15.16.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Oct 2018 15:16:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of alexander.h.duyck@linux.intel.com designates 134.134.136.126 as permitted sender) client-ip=134.134.136.126; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of alexander.h.duyck@linux.intel.com designates 134.134.136.126 as permitted sender) smtp.mailfrom=alexander.h.duyck@linux.intel.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Oct 2018 15:16:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,370,1534834800"; d="scan'208";a="80765705" Received: from ahduyck-mobl.amr.corp.intel.com (HELO localhost.localdomain) ([10.7.198.157]) by orsmga008.jf.intel.com with ESMTP; 11 Oct 2018 15:13:51 -0700 Subject: [mm PATCH v2 4/6] mm: Do not set reserved flag for hotplug memory From: Alexander Duyck To: linux-mm@kvack.org, akpm@linux-foundation.org Cc: pavel.tatashin@microsoft.com, mhocko@suse.com, dave.jiang@intel.com, alexander.h.duyck@linux.intel.com, linux-kernel@vger.kernel.org, willy@infradead.org, davem@davemloft.net, yi.z.zhang@linux.intel.com, khalid.aziz@oracle.com, rppt@linux.vnet.ibm.com, vbabka@suse.cz, sparclinux@vger.kernel.org, dan.j.williams@intel.com, ldufour@linux.vnet.ibm.com, mgorman@techsingularity.net, mingo@kernel.org, kirill.shutemov@linux.intel.com Date: Thu, 11 Oct 2018 15:13:51 -0700 Message-ID: <20181011221351.1925.67694.stgit@localhost.localdomain> In-Reply-To: <20181011221237.1925.85591.stgit@localhost.localdomain> References: <20181011221237.1925.85591.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 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: X-Virus-Scanned: ClamAV using ClamSMTP The general suspicion at this point is that the setting of the reserved bit is not really needed for hotplug memory. In addition the setting of this bit results in issues for DAX in that it is not possible to assign the region to KVM if the reserved bit is set in each page. For now we can try just not setting the bit since we suspect it isn't adding value in setting it. If at a later time we find that it is needed we can come back through and re-add it for the hotplug paths. Suggested-by: Michael Hocko Reported-by: Dan Williams Signed-off-by: Alexander Duyck --- mm/page_alloc.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 3603d5444865..e435223e2ddb 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5571,8 +5571,6 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone, page = pfn_to_page(pfn); __init_single_page(page, pfn, zone, nid); - if (context == MEMMAP_HOTPLUG) - __SetPageReserved(page); /* * Mark the block movable so that blocks are reserved for @@ -5626,15 +5624,6 @@ void __ref memmap_init_zone_device(struct zone *zone, __init_single_page(page, pfn, zone_idx, nid); /* - * Mark page reserved as it will need to wait for onlining - * phase for it to be fully associated with a zone. - * - * We can use the non-atomic __set_bit operation for setting - * the flag as we are still initializing the pages. - */ - __SetPageReserved(page); - - /* * ZONE_DEVICE pages union ->lru with a ->pgmap back * pointer and hmm_data. It is a bug if a ZONE_DEVICE * page is ever freed or placed on a driver-private list.