Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5909397ybi; Wed, 31 Jul 2019 05:18:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxeGQFks6aq8VAymrTdkgOhkNErbOcbTyrEMF/+rkZ/d0zWlqIQIG2d68RPCfadY76ZHOwh X-Received: by 2002:a17:902:82c4:: with SMTP id u4mr120277582plz.196.1564575498154; Wed, 31 Jul 2019 05:18:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564575498; cv=none; d=google.com; s=arc-20160816; b=ay4VWXznXYPO/b3Xn1YDCibhsy02aZKzlvEv1/RMNmiiuu1kOz/f234sPo3cpAJkuk Ml8mIIzHr1Qf+5n0KwHqSAHx+1xrRqIVlkbuZ26b64Ob5pS5OBFKbdt4U/61VgWjwATz TTBVHmucKfTe2EG6rhxVOFFihj6YWm1ARYV39aAbWHu7jbk6fxotsIv2YbR+299kAnZd e2/KUkhj0GL/yMdalIcNIklPrZQSOCpE52RxYB6OwSG6tfWdRi8GthvaJckVfoRgAaEX 9jIa9NmPKAuRcPjP6/1urYqCpDo/c30fYDY3+74VQ99UG2BgbkVBrrwbKCkv+GxgPsAp RpzQ== 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=CI+QmzpkJLk1Ebh5TR+N3+Bd4lL0dav5jMnhJ+GA7Xg=; b=bqCyc+hTaDCKLFf/2b6VleSMoNqZdXnl/RYEcSKVCBhOhYRh4X+Ycgxojo7H5khCpA gpf8m7opsAi1JjV8cckQXqqHWCEY5XcjMiWCyZi/iBQ9wVi5zqlBXMhWknsdbVUiL2fV e8f9ReQ4HFMZkNE5FHFiNy0xf8Lr6lKasPSUf7m+oPieBx1F/jVaXl8vTMjdNlL3KAtt ijAa4ubZF5aMgpXiey77344OF0n7pWLiUmrk0a6KZm6onx8Bz3qig6qjp4QvZ9cx3rHE 8LRwXeUaeITmf9csqyIF5J8QVyYx+6+trEvex/ZT3PtRXJKLUweLbvOUelMHU3tkJ6iR 4npA== 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 i186si33847826pge.9.2019.07.31.05.18.03; Wed, 31 Jul 2019 05:18:18 -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 S1727986AbfGaKWF (ORCPT + 99 others); Wed, 31 Jul 2019 06:22:05 -0400 Received: from mail104.syd.optusnet.com.au ([211.29.132.246]:39918 "EHLO mail104.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726666AbfGaKWF (ORCPT ); Wed, 31 Jul 2019 06:22:05 -0400 Received: from dread.disaster.area (pa49-195-139-63.pa.nsw.optusnet.com.au [49.195.139.63]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id E23D943E0B2; Wed, 31 Jul 2019 20:22:00 +1000 (AEST) Received: from dave by dread.disaster.area with local (Exim 4.92) (envelope-from ) id 1hslj3-0005u5-Se; Wed, 31 Jul 2019 20:20:53 +1000 Date: Wed, 31 Jul 2019 20:20:53 +1000 From: Dave Chinner To: William Kucharski Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Dave Hansen , Song Liu , Bob Kasten , Mike Kravetz , Chad Mynhier , "Kirill A. Shutemov" , Johannes Weiner , Matthew Wilcox Subject: Re: [PATCH v3 0/2] mm,thp: Add filemap_huge_fault() for THP Message-ID: <20190731102053.GZ7689@dread.disaster.area> References: <20190731082513.16957-1-william.kucharski@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190731082513.16957-1-william.kucharski@oracle.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=D+Q3ErZj c=1 sm=1 tr=0 cx=a_idp_d a=fNT+DnnR6FjB+3sUuX8HHA==:117 a=fNT+DnnR6FjB+3sUuX8HHA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=0o9FgrsRnhwA:10 a=7-415B0cAAAA:8 a=BDTIUSf9NILoYbXAtJgA:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 31, 2019 at 02:25:11AM -0600, William Kucharski wrote: > This set of patches is the first step towards a mechanism for automatically > mapping read-only text areas of appropriate size and alignment to THPs > whenever possible. > > For now, the central routine, filemap_huge_fault(), amd various support > routines are only included if the experimental kernel configuration option > > RO_EXEC_FILEMAP_HUGE_FAULT_THP > > is enabled. > > This is because filemap_huge_fault() is dependent upon the > address_space_operations vector readpage() pointing to a routine that will > read and fill an entire large page at a time without poulluting the page > cache with PAGESIZE entries How is the readpage code supposed to stuff a THP page into a bio? i.e. Do bio's support huge pages, and if not, what is needed to stuff a huge page in a bio chain? Once you can answer that question, you should be able to easily convert the iomap_readpage/iomap_readpage_actor code to support THP pages without having to care about much else as iomap_readpage() is already coded in a way that will iterate IO over the entire THP for you.... Cheers, Dave. -- Dave Chinner david@fromorbit.com