From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46D2FC433DB for ; Tue, 5 Jan 2021 18:21:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E25B822D5B for ; Tue, 5 Jan 2021 18:21:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E25B822D5B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 099F58D0091; Tue, 5 Jan 2021 13:21:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 021FE8D0092; Tue, 5 Jan 2021 13:21:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E1C948D0091; Tue, 5 Jan 2021 13:21:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0222.hostedemail.com [216.40.44.222]) by kanga.kvack.org (Postfix) with ESMTP id C6CE78D006E for ; Tue, 5 Jan 2021 13:21:04 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 8C3B7181AEF07 for ; Tue, 5 Jan 2021 18:21:04 +0000 (UTC) X-FDA: 77672538048.13.kick28_4b03237274db Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id 6C17818140B60 for ; Tue, 5 Jan 2021 18:21:04 +0000 (UTC) X-HE-Tag: kick28_4b03237274db X-Filterd-Recvd-Size: 3414 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Tue, 5 Jan 2021 18:21:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609870863; 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=wOGZ4SXcv5XhB1eUlHk/uUKIqAYwbBMmvsDuvaV4E7Q=; b=Srmyal459ivFESlmtZ4SmW6heNARDnpMZbk5nsXscBHW4Sl/Zdw6hIe59xgFlEfr0bu4qD L2fJMgKv3ioEdKbUF3P8lb1KEKUg+VQ7sroy3spVmXs4yimhTZCKFCZIF+iv7Ag35DChV3 UHaV5rp5BimL9QtJR7yYG1E74uI+6co= 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-442-tynonjhpMzquqVP_ui9CGA-1; Tue, 05 Jan 2021 13:21:01 -0500 X-MC-Unique: tynonjhpMzquqVP_ui9CGA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9AC0580F044; Tue, 5 Jan 2021 18:20:59 +0000 (UTC) Received: from mail (ovpn-112-76.rdu2.redhat.com [10.10.112.76]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 36B7B5D9DD; Tue, 5 Jan 2021 18:20:56 +0000 (UTC) Date: Tue, 5 Jan 2021 13:20:55 -0500 From: Andrea Arcangeli To: Nadav Amit Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Nadav Amit , Yu Zhao , Andy Lutomirski , Peter Xu , Pavel Emelyanov , Mike Kravetz , Mike Rapoport , Minchan Kim , Will Deacon , Peter Zijlstra Subject: Re: [RFC PATCH v2 2/2] fs/task_mmu: acquire mmap_lock for write on soft-dirty cleanup Message-ID: References: <20201225092529.3228466-1-namit@vmware.com> <20201225092529.3228466-3-namit@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201225092529.3228466-3-namit@vmware.com> User-Agent: Mutt/2.0.4 (2020-12-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Dec 25, 2020 at 01:25:29AM -0800, Nadav Amit wrote: > Fixes: 0f8975ec4db2 ("mm: soft-dirty bits for user memory changes tracking") Targeting a backport down to 2013 when nothing could wrong in practice with page_mapcount sounds backwards and unnecessarily risky. In theory it was already broken and in theory 09854ba94c6aad7886996bfbee2530b3d8a7f4f4 is absolutely perfect and the previous code of 2013 is completely wrong, but in practice the code from 2013 worked perfectly until Aug 21 2020. Since nothing at all could go wrong in soft dirty and uffd-wp until 09854ba94c6aad7886996bfbee2530b3d8a7f4f4, the Fixes need to target that, definitely not a patch from 2013. This means the backports will apply clean, they don't need a simple solution but one that doesn't regress the performance of open source virtual machines and open source products using clear_refs and uffd-wp in general. Thanks, Andrea