Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8838139imu; Tue, 4 Dec 2018 15:18:06 -0800 (PST) X-Google-Smtp-Source: AFSGD/UA/ThTHMTlKqoNIeCqzJqNsOBOdmx2p+k1zmq/1PpekAze8whzhOWG3Ep+MnfvQ2uVW+gK X-Received: by 2002:a62:4549:: with SMTP id s70mr21820460pfa.233.1543965486160; Tue, 04 Dec 2018 15:18:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543965486; cv=none; d=google.com; s=arc-20160816; b=t5RlUqCCFkkANHA9a/IlXZTJbX/6e1XskXBDnzTvUqWen6ngFmEKyqNRye9OIBWGh2 9pnBcb09E4P8tfgdCXYlNqGtifw4ytTf4vr2rJaGqn+ug34pUBvwPtnbs7NPhr4Uujoh B66fv+fH/h9jLDmIFMRJbXzBuYdlJqoFNDj5dlij5CrB3qi22kgcocQsZ7xI2IC9h37N uWacMvbNVmedNgBJ0UWLN4/5BDLaGD7xiouWkXli4sg1HLA2XLwb9CHcLmGCyGcSBauJ OPUpTrzhtEfHdmSrvJBqUokHU+TZgVLIBVbH/1odD67fWMiYOOFaMJChNsyFzf3JqiwE 9Oaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=A29KmdTt+lp5bVgAPdrFsNjIIK/fkikcCotKfh2dHkM=; b=pA+1HFMD4UoQA4De1fh9FsKQk/KHCwqBWwgVKFj8osmeafqPX+XoSxJPb80soIE0aS Fab2f05m8MRS/F6BqDSHoNUecw2jlqNHUCym1ZHlxMAojR2C4BRltRfJPnqPg42ilgFa ECWxWKQRTM4mAQkUxfrxdbdFeXWkIKtUDsxzg8XCOiu3qNPEOteIS41y6FRuzYp1cVl1 asOuAAAq4ivR/S3LFabk0qQbQa93MKlVvJRelsZlOCaT2i6TWsqSMp1aVCcXXhd1uw/x w2bkv5YDfxsNFoKEXe40ifSrQ6bBB4M4/hEiPs1qws8qAeFLZN1An8R/8tS/g5s+nkxS ASKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b="AL3bRX/x"; 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 s36si18190416pld.46.2018.12.04.15.17.50; Tue, 04 Dec 2018 15:18:06 -0800 (PST) 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-2018-07-02 header.b="AL3bRX/x"; 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 S1726584AbeLDXQb (ORCPT + 99 others); Tue, 4 Dec 2018 18:16:31 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:52602 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725875AbeLDXQb (ORCPT ); Tue, 4 Dec 2018 18:16:31 -0500 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 wB4NDGYP175519; Tue, 4 Dec 2018 23:16:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : subject : message-id : mime-version : content-type; s=corp-2018-07-02; bh=A29KmdTt+lp5bVgAPdrFsNjIIK/fkikcCotKfh2dHkM=; b=AL3bRX/xrGMx3yL4wpHEEygCl97VWDFkLJs+5L9FmAsKXVmGHypd7lZx33NtrNk1tQ5+ exH3Wp3xruhce4vLQe9q+tMH7AK0jcNfNKcTUvSFeJuPKoxBj+P3M/PZ/quk3tI+aaRb iDXJtxbZ4q8P6WWhxnX+yXwC9mcn4IBI5RDllp+Z++A2gaiCakkUGcEyp1b5K/K6mbZE WVLth5QI1p8aXsAvTndKkQZ/E6qvk0KYSci9W88ZhPvHvHc/+SS5opEU60aifZXZ5IHl JM3gPha7q/LppfcD7DbaTpmWhV9lbWbNdgF01bIYyjYtNrzPQYdDEJw4DR8rUEQVeJyF 5A== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2p3jxrfapw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 04 Dec 2018 23:16:28 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id wB4NGRpb012724 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 4 Dec 2018 23:16:27 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wB4NGQK1008439; Tue, 4 Dec 2018 23:16:26 GMT Received: from ubuette (/75.80.107.76) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 04 Dec 2018 23:16:26 +0000 Date: Tue, 4 Dec 2018 15:16:24 -0800 From: Larry Bassel To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: RFC: revisiting shared page tables Message-ID: <20181204231623.GA19227@ubuette> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9097 signatures=668686 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-1810050000 definitions=main-1812040199 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In August 2005, Dave McCracken sent out a patch which implemented shared page tables (http://lkml.iu.edu/hypermail/linux/kernel/0508.3/1623.html) based on 2.6.13. He also wrote two OLS papers about the topic (https://landley.net/kdocs/ols/2003/ols2003-pages-315-320.pdf and https://www.landley.net/kdocs/ols/2006/ols2006v2-pages-125-130.pdf), the second of which was published after his patch submission. This patch was discussed for a few days. It was not accepted. There were several comments about technical issues (about a typo, some questions about locking, how to search the vmas, whether one must iterate through all of the vmas) which no doubt could be fixed, and in fact Dave indicated that he would eventually provide a revised patch which fixed these problems. AFAICT this never occurred. However, there were also questions about whether sharing page tables would provide any significant benefit. Specifically, there were concerns about whether the patch would improve performance at all (Dave indicated a 3% improvement on some "large benchmarks"), especially once another change (the test at at the beginning of copy_page_range() which prevents page table copies in some cases) was merged (d992895ba2, which has been in the kernel since 2.6.14). It was also suggested that the use of randomize_vm_space might also make shared page tables uninteresting, though that objection appeared to be addressed. Isn't Linux kernel archaeology fun :-) 13 years have elapsed. Given the many changes in the kernel since the original patch submission, I'd appreciate your insight into the following questions: * Is there (still?) a need for shared page tables (and if not, why not?). * If one were to resume work on this, is there any reason why one shouldn't start with Dave's 2.6.13 patch (plus fixes to the known bugs in it) and forward port it to the tip, rather than starting from scratch? Thanks. Larry Bassel