Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3361332imm; Thu, 17 May 2018 07:36:33 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrkXHTNABai2NUuB8ZIeRs58H+5puUhjvu5ckF11MLWf2jGOh87DyHQvEUc1fGthYkS7si+ X-Received: by 2002:a65:634c:: with SMTP id p12-v6mr4329412pgv.421.1526567793866; Thu, 17 May 2018 07:36:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526567793; cv=none; d=google.com; s=arc-20160816; b=ybm/BeBZah2DIhnb1aN1RMy0BoyvbfFzwTKPS8zCEy+RuTVGcW2FHyG/X8EzVBBId1 A/0THqEoojM3tCYQ8j32GIIqMZ8QaBnezn68X4oAT+YBbuOEZvuBR5fRL+cXJKzBX8O/ ss+32zH3VJ7OuRBXjpTsONb/x8Vm93A/ZGQUf0ngNFV9QbhISERK1LMU5vOWqSn43DEP H3m21Q9n3jiTrNbrWrQ//77RlK1loUKsu8VhH/b5hVFNahV24yhGFsHXz3qHc31BfE8e P4RgqlwXEePQqniHFbk1RYjPjdAkDz3IReh942jjxIdPd5kA49vjivO8gXAIdH/9DW0V QlOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature:arc-authentication-results; bh=iH35pia0qTGQqHSiZbAut7ElqOux4pTOOqXPBUWGAog=; b=ZmNzoB6MBp3fm4/K3zbPFSmyuBTxvSYagZza5m1ks5EBDUHRYWcputdFkWhdELjmBa wpIb1GXcIFr+mYlIVZ2htDUdzw+sOWTvvDpDd6ZUvQXxz0lnhnD4tMxU84mWygrpxMYo AeXk+Mok74rZifR1OfPqKhGdA3VlfQTSXdJ34BtDfuJhtG/Z/Vsqg5oiTCpTrTvu+QNt hcB2VaEwL6Ue8mmbSYymHqd1435MV7LLF8KuMayOqArfOWIvF/ZsgYGzAv0VCd6FzYSn /gWNxrJ50YsrO2GFn+AIwhgqNUdCFKsG21knhZAzs0JTFuHCpJZyepYTRCp2udSvNNMB d8nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=P5b4ra1i; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q127-v6si4138668pga.71.2018.05.17.07.36.19; Thu, 17 May 2018 07:36:33 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=P5b4ra1i; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752454AbeEQOfH (ORCPT + 99 others); Thu, 17 May 2018 10:35:07 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:37814 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752398AbeEQOfE (ORCPT ); Thu, 17 May 2018 10:35:04 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w4HEUcSl019908; Thu, 17 May 2018 14:34:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=content-type : mime-version : subject : from : in-reply-to : date : cc : content-transfer-encoding : message-id : references : to; s=corp-2017-10-26; bh=iH35pia0qTGQqHSiZbAut7ElqOux4pTOOqXPBUWGAog=; b=P5b4ra1indtYWLdExDxMrrObSSR5VaqWdUj3ABOsWX1kzy0FmE2NRHbyA5OOa9prc3rJ Vv1aWy+PAofw9sIrkfkeRYiKGvf6sNjQn1l9Zdl8veC+w+j4YWjIbdKekSIwIcw08pfY vly5yKmxwHCQmzKbcPDASl1CALaPjrKC5WkXEOPE6fz82TEKm9l6ol0MsnuGi/5bvQ0U si+SjPk+weFUvP9IVvIO/f9Yp6T8C8bCR5gkhyNijakfR9BsC/L6nM+2MUtAFYju3jW0 XqNBwHMffAlpJ1byBrx9KtRnEQnmno4C+Y+LpFU/IeDXD8j8U4XnreQ4AZIRLvGMncYd WQ== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2hx29w9frb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 17 May 2018 14:34:59 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w4HEYwuM014515 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 17 May 2018 14:34:59 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w4HEYw6f014469; Thu, 17 May 2018 14:34:58 GMT Received: from [192.168.0.110] (/71.205.38.130) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 17 May 2018 07:34:58 -0700 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: [RFC] mm, THP: Map read-only text segments using large THP pages From: William Kucharski In-Reply-To: <20180517075740.GA31969@dhcp22.suse.cz> Date: Thu, 17 May 2018 08:34:56 -0600 Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, "Kirill A. Shutemov" , linux-fsdevel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: <59D5F452-4710-4CE9-9072-E587551D4862@oracle.com> References: <5BB682E1-DD52-4AA9-83E9-DEF091E0C709@oracle.com> <20180517075740.GA31969@dhcp22.suse.cz> To: Michal Hocko X-Mailer: Apple Mail (2.3445.8.2) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8895 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805170134 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On May 17, 2018, at 1:57 AM, Michal Hocko wrote: >=20 > [CCing Kirill and fs-devel] >=20 > On Mon 14-05-18 07:12:13, William Kucharski wrote: >> One of the downsides of THP as currently implemented is that it only = supports >> large page mappings for anonymous pages. >=20 > There is a support for shmem merged already. ext4 was next on the plan > AFAIR but I haven't seen any patches and Kirill was busy with other > stuff IIRC. I couldn't find anything that would specifically map text pages with = large pages, so perhaps this could be integrated with that or I may have simply = missed changes that would ultimately provide that functionality. >=20 >> I embarked upon this prototype on the theory that it would be = advantageous to=20 >> be able to map large ranges of read-only text pages using THP as = well. >=20 > Can the fs really support THP only for read mappings? What if those > pages are to be shared in a writable mapping as well? In other words > can this all work without a full THP support for a particular fs? The integration with the page cache would indeed require filesystem = support. The end result I'd like to see is full R/W support for large THP pages; = I thought the RO text mapping proof of concept worthwhile to see what kind = of results we might see and what the thoughts of the community were. Thanks for the feedback. -- Bill=