Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp698055pxb; Fri, 8 Jan 2021 16:15:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJyueFXEdRUueUnAceXwwH04cXowVXNfITSVK49cSg3zw97RmFjntdhGXsGxL8HkQ8rCy3p5 X-Received: by 2002:a17:906:d93c:: with SMTP id rn28mr4157314ejb.50.1610151325720; Fri, 08 Jan 2021 16:15:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610151325; cv=none; d=google.com; s=arc-20160816; b=TbZh0Dkk4FG+MMbkQcpiSfm6HSJdz/c/jBNQfQUC6IMuanCmQVQpEi6XK4/4wlK9mt nJmpNEg2/N1bq2zXbs2TYlFWeEndhUEgK0AqWP165dajxiPlmN1LzKKNOX5MA9VOqkPg 8E3Yu44iyZhDA857GVRsOAfjrUZ6IPaw3amGvXwpRtBHT4V/ZUw7L/8bH0byBhGZxI5t t4uCDqveluvMebnfnmjjn9rXq+wvAEa6gTLqzWs0wXP+ozooEuWy41QbWh8J9oStidOQ SVcNDMrZfsOc/4ea5d/YrrgPOH/Oim5s2rEAroyV3TIjkO+zqIF/UdVlwVQXp09NmWtS oZYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=jKnh5xCWvdcIBiM80ZPoOS0n6cGnYUS+u8z0WaCqbyk=; b=caPacMl7eB2QB566lyBK0MNvb0WVGwyRnh5kMx2CizssQPAR/ZAJZWrRszzEK+zeSs ZSFqmcx+Eu53kEx6qVMMzVr7iPlOlm//d+U+a1frwd8u6uzHT4Cu6Rc6Q5dsrqa0uV/W SUfHA9Hlnx3LA7puKsD9GnpShykKkGandv1n42WGMPSLR0GchNoHMbiC2pT8N5E9zSVh 7nwqXG2PRyiu/HZKGRa8FOL0MQjIRGn/DqyQKviiXpTAs6ptME0OoGhkOSS4GfOt92rH +ZwhCQuPv5XvbzvvlVToV3NeXBiEt9QOxK8BYxPT6gEgXJ+TrKbqjgfE7vdOB61wDYdF viZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Z/YhO7lz"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hp39si3912441ejc.214.2021.01.08.16.15.00; Fri, 08 Jan 2021 16:15:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Z/YhO7lz"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725844AbhAIAOJ (ORCPT + 99 others); Fri, 8 Jan 2021 19:14:09 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:53602 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725306AbhAIAOJ (ORCPT ); Fri, 8 Jan 2021 19:14:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610151162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jKnh5xCWvdcIBiM80ZPoOS0n6cGnYUS+u8z0WaCqbyk=; b=Z/YhO7lzlv2PYBY5jtKJkLgdH/+JdewRqKrep9SaAkIJn/2nlOrLQx3isqNLmo5GJXGpJr cgbeXjklPtI6YUkmPTzIOEl576G4OwwyHwibocs3jTzKC5mPNIom7Q0143k+DbLCs6I3I1 PNg6iCOFKhndea7dYa2xrmJVnpGXZAY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-439-uWXeXsrgMhaIdF5vSYJ15Q-1; Fri, 08 Jan 2021 19:12:39 -0500 X-MC-Unique: uWXeXsrgMhaIdF5vSYJ15Q-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B236A10054FF; Sat, 9 Jan 2021 00:12:35 +0000 (UTC) Received: from mail (ovpn-112-222.rdu2.redhat.com [10.10.112.222]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 94AE360BF3; Sat, 9 Jan 2021 00:12:29 +0000 (UTC) Date: Fri, 8 Jan 2021 19:12:28 -0500 From: Andrea Arcangeli To: Linus Torvalds Cc: Will Deacon , Linux-MM , Linux Kernel Mailing List , Yu Zhao , Andy Lutomirski , Peter Xu , Pavel Emelyanov , Mike Kravetz , Mike Rapoport , Minchan Kim , Peter Zijlstra , Hugh Dickins , "Kirill A. Shutemov" , Matthew Wilcox , Oleg Nesterov , Jann Horn , Kees Cook , John Hubbard , Leon Romanovsky , Jason Gunthorpe , Jan Kara , Kirill Tkhai , Nadav Amit , Andrew Morton Subject: Re: [PATCH 2/2] mm: soft_dirty: userfaultfd: introduce wrprotect_tlb_flush_pending Message-ID: References: <20210108124815.GA4512@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.4 (2020-12-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 08, 2021 at 11:25:21AM -0800, Linus Torvalds wrote: > On Fri, Jan 8, 2021 at 9:53 AM Andrea Arcangeli wrote: > > > > Do you intend to eventually fix the zygote vmsplice case or not? > > Because in current upstream it's not fixed currently using the > > enterprise default config. > > Is this the hugepage case? Neither of your patches actually touched > that, so I've forgotten the details. The two patches only fixed the TLB flushing deferral in clear_refs and uffd-wp. So I didn't actually try to fix the hugepage case by adding the page_count checks there too. I could try to do that at least it'd be consistent but I still would try to find an alternate solution later. > > Irrelevant special case as in: long term GUP pin on the memory? > > Irrelevant special case in that > > (a) an extra COW shouldn't be a correctness issue unless somebody > does something horribly wrong (and obviously the code that hasn't > taken the mmap_lock for writing are then examples of that) > > and > > (b) it's not a performance issue either unless you can find a real > load that does it. > > Hmm? For b) I don't have an hard time to imagine `ps` hanging for seconds, if clear_refs is touched on a 4T mm, but b) is not the main concern. Having to rely on a) is the main concern and it's not about tlb flushes but the long term GUP pins. Thanks, Andrea