From patchwork Tue Oct 16 17:42:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuo-Hsin Yang X-Patchwork-Id: 10643931 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8B33E13B0 for ; Tue, 16 Oct 2018 17:44:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B5262A52D for ; Tue, 16 Oct 2018 17:44:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EEF72A57E; Tue, 16 Oct 2018 17:44:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0DC432A52D for ; Tue, 16 Oct 2018 17:44:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B066C6B0003; Tue, 16 Oct 2018 13:44:00 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id ADDDE6B0005; Tue, 16 Oct 2018 13:44:00 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9CCAA6B0008; Tue, 16 Oct 2018 13:44:00 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by kanga.kvack.org (Postfix) with ESMTP id 2B7B66B0003 for ; Tue, 16 Oct 2018 13:44:00 -0400 (EDT) Received: by mail-lj1-f198.google.com with SMTP id k10-v6so6636094ljc.4 for ; Tue, 16 Oct 2018 10:44:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:mime-version:content-transfer-encoding; bh=YdabV/sgKBvvccjjsOAMlvUJaP4/pMcygvoftqw2KQ8=; b=Y38vs8XEpQQCYxZQKj94qIBnoEfY8Py+5Wu95mye5w0WYD2cTsT8BmkG7C34Lml279 wdCoZsbk6NKTj4AonSpyW2AZwZatHyq4MQptK0y3jBBSjvqIgym4MGRZWIx62BrQcnWf cnRApCBTg3EGKU5Pr+mvGO/OKdHyA44ql9SzG87vgdAl41oAvUELjvX4bJ3kNZmtiVlT Hul/CS2tYA1kv9svbexLghLcJJvXuQhlWeDoap6TxHYNYQ41FIlUXF4NTjypbQbSVIDe 5ID637RwHYbFqCnhuQjlI90LW9nkqUrf9PKJYW5Ck5PmATtQkjAv82kIBAZ55Z/Ec3l2 I1Ag== X-Gm-Message-State: ABuFfohdRkpO25NKCpATddySu2b0aBJV46z5sqQp80GEQ6kloaUnuWbB +pOKRh9nvrkLuohPIffwXm6plpM1QtlEO2owWyf7sauKGbnlLoqRLWGjrg2LcqFh6BwJRU9UVRw hbQqf9VeSsGUsmJ8M653gROoYHPMiVQKn5xRkyAYp4bkkSxRSZ9yXVsO/vHaKBwd0fCW6ZKo/QO 5MCYuYtLpOKa6fGtP7UxbHP47G5KvI+6bex4GE+Q0opnzUshCMjL05UYfCEIiFNlh1oa6MVyYXW qkW9EiUP9zhF8zbq6H+82W/mvElPZXmFC2v932IKIm0hEsI8/clONbVznvrGWNbH+w5z29i6UwO KU16fHIJ1KJzU9b7zZG/3lO5nMNRxYMMtL9ouHgYZ/wJJ86vR3K7U8hULgkrhCftnrkjJk1SYd0 M X-Received: by 2002:a2e:3810:: with SMTP id f16-v6mr6611370lja.77.1539711839175; Tue, 16 Oct 2018 10:43:59 -0700 (PDT) X-Received: by 2002:a2e:3810:: with SMTP id f16-v6mr6611335lja.77.1539711837950; Tue, 16 Oct 2018 10:43:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539711837; cv=none; d=google.com; s=arc-20160816; b=m+8NZm99IhKsFjByxqavd565xaBiCP5P1t3NYGJd3C0Q10jKUuXydz+s3xKKCc1lEj nx09y/dn7y0fhZmGvSIhusPyIHkDRo+wrd/e2vzvkXr74u740ToYxNCnf8IkeE/SxNl1 3i41bWWFq/rilJJSSvaXFXZCdutM+PuqJGjiWBMb3u8anFcFWpFuGWwBj6mGrOsIkeDu fTWdZ07ZWf9YXL8/QVrb7glUUdYl8gCqdiw/8FPsvjmpZrVLpQRQV15WnhialyuzM6b9 akNti5nyH3IDzbvcBeDNV41PfGoFKr91YlRz2oqWXg6nBBOrIty4Bth87Vp/aoeI99b9 qBvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=YdabV/sgKBvvccjjsOAMlvUJaP4/pMcygvoftqw2KQ8=; b=DYkselr2LeYv2vGXweVBHwr1ARX9Y6hnitNxFf8H50aOfZ83mSxjorwBoF+OsgVf6C Dx1mXMTQNphSSZek371hJ/hEiCSINtGSW/D7IwXN3T3yLm7xuQsPNeLyiJK9f7MPnakh CATk68zHX6GBN2Pjx/a4HYOFNkLEbmvXP/TYfPuRY7AP3qJKW/ACiSQgKh9YU//1cnYM v+aay56N+X5B8Prr/rhUkPVNTavwrOyIIsgrDiprm8fXG/LiL3kBTLooingA2AK4Sowi tLYuhTlWS5fBxR57Mk/xCowVK4PqvrKwBdb8vSjabKTzJLLNrGJrA/AMERvwYjs4IjUj 4Wyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WGlQ2pnu; spf=pass (google.com: domain of vovoy@chromium.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=vovoy@chromium.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id t30-v6sor6261386ljd.8.2018.10.16.10.43.57 for (Google Transport Security); Tue, 16 Oct 2018 10:43:57 -0700 (PDT) Received-SPF: pass (google.com: domain of vovoy@chromium.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WGlQ2pnu; spf=pass (google.com: domain of vovoy@chromium.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=vovoy@chromium.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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-Smtp-Source: ACcGV60n3KxRuwWbMx9TRgbL+ZmsufZC6eWQZjQ3HGgqZAlHY8MpzRj9CGcLzN+F8E4/xA7lRbyotQ== 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 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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(-)