Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp1088500ima; Fri, 1 Feb 2019 16:17:40 -0800 (PST) X-Google-Smtp-Source: AHgI3IY8IH/NqZizawrj2bnp5khZMKXhQAf9asdw0ORG8isZGMUf1RSdyw4atXiDWGVcmHMIYrP1 X-Received: by 2002:a63:da14:: with SMTP id c20mr4172077pgh.233.1549066660048; Fri, 01 Feb 2019 16:17:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549066660; cv=none; d=google.com; s=arc-20160816; b=piBR+ZkBkLvXRXkL6s7W+Dy3HqMbQ8mDzQyT+sIDAceR7b3J2d4pogeXu4+pOQpMkA CEvlhLo4REXi5F+w8edCltCmqjsECvxZONGNGGluibt2AtKp3JpSBcTghPSiAFUTOG60 /IWSocpeZLPIrNkLgpVSNKvdiyg9w3OXYmGpsAAf22Y03tK2SlSMkNZU7DNFkfzEXlxr smWry7ZDZqIELhsdVK5hgVo3mmkkJPtZkyOz1W7qdW91NAb0/a17iwZu6eoNgGjKuJg9 SY9RW+Nc/d6VOi2j54inPskTcxl6CtiUZc+WFSaOwtvm/i9o6rcE52MTDYM6stEKIa3B fPSw== 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=54T7pBveelr5wNuB4Y0kmlu7knWA/DulFqZRo8RUA88=; b=WAbb9ATeOkgd+Z1pD7P+GgVaOZO8l1to9RIys70jC5Ge2oGDKk8imDO4TeUtcIYidn sIM+SmtFYujqfHm07Gq58ERiyCkAqLDNIBMMsFvVNMEAMSOV9JTH5XEgQvOKm5ZCcrWS 4mru/GdAayWJihU/92UmU/PB4o6DOxBD101VusxdVeG7LmZ8g3kBafKMkSRIeLWI8Cc6 YgGlTNKZ66WJuvVFX7w6UBWqsxcOBYf+4L2Vn9c8tIvDSTQifpRABD4a96zP3Ru2BI7I /amZceKvz+LDu0l+tyu+j2AlpVq3dBJ+Ik5oH20qYdQ7wsXr7KV7taOgBstnGEz8LlGt 0hJw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e8si8520565pgn.325.2019.02.01.16.17.24; Fri, 01 Feb 2019 16:17:40 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727276AbfBBAOj (ORCPT + 99 others); Fri, 1 Feb 2019 19:14:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59956 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726742AbfBBAOj (ORCPT ); Fri, 1 Feb 2019 19:14:39 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AD52C432C0; Sat, 2 Feb 2019 00:14:38 +0000 (UTC) Received: from sky.random (ovpn-121-14.rdu2.redhat.com [10.10.121.14]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D6FAB1C929; Sat, 2 Feb 2019 00:14:33 +0000 (UTC) Date: Fri, 1 Feb 2019 19:14:33 -0500 From: Andrea Arcangeli To: jglisse@redhat.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Peter Xu , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andrew Morton , Matthew Wilcox , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Michal Hocko , kvm@vger.kernel.org Subject: Re: [RFC PATCH 0/4] Restore change_pte optimization to its former glory Message-ID: <20190202001433.GB12463@redhat.com> References: <20190131183706.20980-1-jglisse@redhat.com> <20190201235738.GA12463@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190201235738.GA12463@redhat.com> User-Agent: Mutt/1.11.2 (2019-01-07) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Sat, 02 Feb 2019 00:14:38 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 01, 2019 at 06:57:38PM -0500, Andrea Arcangeli wrote: > If it's cleared with ptep_clear_flush_notify, change_pte still won't > work. The above text needs updating with > "ptep_clear_flush". set_pte_at_notify is all about having > ptep_clear_flush only before it or it's the same as having a range > invalidate preceding it. > > With regard to the code, wp_page_copy() needs > s/ptep_clear_flush_notify/ptep_clear_flush/ before set_pte_at_notify. Oops, the above two statements were incorrect because ptep_clear_flush_notify doesn't interfere with change_pte and will only invalidate secondary MMU mappings on those secondary MMUs that shares the same pagetables with the primary MMU and that in turn won't ever implement a change_pte method.