From: "Kirill A. Shutemov" Subject: Re: [PATCH 06/17] mm/shmem: expose driver overridable huge option Date: Tue, 16 May 2017 13:02:06 +0300 Message-ID: <20170516100206.f6rtpl2uv3whemkp@node.shutemov.name> References: <20170516082948.28090-1-matthew.auld@intel.com> <20170516082948.28090-7-matthew.auld@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20170516082948.28090-7-matthew.auld@intel.com> Sender: owner-linux-mm@kvack.org To: Matthew Auld Cc: intel-gfx@lists.freedesktop.org, Joonas Lahtinen , Dave Hansen , Daniel Vetter , Hugh Dickins , linux-mm@kvack.org List-Id: intel-gfx@lists.freedesktop.org On Tue, May 16, 2017 at 09:29:37AM +0100, Matthew Auld wrote: > In i915 we are aiming to support huge GTT pages for the GPU, and to > complement this we also want to enable THP for our shmem backed objects. > Even though THP is supported in shmemfs it can only be enabled through > the huge= mount option, but for users of the kernel mounted shm_mnt like > i915, we are a little stuck. There is the sysfs knob shmem_enabled to > either forcefully enable/disable the feature, but that seems to only be > useful for testing purposes. What we propose is to expose a driver > overridable huge option as part of shmem_inode_info to control the use > of THP for a given mapping. I don't like this. It's kinda hacky. Is there a reason why i915 cannot mount a new tmpfs for own use? Or other option would be to change default to SHMEM_HUGE_ADVISE and wire up fadvise handle to control per-file allocation policy. -- Kirill A. Shutemov -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org