Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1209423imu; Mon, 5 Nov 2018 16:05:19 -0800 (PST) X-Google-Smtp-Source: AJdET5d7quRh4DWgVuGF6BsFuv/FX0GaWl0H6lOyWxy78XwAFcNlONXMLbzTyzF7eKzkirTe1AzP X-Received: by 2002:a62:8481:: with SMTP id k123-v6mr24285415pfd.172.1541462719880; Mon, 05 Nov 2018 16:05:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541462719; cv=none; d=google.com; s=arc-20160816; b=qA8igCFuKKiVwdxulWXHiVPJpwmLIcUGCVZjNxgbm4os9y14fpRG8B8Ky9YMk1IcgA N1NfzdhPnH4Z9LnTBAv88FsxpXdU86EHYwg+EhmP4740C3QS44yffrIT3aI88QKs29n8 wUjQz0FJ+RKW+dofpalt1ba3swlJHf1GqzTEZGWKnMNYz7XTzOYEoMcBWs0YvyE7PpAz Pd9D1pSW6xCInhDOCp/AinOW6tqqBhsm7qKoqKfknET4uywialLNzgp6W83vXBUYYZ1i skJTXe8IO5pQiZkvfdGBmk5gvT6pYqjhjEuRLiNOgPuO3l3YHloibrV0QpP/+SNl9kD8 0Sqg== 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=azjMIQVm8gzPRPbmBbpEO+983lQaQYonL9Il4GTjRao=; b=KlKz+3ufG+B+SB0eVcx6hPJS88iiyC4sLjVyrZqehCnt1ydRpinsnmy3Aa6oE1zas/ 40wKGeKHNFBpm3pqtIziq/SUICZjnAHOfgAT4PwGFI9sYcgJrmGMu6xQfyRfqWxWuHuh 8dlBEqFaWG7SAbe9k/dB13T/Zj7WglD90tz4tek4VdW0vgkqRwc8ioBRJygcvc1O//W9 I+kGHuwzvMApIcOnziPpsL6cCX06j7h2MO5wHhVGfJRv1qehPCsIbDR5YctMg9FPgHwW SHiyTKgh9R471KNwsDONYT+IqMUIKzTHlnT1zHZMK/BD8F2JRUTCJ+ObuHEuegfqzij2 UxCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Z0X+h3SR; 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 b4si5011895pgk.350.2018.11.05.16.05.04; Mon, 05 Nov 2018 16:05:19 -0800 (PST) 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=Z0X+h3SR; 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 S1727366AbeKFJ0r (ORCPT + 99 others); Tue, 6 Nov 2018 04:26:47 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:35811 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725844AbeKFJ0r (ORCPT ); Tue, 6 Nov 2018 04:26:47 -0500 Received: by mail-ot1-f65.google.com with SMTP id 81so9862754otj.2 for ; Mon, 05 Nov 2018 16:04:28 -0800 (PST) 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=azjMIQVm8gzPRPbmBbpEO+983lQaQYonL9Il4GTjRao=; b=Z0X+h3SRlkaPFY5ceKC5MFEqeu2jzBMh3kXgvXUZwXX7I+AtknYmbDWFbGSezSVB7U S0EjVGvvYnllLMi4yZF1cKPYHJqJbs0rTi/RiJnQXe9iU4ZAli/w6lFJtP/lKQOmXaID eNYL7lNVmOQ9J/9JWy3hRK7sdP4KrcrJ7GLgU= 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=azjMIQVm8gzPRPbmBbpEO+983lQaQYonL9Il4GTjRao=; b=h5nqKQKBSLPKM54hc1QaEoXQjwcMQXkwuboAD7XN31NQFloS3DuwI7KMLQK8noq+pk 4ZgNGH+caCCMQO2iAD6FcR9gOYhR7izz8fM8TyZkPpUKb6sZd6aW9A/0fqr1GoeTwLFX CDvRiXUN3aD58xdfUPb/7wgpJuWz3Hgf/3ECNjJh6MpSIOZ8uAtGe5jBeBQS4glg7Iya vE97AspnzZucOm9jevcwsLgr8+6uLLJ8T9EhJjUkxaUVPt3gV39BXiNGbWE/EJZhL3/P nxQps/Pdzcx0IgOGhne4vOrseE/mFMCfXb7epacYUZ6FHSLMTsnLxJ0BsI7+qfwdRzq+ 5p0w== X-Gm-Message-State: AGRZ1gLc9v5A9pms1MSJAFMESnw2s2EbeuwfX7gTkmLbK3jh5nXRjZOw JS/KlmEynENeHvjHk9L4kZ38N7HHb6oJpKYsh8QR X-Received: by 2002:a9d:4a5c:: with SMTP id d28mr14376856otj.25.1541462668411; Mon, 05 Nov 2018 16:04:28 -0800 (PST) MIME-Version: 1.0 References: <20181105111348.182492-1-vovoy@chromium.org> <516428f4-93a9-9ed7-426e-344ba91d81e0@intel.com> In-Reply-To: <516428f4-93a9-9ed7-426e-344ba91d81e0@intel.com> From: Kuo-Hsin Yang Date: Tue, 6 Nov 2018 08:04:17 +0800 Message-ID: Subject: Re: [PATCH v4] 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 Tue, Nov 6, 2018 at 2:52 AM Dave Hansen wrote: > > On 11/5/18 3:13 AM, Kuo-Hsin Yang 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. > > At a minimum, I think we owe some documentation here of how to tell > approximately how much memory i915 is consuming with this mechanism. > The debugfs stuff sounds like a halfway reasonable way to approximate > it, although it's imperfect. OK, I will add more comments here.