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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 6EA3CC3F2D1 for ; Sun, 1 Mar 2020 04:04:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 27E5221D56 for ; Sun, 1 Mar 2020 04:04:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="A9ePQgV6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 27E5221D56 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CE8EC6B0007; Sat, 29 Feb 2020 23:04:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C9A466B0008; Sat, 29 Feb 2020 23:04:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BAEDA6B000A; Sat, 29 Feb 2020 23:04:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0085.hostedemail.com [216.40.44.85]) by kanga.kvack.org (Postfix) with ESMTP id A0EA56B0007 for ; Sat, 29 Feb 2020 23:04:44 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5DEC7180ACF7F for ; Sun, 1 Mar 2020 04:04:44 +0000 (UTC) X-FDA: 76545452088.13.fang71_4672d21bf404c X-HE-Tag: fang71_4672d21bf404c X-Filterd-Recvd-Size: 2856 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Sun, 1 Mar 2020 04:04:44 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C5D5721556; Sun, 1 Mar 2020 04:04:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583035483; bh=v2mcxXWb+R0Vhm17A6puuY8jR6c5Oi6XU1V671GdlZ4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=A9ePQgV6KKC2mkpgUEeBYsaX6+itQcOiQNHySSIms4bmN2iXMXtJp8zDfWu9gN+1l qLpc36KbDrTZG6q6a0Kl2c7YXPNDWfnXq+av5ZtkmQ3q8vLAfkCCQVmzDloJiqH+SK 3ISuA3wgjNsV83UMHc6LmY1VdlRzPJeOi2p8XA8s= Date: Sat, 29 Feb 2020 20:04:42 -0800 From: Andrew Morton To: Thomas =?ISO-8859-1?Q?Hellstr=F6m?= (VMware) Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, pv-drivers@vmware.com, linux-graphics-maintainer@vmware.com, Thomas Hellstrom , Michal Hocko , "Matthew Wilcox (Oracle)" , "Kirill A. Shutemov" , Ralph Campbell , =?ISO-8859-1?Q?J=E9r=F4me?= Glisse , Christian =?ISO-8859-1?Q?K=F6nig?= Subject: Re: [PATCH 2/8] mm: Split huge pages on write-notify or COW Message-Id: <20200229200442.64bf59df288962382d46fd55@linux-foundation.org> In-Reply-To: <20191203132239.5910-3-thomas_os@shipmail.org> References: <20191203132239.5910-1-thomas_os@shipmail.org> <20191203132239.5910-3-thomas_os@shipmail.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 Tue, 3 Dec 2019 14:22:33 +0100 Thomas Hellstr=F6m (VMware) wrote: > We currently only do COW and write-notify on the PTE level, so if the > huge_fault() handler returns VM_FAULT_FALLBACK on wp faults, > split the huge pages and page-table entries. Also do this for huge PUDs > if there is no huge_fault() handler and the vma is not anonymous, similar > to how it's done for PMDs. There is no description here of *why* we are making this change? > Note that fs/dax.c does the splitting in the huge_fault() handler, but as > huge_fault() is implemented by modules we need to consider whether to > export the splitting functions for use in the modules or whether to try > to keep calls in the core. Opt for the latter. A follow-up patch can > remove the dax.c split_huge_pmd() if needed.