Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5471598imm; Tue, 16 Oct 2018 10:44:36 -0700 (PDT) X-Google-Smtp-Source: ACcGV63+vXYlcfZTbqmh9zMzA+hsXiYD8vUMSKNjoZrwXrCvoFOyPIZuhukiPKquIRIyCWFZ1HYq X-Received: by 2002:a63:f744:: with SMTP id f4-v6mr21282581pgk.410.1539711876733; Tue, 16 Oct 2018 10:44:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539711876; cv=none; d=google.com; s=arc-20160816; b=GH+jfIlzBNdhoucp3lt03WJmtN1nSaTC3eBy/YeC5fiOseZSKJcNSIO+5eeZCisEDj DNYSn3NOrTshjF4IX4FIfpIqNfgHYKfw4ASbXd1ihASoyhuLl0lBkybjpj89MC92aGNz anJcjlVjsXbC85VlXeCbSg03AHztodntV3lwRqYsGT3El5Wg8m3GYAd2Vf2/IyqNIdKl B2zNgVrOmL+JkKWQZI7ygHiZJS239ZfvBgqPMvxCTVXFCbV3C/aRCBMqA80nl0F0wNQN aLuhNAhRJ5qf1kANh6kE4gSKI49OeTBEWVFstynUeQ1+pE2NefowfA3YxqPfekbqo4oq 7TZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=YdabV/sgKBvvccjjsOAMlvUJaP4/pMcygvoftqw2KQ8=; b=XwNJl7F5p5mSUbN9PxrLdLN47S+c6YeeBrEM4tciEsQFYyUnWidEWdq7+hdh0Yv8fO qin3C2OK6rGpZPvmwVYbdkn/I6x+9pmn+RosIvh/kgEXbMyTSi7nPXmHVKhcW6c9yGS6 emkl/pThZKpqd/lfl6tuvx0V1VPAt8QgWa0MeKbm+doMI2kqQtUfbU3yajIvaJZFwV7q aT5Gz1W+JDN6buD+TsyeMyizAopzKgESOIKLOW+5KFjdOindsSAihxPGvVc5MBjRHbyX xtwRpL8OMBwcHODnUMxwH7yBNnVRak2TZvM3VZveMppnp+Yb+THSjNr9fZsO7cr4QrMT bz8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WGlQ2pnu; 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 y9-v6si14884735pgs.214.2018.10.16.10.44.21; Tue, 16 Oct 2018 10:44:36 -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=WGlQ2pnu; 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 S1727471AbeJQBfc (ORCPT + 99 others); Tue, 16 Oct 2018 21:35:32 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:42739 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727433AbeJQBfb (ORCPT ); Tue, 16 Oct 2018 21:35:31 -0400 Received: by mail-lj1-f196.google.com with SMTP id y71-v6so21721452lje.9 for ; Tue, 16 Oct 2018 10:43:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YdabV/sgKBvvccjjsOAMlvUJaP4/pMcygvoftqw2KQ8=; b=WGlQ2pnu8k8Br7WX9ZAeZqUF28iw6BQbnJWfcE+C419xkiNDRt9+D46PnrGwZxz9j8 /rjCydIDmDSdw21sztvdlB4s247LMjeI0MogrSTfeQEcn+Zz2ELIAA2RiT2bJxBAFs7T HvGEZ4HFXyUs9VhLcOC+3aLibQfo2MUEFoo3c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YdabV/sgKBvvccjjsOAMlvUJaP4/pMcygvoftqw2KQ8=; b=SiTWVDWOFKusTQyYvITEalJA/BZnkEtcLQ2IDemPB1lrtfKR1am465jTHX4eIBRX0F 30USTbocGEdpOxVe04SLuC95aZJ4I2Cv1iNmNbKlMeCykCpYU8gdcgyzydVkQNKUy/Pu 9eyoMrFrP30Gz/lrZ+ueepjSxvNBx3rKeiEGpIT39Rq9RxYnkHYqKXnUNt3LLA3Ni9xT HeazZ4xvcCjAXCHJNVPc0jXAoS1zsqVTNj4/dioU8YBWN9wouFs6LrdsZGBBKfnSJHat WmyAPIOAoC+CEDe2i3mwZrXvM5CPD1Kxq7nu80TuZD6MN4t96vfcDJgvBf0mlJGfu86H cKhQ== X-Gm-Message-State: ABuFfoi/9vn/JkBNJdmH9TsexLZQD43BCZ450dCa5vTEa1HzjRD8wP9I AbqpTcv08SAeUdS2bjs2nPwUCj/PU9WpaW0= X-Received: by 2002:a2e:b017:: with SMTP id y23-v6mr13922375ljk.82.1539711837360; Tue, 16 Oct 2018 10:43:57 -0700 (PDT) Received: from vovoy-z840.tpe.corp.google.com ([2401:fa00:1:b:d89e:cfa6:3c8:e61b]) by smtp.gmail.com with ESMTPSA id r4-v6sm3358752ljg.12.2018.10.16.10.43.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Oct 2018 10:43:56 -0700 (PDT) From: Kuo-Hsin Yang To: linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, linux-mm@kvack.org Cc: mhocko@suse.com, akpm@linux-foundation.org, chris@chris-wilson.co.uk, peterz@infradead.org, dave.hansen@intel.com, corbet@lwn.net, hughd@google.com, joonas.lahtinen@linux.intel.com, marcheu@chromium.org, hoegsberg@chromium.org, Kuo-Hsin Yang Subject: [PATCH 0/2] shmem, drm/i915: Mark pinned shmemfs pages as unevictable Date: Wed, 17 Oct 2018 01:42:58 +0800 Message-Id: <20181016174300.197906-1-vovoy@chromium.org> X-Mailer: git-send-email 2.19.1.331.ge82ca0e54c-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When a graphics heavy application is running, i915 driver may pin a lot of shmemfs pages and vmscan slows down significantly by scanning these pinned pages. This patch is an alternative to the patch by Chris Wilson [1]. As i915 driver pins all pages in an address space, marking an address space as unevictable is sufficient to solve this issue. [1]: https://patchwork.kernel.org/patch/9768741/ Kuo-Hsin Yang (2): shmem: export shmem_unlock_mapping drm/i915: Mark pinned shmemfs pages as unevictable Documentation/vm/unevictable-lru.rst | 4 +++- drivers/gpu/drm/i915/i915_gem.c | 8 ++++++++ mm/shmem.c | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) -- 2.19.1.331.ge82ca0e54c-goog