Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5512842imm; Tue, 16 Oct 2018 11:22:57 -0700 (PDT) X-Google-Smtp-Source: ACcGV608F9ymDJYiygDJKJfjuYpkl6Gv/+4e7RM/ZqSWjmU5Y+W1nUG39rDx/xsmTkPbzFaWVNnU X-Received: by 2002:a17:902:74c1:: with SMTP id f1-v6mr10791627plt.99.1539714177651; Tue, 16 Oct 2018 11:22:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539714177; cv=none; d=google.com; s=arc-20160816; b=Dmu6ctS5jdcy/GvY5kGuW+CKTi7YVAsT7dvKLRyJfLOUo+e/S7TG/9GuBN0tfB5wPD A64VnsEvVZIcQiOKhMI/JoFvoB60SByoNylFBPihit9XL/9ChJ4W9F7cP3w1yS0yB2/5 WQ06T1w4R8+7vdVkT3ZZaZdpty+n3SMJ1ZQkQEUDWK+FU8cSe4ykcnCGheCg8av62rSY oG5Lqs4C5o3D7OKodC8UNMaunqW39+5X5wPOT0rUNgk6shMqYrIp+jQRpPA1BMRq3fZg sdH6QvcKcar1yun0Htl8YXbfiGiuiLMNTh4vxgL+UMDk2+6YXfTbDJx7Xeldo8hcq4As /6JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=QbgMUMUqi+n1qo05QMEknTdnS8RII+XCU0ratSHiWjE=; b=0ITgzM29hkg2E9ehhJLYQ2baPXoCcmdI90mg+g4drr54ieLSb+oJLc8goL6H7q/rGl unRdc6ZrnDAsXMDwvAutd52E0OOnkdlFfWMhw0Fg+B1DSYGavEByC0kALdABKSyVv1RC TrdcvJIkXoGup0USBpqCTW4D2LxF7qH/RWeVtV3B3IKfcH9Z+S4tyPiAv8kftxJnL9VP 96afnex7avhUKY5ftU2J7M/vXZUCvRVQ5axHUjjQfrDCn4ZBGYHnx1DWZGgKOR80hKR4 yFYOFoGwZxELsGQKjdXV4ER8r91bRTXhCDHayFv7fDjfIq0ZK26RqFBtiDaeQL9vFsjs MzwA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e7-v6si14503086pls.366.2018.10.16.11.22.42; Tue, 16 Oct 2018 11:22:57 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727549AbeJQCNl (ORCPT + 99 others); Tue, 16 Oct 2018 22:13:41 -0400 Received: from mx2.suse.de ([195.135.220.15]:50924 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727032AbeJQCNl (ORCPT ); Tue, 16 Oct 2018 22:13:41 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5EC5CAE8F; Tue, 16 Oct 2018 18:21:58 +0000 (UTC) Date: Tue, 16 Oct 2018 20:21:55 +0200 From: Michal Hocko To: Kuo-Hsin Yang Cc: linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, linux-mm@kvack.org, 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 Subject: Re: [PATCH 2/2] drm/i915: Mark pinned shmemfs pages as unevictable Message-ID: <20181016182155.GW18839@dhcp22.suse.cz> References: <20181016174300.197906-1-vovoy@chromium.org> <20181016174300.197906-3-vovoy@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181016174300.197906-3-vovoy@chromium.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 17-10-18 01:43:00, Kuo-Hsin Yang wrote: > The i915 driver use shmemfs to allocate backing storage for gem objects. > These shmemfs pages can be pinned (increased ref count) by > shmem_read_mapping_page_gfp(). When a lot of pages are pinned, vmscan > wastes a lot of time scanning these pinned pages. Mark these pinned > pages as unevictable to speed up vmscan. I would squash the two patches into the single one. One more thing though. One more thing to be careful about here. Unless I miss something such a page is not migrateable so it shouldn't be allocated from a movable zone. Does mapping_gfp_constraint contains __GFP_MOVABLE? If yes, we want to drop it as well. Other than that the patch makes sense with my very limited knowlege of the i915 code of course. -- Michal Hocko SUSE Labs