Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp7138877ybh; Thu, 8 Aug 2019 10:45:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqwCSzWO9Ikitjb/sBkJApS7Hood5eaQ6cXxOIVvrAUxRJEXHlE2Tye+yKPm3bPvblrrtRwN X-Received: by 2002:a62:5c3:: with SMTP id 186mr16785081pff.144.1565286316171; Thu, 08 Aug 2019 10:45:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565286316; cv=none; d=google.com; s=arc-20160816; b=IZNK8HH6w2LD0GCt28ZHXRs6uJ5QoKZmN1lHApDcSHHDe1SxyrPnTvMOKQoLAZsdyC D7WZZVzrKBMyrg4YqzkKL2SvoB/kiECOgQ335kD3gIGvzd4uinJhUkSnpw0e33YR6KjN du7ezLdyIcbJLd97wKOXE37t+YVQ625VDXIXZ33gDs8Im6s+P/7FTA2ZyvpB+BOiLU/Y K7DRBE6GygmwQV2lztoJbwiFtvrUlStqVrWagpzsdVE5vuG2rLL89GGuhwlcnD7btcmO C8EbNVnnMP840E67oDtCNZZM4sH/O0HKFE2Q44IZfO4XeUzdIT9vUp0165MaL0sqtrKi TePA== 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; bh=3H0d/kzd67RlSllwbRNaJrWWQPs/SK9hRg6WE3dnLrg=; b=cjb/gDyy1nQiEYuhnWFLxc+SFFek7352DSlnVnfde1QiEM5yRSSt4XY0B2OrXccFta 7tCYZjLe3ZFRwjPGuR8mJmiN/b2jBCF5DIXOHWAzfKk3TW+nmCrLI4KbAxp/WMs8HK2G xV+UdzXNXeDTu4hqrLYQJmdk0e5sdtunXYdC99BiHy7EmyaO9zovlgLwfeoDZohCgObr YR9gcQdEtbJ4puZyRm2yG2sfgmfrICGLoiZbw6eJvCZv1NTexu/aNnkGeesC5M6AlNJh IlLGUGrihDYBKnE9HxD/oFYai0eUBAL5els8wq4nXw1Ec4HahtYDVctp1ZIdDeg5b8yU 4DoA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i8si15623730pfr.97.2019.08.08.10.45.00; Thu, 08 Aug 2019 10:45:16 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404299AbfHHRWy (ORCPT + 99 others); Thu, 8 Aug 2019 13:22:54 -0400 Received: from mail.fireflyinternet.com ([109.228.58.192]:52462 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2404293AbfHHRWx (ORCPT ); Thu, 8 Aug 2019 13:22:53 -0400 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 17934224-1500050 for multiple; Thu, 08 Aug 2019 18:22:27 +0100 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Wilson , Sergey Senozhatsky , Sedat Dilek , Hugh Dickins , Matthew Auld , Al Viro Subject: [PATCH] drm/i915: Stop reconfiguring our shmemfs mountpoint Date: Thu, 8 Aug 2019 18:22:26 +0100 Message-Id: <20190808172226.18306-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.23.0.rc1 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 The filesystem reconfigure API is undergoing a transition, breaking our current code. As we only set the default options, we can simply remove the call to s_op->remount_fs(). In the future, when HW permits, we can try re-enabling huge page support, albeit as suggested with new per-file controls. Reported-by: Sergey Senozhatsky Reported-by: Sedat Dilek Suggested-by: Hugh Dickins Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Hugh Dickins Cc: Al Viro Cc: Sergey Senozhatsky --- drivers/gpu/drm/i915/gem/i915_gemfs.c | 31 ++++++++------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gemfs.c b/drivers/gpu/drm/i915/gem/i915_gemfs.c index 099f3397aada..be94598cb304 100644 --- a/drivers/gpu/drm/i915/gem/i915_gemfs.c +++ b/drivers/gpu/drm/i915/gem/i915_gemfs.c @@ -20,31 +20,18 @@ int i915_gemfs_init(struct drm_i915_private *i915) if (!type) return -ENODEV; - gemfs = kern_mount(type); - if (IS_ERR(gemfs)) - return PTR_ERR(gemfs); - /* - * Enable huge-pages for objects that are at least HPAGE_PMD_SIZE, most - * likely 2M. Note that within_size may overallocate huge-pages, if say - * we allocate an object of size 2M + 4K, we may get 2M + 2M, but under - * memory pressure shmem should split any huge-pages which can be - * shrunk. + * By creating our own shmemfs mountpoint, we can pass in + * mount flags that better match our usecase. + * + * One example, although it is probably better with a per-file + * control, is selecting huge page allocations ("huge=within"). + * Currently unused due to bandwidth issues (slow reads) on Broadwell+. */ - if (has_transparent_hugepage()) { - struct super_block *sb = gemfs->mnt_sb; - /* FIXME: Disabled until we get W/A for read BW issue. */ - char options[] = "huge=never"; - int flags = 0; - int err; - - err = sb->s_op->remount_fs(sb, &flags, options); - if (err) { - kern_unmount(gemfs); - return err; - } - } + gemfs = kern_mount(type); + if (IS_ERR(gemfs)) + return PTR_ERR(gemfs); i915->mm.gemfs = gemfs; -- 2.23.0.rc1