Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915: Stop reconfiguring our shmemfs mountpoint

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 <sergey.senozhatsky@gmail.com>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Suggested-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190808172226.18306-1-chris@chris-wilson.co.uk

+9 -22
+9 -22
drivers/gpu/drm/i915/gem/i915_gemfs.c
··· 20 20 if (!type) 21 21 return -ENODEV; 22 22 23 + /* 24 + * By creating our own shmemfs mountpoint, we can pass in 25 + * mount flags that better match our usecase. 26 + * 27 + * One example, although it is probably better with a per-file 28 + * control, is selecting huge page allocations ("huge=within_size"). 29 + * Currently unused due to bandwidth issues (slow reads) on Broadwell+. 30 + */ 31 + 23 32 gemfs = kern_mount(type); 24 33 if (IS_ERR(gemfs)) 25 34 return PTR_ERR(gemfs); 26 - 27 - /* 28 - * Enable huge-pages for objects that are at least HPAGE_PMD_SIZE, most 29 - * likely 2M. Note that within_size may overallocate huge-pages, if say 30 - * we allocate an object of size 2M + 4K, we may get 2M + 2M, but under 31 - * memory pressure shmem should split any huge-pages which can be 32 - * shrunk. 33 - */ 34 - 35 - if (has_transparent_hugepage()) { 36 - struct super_block *sb = gemfs->mnt_sb; 37 - /* FIXME: Disabled until we get W/A for read BW issue. */ 38 - char options[] = "huge=never"; 39 - int flags = 0; 40 - int err; 41 - 42 - err = sb->s_op->remount_fs(sb, &flags, options); 43 - if (err) { 44 - kern_unmount(gemfs); 45 - return err; 46 - } 47 - } 48 35 49 36 i915->mm.gemfs = gemfs; 50 37