Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1745237ybg; Sat, 19 Oct 2019 01:35:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqypO5rPQBfW9VW4tZq9o6OdcKdlvSw50tMt14ha7d2wUw4fHqlFDbiSoYwj46LxYUcQONL3 X-Received: by 2002:a50:ee92:: with SMTP id f18mr14519419edr.56.1571474105846; Sat, 19 Oct 2019 01:35:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571474105; cv=none; d=google.com; s=arc-20160816; b=johsoNesUI+HZTTNTH+2n29cdcSXH/AEv+kqbFAsYozPut/1c982eWOdcMsMxZ1E/d v7Z2emSE9L9PsTkqOWW8LUzUG9fO3nb6xFShF5Kp34a9GF0WPHYYVqKkkM+BmSGvM/14 cDtf/iVqqOW4ltFmQQqLoXBGgM6Dpgp2NoGPICpDJtA7o+M83o7F4dKwVmOb7v6QPHGi SV7X0nYUYd1cyb5FtR0OZNaiTZWtfcf+rmnLdqM5b7LKHRB14GBLk+3avuYbXJg7Q8yA 7qgM+1cxCDOa5qsI4m+WLwfWKdoQYj69hqKt+K3CHTN2qvUeuGYylPpdRZya8jejGhGD mhaA== 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 :in-reply-to:references:mime-version:dkim-signature; bh=qyX3ITW1lAwaLBwEuGBaqhYdKeg34Dzcm26Ri/ifd24=; b=pNFT110mfe8aD4ZRUads4WoBwqhMYt8g9KKQ2C/3Ax48UgeDINNwZ+mHqqLgyn56nd vUC5NcaoLSVPJGY81mgIobdatHAaRLQZZGdQEb1QkSNV+MGvkIq9KRDhHoykptCcnqaD cNj+KzWgakXiPtgk7kTYpIqm+NcJXjQFduCujytaw+u28gTYQmJDv/8zxQPvyEu6dZB9 cTPsGm4TyRZTK2FuiZaVnNwOdUQHOza6E/EmTsemuN0SA1PMQU39YiYMzE4ExhFO8Q8F s9mf3UEg8jDPS16iaN2Qm73+/J69AC2mffjXeV1aUib4cOx7YmUTKSNVKOflnody/P2d tIPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=RKUwiF9l; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i12si5665298edb.133.2019.10.19.01.34.42; Sat, 19 Oct 2019 01:35:05 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=RKUwiF9l; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405080AbfJRPjp (ORCPT + 99 others); Fri, 18 Oct 2019 11:39:45 -0400 Received: from mail-yb1-f194.google.com ([209.85.219.194]:44577 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728464AbfJRPjp (ORCPT ); Fri, 18 Oct 2019 11:39:45 -0400 Received: by mail-yb1-f194.google.com with SMTP id v1so1936500ybo.11 for ; Fri, 18 Oct 2019 08:39:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qyX3ITW1lAwaLBwEuGBaqhYdKeg34Dzcm26Ri/ifd24=; b=RKUwiF9lIf8864JdEImdlk6BX1M7tycwiSIZaMlkA8pqzCYHEsZkL8IXsYZDGLW6Ls C1RbVAEUy18DKa5zsJYsUC3UnLXXnbHcuX8i9ATVWKJFDlqfuwb9/8zmnaFQ84BAurg3 lcZhA4wrJgqr1bpeW2Sbrz1RRprWsRsYk80T7JFJWHqZ5vBfA3ylUQ9r/1ekleD/C3X2 HLfRUjV6BJEN6bUK7xM/fXjZULA/m/TcSmX42XrjQKBkCHjywgkzysu9mgcWSLUMFH+e bwKydbi820y6uRiihSD8FvRpwg15e6dNnL3jBCgkdi1YVlegXExHrfZsfPk0Jm9cwOfN Dzpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qyX3ITW1lAwaLBwEuGBaqhYdKeg34Dzcm26Ri/ifd24=; b=PLHJCXxAcTXY1Rbi+RyQ4WTxackR1Urmkq+VSbFHEwgJa0ye6pEbUti7WLbM3svGcK 7Lb3lslnJayJPYg1nr995X1qVK5NSfiBJ0ioUIp1GY2LZtGWHoNs6Todm6RLrip8j4sQ 4nbMUJi1MtsMd5dlXNEKVUdDtt4HJg0yl9QN0cQJHcYRd6Xb6Qz0hBTnNwHM8q8Ml17O DjfkJ3j9hrH86Bguvau7dgFGQuz2hnQebVTEs0NccwfZQyKDNjEgtPJNTo6nJP0hPwDD +aqMRZ2+eaW4Q3iEVk0BspNantPhDWw9fQo4FDzt9RymhmUZ+QlwF/r1Ti6e4MqcgDKa Allg== X-Gm-Message-State: APjAAAWBZ7e26u6OAktTVttRPINF4F6miRtyR5cZgSmDG+eU6W7m7Qv5 Iyj2ZEei51h+LYKdnF/09vU/QXbX9IRtGKz0w7aIHg== X-Received: by 2002:a25:8b0a:: with SMTP id i10mr6476076ybl.459.1571413182525; Fri, 18 Oct 2019 08:39:42 -0700 (PDT) MIME-Version: 1.0 References: <20191016221148.F9CCD155@viggo.jf.intel.com> <85512332-d9d4-6a72-0b42-a8523abc1b5f@intel.com> <197ba38f-0443-b3a7-7ce4-544bf97c58dd@intel.com> In-Reply-To: <197ba38f-0443-b3a7-7ce4-544bf97c58dd@intel.com> From: Suleiman Souhlal Date: Sat, 19 Oct 2019 00:39:30 +0900 Message-ID: Subject: Re: [PATCH 0/4] [RFC] Migrate Pages in lieu of discard To: Dave Hansen Cc: Dave Hansen , Linux Kernel , linux-mm@kvack.org, dan.j.williams@intel.com, Shakeel Butt , Jonathan Adams , Mel Gorman Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 19, 2019 at 12:10 AM Dave Hansen wrote: > > On 10/18/19 1:11 AM, Suleiman Souhlal wrote: > > Another issue we ran into, that I think might also apply to this patch > > series, is that because kernel memory can't be allocated on persistent > > memory, it's possible for all of DRAM to get filled by user memory and > > have kernel allocations fail even though there is still a lot of free > > persistent memory. This is easy to trigger, just start an application > > that is bigger than DRAM. > > Why doesn't this happen on everyone's laptops where DRAM is contended > between userspace and kernel allocations? Does the OOM killer trigger > fast enough to save us? Well in this case, there is plenty of free persistent memory on the machine, but not any free DRAM to allocate kernel memory. In the situation I'm describing, we end up OOMing when we, in my opinion, shouldn't. > > To mitigate that, we introduced a new watermark for DRAM zones above > > which user memory can't be allocated, to leave some space for kernel > > allocations. > > I'd be curious why the existing users of ZONE_MOVABLE don't have to do > this? Are there just no users of ZONE_MOVABLE? That's an excellent question for which I don't currently have an answer. I haven't had the chance to test your patch series, and it's possible that it doesn't suffer from the issue. -- Suleiman