Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp3071361ybh; Mon, 5 Aug 2019 11:31:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0tJBqWjzCAyxcRf0NsK3Z1ojFRpfJt76eVOZtXKgy0U3ydh94cORwXi/hifr1bD/4z8wb X-Received: by 2002:a17:902:42a5:: with SMTP id h34mr150160348pld.16.1565029864724; Mon, 05 Aug 2019 11:31:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565029864; cv=none; d=google.com; s=arc-20160816; b=CYJBoC6gDWenm0/HLm7Dptd5ApWGNaQSuZaZwzMFN77o0ElKCZlsNy8bQsgVHTsajv jm1umPEywRD3XYJTb97jXcIABa9M3Ils/JieVJaaGsk2wAfLae4wYYf6c08zCI102b0j 1exoJGr5KaoO1KeCTO7eJUhJYwp5aMxQDv1K5kTGQMgCfkFnEEvVzysIuLoeLJDbzUUO Unmy1VNuuLgeOyKJdfoOIZKpvdU3cn4dBr3H/3quMFK+yEkWgWA7MmYmEtG5d7bJTPnG rSNK5xdweoaENAol7pl7AJl9zqSxpqgnJh2u0qoYu14FR34Bhstp5CTvvGZpzGEdKlKB jZsA== 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=gU7KLNIVq6ifgcXEidzAHDMZhJYgbqMNP+m5NflZnlw=; b=QJ6X0UrDE83DT2B4j9LcQf3hw0ul4I0qWYdwfq2V8DGxHGTrXL0kN1gZDZXpjxSevP nDcJg1ZnO93f/J9CijlVEsKsmS2ITiME5C0J8mttfZdZnPSl8+akJcN8OnWj9lYR3zRr 7nt9adj17ogH9oLcFXTVdTRSO/eiFvQRgB/zgYHnumAgVWw6y8wOKPVU2cTTGS4a84tO Zl/TAD0SlIGQZDktZ92XQw774Os8wPtuYixx9aLBEred5NVlmy8987gLAFw8+TcKq2kx Uhbz3I1adBMnS4SInaNmNi/+Vw1fRFZ6RLL/4r/FMtQ25PWCcWDr474UhJYjqYbG5C1L 6jJg== 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 t143si17435147pgb.542.2019.08.05.11.30.48; Mon, 05 Aug 2019 11:31:04 -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 S1730195AbfHES2p (ORCPT + 99 others); Mon, 5 Aug 2019 14:28:45 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:40246 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727802AbfHES2p (ORCPT ); Mon, 5 Aug 2019 14:28:45 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1huhik-00088X-Fk; Mon, 05 Aug 2019 18:28:34 +0000 Date: Mon, 5 Aug 2019 19:28:34 +0100 From: Al Viro To: Sergey Senozhatsky Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Chris Wilson , David Howells , Christoph Hellwig , David Airlie , Daniel Vetter , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Hugh Dickins Subject: Re: [PATCHv2 2/3] i915: convert to new mount API Message-ID: <20190805182834.GI1131@ZenIV.linux.org.uk> References: <20190805160307.5418-1-sergey.senozhatsky@gmail.com> <20190805160307.5418-3-sergey.senozhatsky@gmail.com> <20190805181255.GH1131@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190805181255.GH1131@ZenIV.linux.org.uk> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 05, 2019 at 07:12:55PM +0100, Al Viro wrote: > On Tue, Aug 06, 2019 at 01:03:06AM +0900, Sergey Senozhatsky wrote: > > tmpfs does not set ->remount_fs() anymore and its users need > > to be converted to new mount API. > > Could you explain why the devil do you bother with remount at all? > Why not pass the right options when mounting the damn thing? ... and while we are at it, I really wonder what's going on with that gemfs thing - among the other things, this is the only user of shmem_file_setup_with_mnt(). Sure, you want your own options, but that brings another question - is there any reason for having the huge=... per-superblock rather than per-file? After all, the readers of ->huge in mm/shmem.c are mm/shmem.c:582: (shmem_huge == SHMEM_HUGE_FORCE || sbinfo->huge) && is_huge_enabled(), sbinfo is an explicit argument mm/shmem.c:1799: switch (sbinfo->huge) { shmem_getpage_gfp(), sbinfo comes from inode mm/shmem.c:2113: if (SHMEM_SB(sb)->huge == SHMEM_HUGE_NEVER) shmem_get_unmapped_area(), sb comes from file mm/shmem.c:3531: if (sbinfo->huge) mm/shmem.c:3532: seq_printf(seq, ",huge=%s", shmem_format_huge(sbinfo->huge)); ->show_options() mm/shmem.c:3880: switch (sbinfo->huge) { shmem_huge_enabled(), sbinfo comes from an inode And the only caller of is_huge_enabled() is shmem_getattr(), with sbinfo picked from inode. So is there any reason why the hugepage policy can't be per-file, with the current being overridable default?