Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1401329ybp; Thu, 17 Oct 2019 12:14:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCh+N/ryrDAkOWnFnAS4mjcU1v3cMGkoM/2gU8bUgvSBrlkwSlkmVa4QzGxLPbyO0zKHfT X-Received: by 2002:a17:906:4a95:: with SMTP id x21mr5220063eju.18.1571339659147; Thu, 17 Oct 2019 12:14:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571339659; cv=none; d=google.com; s=arc-20160816; b=AOIrJ4RX+LA7D2eZ8rHwNsKb188MV2CLxRfMpwT0oaC3ohIw2ln2lIUYTeIcsEJ5wa iN7P9bgS52vQIwSRvSeadz+aF9S9iMI64+jAE1bOUMIToIK9cjIQ6/v/UL6NhZGTDary ntKNwIJrF016jtdpFWtlXFfCG1Sa7HaswKA/KV+4Wak+hHJCG7lioeWPAYEinA6ufPBd FLGVXRqeo21kFcn3qwFzIi8lBYXgKiquwv68rZDbUG8lHVBJy9YUEAlst2SIN6Y6U0eu 1mgdha0OymBHo0/Z8KVVwLniOTayzr17Zlil8J+qN+BvV8k4hjg38jneQMMOEwdCzdzX xzSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:from:cc:to:subject; bh=wu4acQDy5TqkKJ0rVO+hTwTqzPUt1WBHetcbE5zx2cE=; b=LWv/dd4uOr3zNgjv2NndoiuBUbCmZg9/UughYtyY7IMrgmkF8yE/tiK8PSMi/JoWLA u27tY4YEUy3hunKCs8SNS2LrBsXqQrMHjxs/xDTYNkooHVoF7qSAod+rm7UG7soyHuCU NM2YOCKVpKWtDwFIp6gp3lbb6kAq08AnDZ8TGgjNu+91cURtwOUK8RTgJIfIb5Bz+xzI gG98/oTYNdHuzi2L2PLPsYrUlGX6AElUrRELTE3cwWl5hXS11thLuZTwbWecgQ24fGtz EXp2P25QRF2FsvLqHhSQcfSsFMzoG6pM4gzG5bZjGYGQ1StleqDTOSDiY0QOKb49IaxS 7UqA== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y26si2044215edv.134.2019.10.17.12.13.54; Thu, 17 Oct 2019 12:14:19 -0700 (PDT) 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407375AbfJPWOM (ORCPT + 99 others); Wed, 16 Oct 2019 18:14:12 -0400 Received: from mga01.intel.com ([192.55.52.88]:64007 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405224AbfJPWOK (ORCPT ); Wed, 16 Oct 2019 18:14:10 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2019 15:14:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,305,1566889200"; d="scan'208";a="208057636" Received: from viggo.jf.intel.com (HELO localhost.localdomain) ([10.54.77.144]) by orsmga002.jf.intel.com with ESMTP; 16 Oct 2019 15:14:09 -0700 Subject: [PATCH 0/4] [RFC] Migrate Pages in lieu of discard To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, dan.j.williams@intel.com, Dave Hansen From: Dave Hansen Date: Wed, 16 Oct 2019 15:11:48 -0700 Message-Id: <20191016221148.F9CCD155@viggo.jf.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We're starting to see systems with more and more kinds of memory such as Intel's implementation of persistent memory. Let's say you have a system with some DRAM and some persistent memory. Today, once DRAM fills up, reclaim will start and some of the DRAM contents will be thrown out. Allocations will, at some point, start falling over to the slower persistent memory. That has two nasty properties. First, the newer allocations can end up in the slower persistent memory. Second, reclaimed data in DRAM are just discarded even if there are gobs of space in persistent memory that could be used. This set implements a solution to these problems. At the end of the reclaim process in shrink_page_list() just before the last page refcount is dropped, the page is migrated to persistent memory instead of being dropped. While I've talked about a DRAM/PMEM pairing, this approach would function in any environment where memory tiers exist. This is not perfect. It "strands" pages in slower memory and never brings them back to fast DRAM. Other things need to be built to promote hot pages back to DRAM. This is part of a larger patch set. If you want to apply these or play with them, I'd suggest using the tree from here. It includes autonuma-based hot page promotion back to DRAM: http://lkml.kernel.org/r/c3d6de4d-f7c3-b505-2e64-8ee5f70b2118@intel.com This is also all based on an upstream mechanism that allows persistent memory to be onlined and used as if it were volatile: http://lkml.kernel.org/r/20190124231441.37A4A305@viggo.jf.intel.com