Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp747585imd; Thu, 1 Nov 2018 05:07:07 -0700 (PDT) X-Google-Smtp-Source: AJdET5c0jC97/RwsTs4r1wXvjNsVGCQISPZaJz89xyBEY9mhG9hR8bC44uGAl3Xh0GGtCIBf0Kz+ X-Received: by 2002:a17:902:20ca:: with SMTP id v10-v6mr7533382plg.182.1541074027818; Thu, 01 Nov 2018 05:07:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541074027; cv=none; d=google.com; s=arc-20160816; b=A/YCa01/rHqxf4bYvBx10ombAqBfkdoN3UDTJhGsA9SSsqRUqPryohObCXA6QvF417 XXx2HrNO4tO4rR7LLAk+UYubKf9ugVaTiNINGYQO3MMs8rAeJLD6saX78OFJrbVBsi6A I1rovmmXU3No1ukGPhj2iMdX1P+b7CFzFCCFFCqt2dhs/imfCABKZfCRCzda/TUHYX3s pg3eu2ueTOHzJULiKNxVMHr1KGkTPEoQUqBavDweh4t0mx2mS8xDXZboZMyU5Mm4g1cU 3Ed80IU3Vb52CmsMphLanKx4pDv1ycP44etsfqXFcXgvIGmAXL5j8gonEvhBlJaCefgN 4mfQ== 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=qAZYRxI4k6444heYdVb1xsjRt+hchOlW2DsnTf3xsVU=; b=UItfPWjstjtSxs21ZbILA5MiaMgmS/R+l9BYdMnhokfo83OuXWw37GY5otoyMAouLB zr29kgEUOm/eLc/J7Gky+p+ZEDPqzq/cvx6gHuNmUJgv/N0D+2yxtTnlsVyJ18UDdvmu F786aQuXHgT0l8JhoH3QdeuJi6EFnlFnCko5MTVolVsdRC0dOhesETvj+YomIhwySw9V FgcpRKCQqI9ZTrKDrhwXLfwDtjn3fyyCyJlvsEIxcG2TC2MW4CRZXwvBYy4xMGURS+b/ SgAISCnRq1Y0ViFzSJ0rIw6+/fRxcc+j7eiLk30vsYBgrzRdqJ8iA3koQjy1XWjITz5c LNwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Z2xcV5px; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e1-v6si8560020ple.148.2018.11.01.05.06.49; Thu, 01 Nov 2018 05:07:07 -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=@chromium.org header.s=google header.b=Z2xcV5px; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728456AbeKAVJE (ORCPT + 99 others); Thu, 1 Nov 2018 17:09:04 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:39027 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728085AbeKAVJE (ORCPT ); Thu, 1 Nov 2018 17:09:04 -0400 Received: by mail-ot1-f67.google.com with SMTP id g27so4620568oth.6 for ; Thu, 01 Nov 2018 05:06:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qAZYRxI4k6444heYdVb1xsjRt+hchOlW2DsnTf3xsVU=; b=Z2xcV5pxo653ew7J7+71KeMoVcsbrj1djbAiXQc6o0LmXgLTaU170HzU+6XgAX6ono zxUqwJ5J/MNmhi/4jBeK4nDS76XI7KrT3ZXEoVuOLvAalr5tzi71M/xjIq0mZeXlG9E2 LNoAJOpqrVoqHvpOl+kaCd2wYdNlxi68TG4Ek= 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=qAZYRxI4k6444heYdVb1xsjRt+hchOlW2DsnTf3xsVU=; b=pAX+jOy0Z7mOsmTHO8iqmy47A379cTsqWnrAL1nRK59flFvsI/RW9dularMeIprQyg uLE0Jsh7+utB/FNc1uB5V9a+ie7vSm3ROgtrsJXSUCc5MXoXGlyBQ/qBpoTJYsgVqeM1 HsHA4DRUkD/lcoBqMxgzUKh1xZPmyxzlB/pnHlhx/VdeSTTdmR+lydXIXPSLHZgy3zYt mv819aSHeFMU+vZqMdH+GlFxrG6ljlHdSew5Iz8kZUGB2spjAD/P9avhkn4JODty7jcI kfW1G6LAr3Ck6O7fCcWh6nCNgc0ahsJxmr6sRNH31hQRcPQ04HMcCen5Gc9rrMb88d8V 0afQ== X-Gm-Message-State: AGRZ1gL1GCIu3IDY56cnvIqMWrJTtc5DJkcvJBSxHkVujWBrp1/3nhZ/ iOrWy2PZqt8J1FaOL6Ks+gEbDw+nxp0O4phazrXj X-Received: by 2002:a9d:48c6:: with SMTP id a6mr4487637otj.181.1541073983358; Thu, 01 Nov 2018 05:06:23 -0700 (PDT) MIME-Version: 1.0 References: <20181031081945.207709-1-vovoy@chromium.org> <039b2768-39ff-6196-9615-1f0302ee3e0e@intel.com> In-Reply-To: <039b2768-39ff-6196-9615-1f0302ee3e0e@intel.com> From: Vovo Yang Date: Thu, 1 Nov 2018 20:06:12 +0800 Message-ID: Subject: Re: [PATCH v3] mm, drm/i915: mark pinned shmemfs pages as unevictable To: Dave Hansen Cc: owner-linux-mm@kvack.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, linux-mm@kvack.org, Chris Wilson , Michal Hocko , Joonas Lahtinen , Peter Zijlstra , Andrew Morton 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 Wed, Oct 31, 2018 at 10:19 PM Dave Hansen wrote: > On 10/31/18 1:19 AM, owner-linux-mm@kvack.org wrote: > > -These are currently used in two places in the kernel: > > +These are currently used in three places in the kernel: > > > > (1) By ramfs to mark the address spaces of its inodes when they are created, > > and this mark remains for the life of the inode. > > @@ -154,6 +154,8 @@ These are currently used in two places in the kernel: > > swapped out; the application must touch the pages manually if it wants to > > ensure they're in memory. > > > > + (3) By the i915 driver to mark pinned address space until it's unpinned. > > mlock() and ramfs usage are pretty easy to track down. /proc/$pid/smaps > or /proc/meminfo can show us mlock() and good ol' 'df' and friends can > show us ramfs the extent of pinned memory. > > With these, if we see "Unevictable" in meminfo bump up, we at least have > a starting point to find the cause. > > Do we have an equivalent for i915? AFAIK, there is no way to get i915 unevictable page count, some modification to i915 debugfs is required.