Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2122973imd; Fri, 2 Nov 2018 06:24:41 -0700 (PDT) X-Google-Smtp-Source: AJdET5czhXazb2A7UMcxfaOMzG/2gJNqQ9GZOz3PF3i75dmAyC58By+ltInQuklOktAlaVSxFkEh X-Received: by 2002:a17:902:780f:: with SMTP id p15-v6mr11509936pll.197.1541165081889; Fri, 02 Nov 2018 06:24:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541165081; cv=none; d=google.com; s=arc-20160816; b=nq5Sy0nZFQMTQpSS4Xr/whshxNVzqyISbZkluNFHl+AuhujSmu3x8Sot6WJewKm8th PepCHF/02dbbtr8Xc1jWOUl+YFC9zXO4YpYrVt/BO/lBNdjyIYzftJNi8GxZyv6T0ylm 4DDg3B/ig5acNV6DwTGXx/OskU8/4gAZdgtRjF8DGGSVKORri0e20ZKXYZaF6g6XVjl+ DyOxYu8JLevH4vse1Y+xHm8FK2KA8h8pu1mm/p5T08n0ONmqvvpgs8ARUTbyHbUfXTgP JC6F/dwdURuBq2DiEqXGs+j6S6m32XfUaNr7IByZrhXuf7dxIDdV8pIxSdHayvEqVkwB dKYg== 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=Ni+Rt4txnq8lnjB84fhrGSHGRXAEUIxpsEakSXu+Y1g=; b=PHazTm5Qh7sVQq5XoAzaaROPhYmMzwG4DEZI2+uNP+bqKOjoWF3yRnXiUo2iSZCkxp Vpq3O41VG2X1RsftFXkFIfhyAMADAQppLBAW2Be7oTXQLdGPiF42e4JgJ9vgihdl/Smb L+QOgswh6AO7HQ6ms0jk9s34v8AQAN4JaW/nXEiFqW7TFhWpiTtMWk9Ay7VmWFi+/lgC /72N+/Sw3z/wbOV/K6AcsPW1CIh+b3qRsBTT1T++OBWzBiKZL2OpK1cNvDRzynR/Ndzo n8wHoC6eSM+itBDH/mrs8dbbQLxjTM+09rR/t/HS4ajJGxQWyA/sEirE3shGX9mAiQFp +wpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=VI2GjuPs; 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 62-v6si17431332plf.308.2018.11.02.06.24.26; Fri, 02 Nov 2018 06:24:41 -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=VI2GjuPs; 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 S1727703AbeKBWaH (ORCPT + 99 others); Fri, 2 Nov 2018 18:30:07 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:40366 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727645AbeKBWaG (ORCPT ); Fri, 2 Nov 2018 18:30:06 -0400 Received: by mail-oi1-f194.google.com with SMTP id u130-v6so1545088oie.7 for ; Fri, 02 Nov 2018 06:22:58 -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=Ni+Rt4txnq8lnjB84fhrGSHGRXAEUIxpsEakSXu+Y1g=; b=VI2GjuPsyU2M4KYwLzBRLN9rqHndurpjsX3rHQOZjpQ2KHRrprS+XdIU1KHlNw2fhn y3hIiiT8NXdEe6hLOvW7sGpcyL1OrRWtfKb5oAvQ7SI+UzDtE6cyYs25IAqTdS7si5bo +mZpKcYm8mkLXGKEUbIvVDp2n32arSGzgvUek= 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=Ni+Rt4txnq8lnjB84fhrGSHGRXAEUIxpsEakSXu+Y1g=; b=BpB5hv1C7V3cLme/FpkrE3VEAfC3wYTpl0F+t0W+fVIo0ad8W08t2pA+fiA9jcuDkS N3A2Ryc/mXrFruxv9NuCNQv+63g97xgUH5QxcIuvpsWOYHdC2xnQ8a3gxcE++fMHqsET NpR7ZLE6upyTgD7DMkDPhOdUXBcYACpwYTHUQrurUO+Y3Gwf75NlPkNxfqv5wX6vvsGj qKpvKYqsyFJG+faPb9//grc9ntHdUDce7GTrwS6yL0jmSRnMmEQsEcphyHDDuDT9C1/Q liJ7rKaEfRAk+7s+4v7U/ROS4+TRH9xqWNdwFlnkSRQJcuQSyCFbXIe/movPMTP6MuSh +fyw== X-Gm-Message-State: AGRZ1gJTPxCfQYizCoKRB1NUVYkUwA02jQ2woG4Bz9dNmDvLPfpdjfmu 3MV4zTmzRRRPgNU6ZLSPU+RxJGl+BNSvyi/x3LTI X-Received: by 2002:aca:e514:: with SMTP id c20-v6mr7044332oih.75.1541164977471; Fri, 02 Nov 2018 06:22:57 -0700 (PDT) MIME-Version: 1.0 References: <20181031081945.207709-1-vovoy@chromium.org> <039b2768-39ff-6196-9615-1f0302ee3e0e@intel.com> <80347465-38fd-54d3-facf-bcd6bf38228a@intel.com> In-Reply-To: <80347465-38fd-54d3-facf-bcd6bf38228a@intel.com> From: Vovo Yang Date: Fri, 2 Nov 2018 21:22:46 +0800 Message-ID: Subject: Re: [PATCH v3] mm, drm/i915: mark pinned shmemfs pages as unevictable To: Dave Hansen Cc: 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 Thu, Nov 1, 2018 at 10:30 PM Dave Hansen wrote: > On 11/1/18 5:06 AM, Vovo Yang wrote: > >> 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? Chris helped to answer this question: Though it includes a few non-shmemfs objects, see debugfs/dri/0/i915_gem_objects and the "bound objects". Example i915_gem_object output: 591 objects, 95449088 bytes 55 unbound objects, 1880064 bytes 533 bound objects, 93040640 bytes ... > > AFAIK, there is no way to get i915 unevictable page count, some > > modification to i915 debugfs is required. > > Is something like this feasible to add to this patch set before it gets > merged? For now, it's probably easy to tell if i915 is at fault because > if the unevictable memory isn't from mlock or ramfs, it must be i915. > > But, if we leave it as-is, it'll just defer the issue to the fourth user > of the unevictable list, who will have to come back and add some > debugging for this. > > Seems prudent to just do it now.