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=-2.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS,URIBL_BLOCKED autolearn=ham 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 75906C282C0 for ; Sat, 26 Jan 2019 02:58:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 40C79218F0 for ; Sat, 26 Jan 2019 02:58:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="Hp59EcXb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726256AbfAZC6R (ORCPT ); Fri, 25 Jan 2019 21:58:17 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:18031 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725916AbfAZC6R (ORCPT ); Fri, 25 Jan 2019 21:58:17 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 25 Jan 2019 18:58:16 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Fri, 25 Jan 2019 18:58:16 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Fri, 25 Jan 2019 18:58:16 -0800 Received: from [10.110.48.28] (10.124.1.5) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sat, 26 Jan 2019 02:58:16 +0000 Subject: Re: [LSF/MM TOPIC] get_user_pages() pins in file mappings To: Jan Kara , CC: , , Dan Williams , Jerome Glisse References: <20190124090400.GE12184@quack2.suse.cz> From: John Hubbard X-Nvconfidentiality: public Message-ID: <041368e5-7bca-4093-47da-13f1608b0692@nvidia.com> Date: Fri, 25 Jan 2019 18:58:15 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190124090400.GE12184@quack2.suse.cz> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL104.nvidia.com (172.18.146.11) To HQMAIL101.nvidia.com (172.20.187.10) Content-Type: text/plain; charset="utf-8" Content-Language: en-US-large Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1548471496; bh=uD+xbZtFCxl/EbX0cOF2Pe8a8lrRkz3suI1QjhUidtg=; h=X-PGP-Universal:Subject:To:CC:References:From:X-Nvconfidentiality: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=Hp59EcXbiUb6mG3i1HemSvsw687q09VRtca1+hRD6ZlxFYc90RvcG01S2nT80qXsM xwxY8Etl85hCeBqthKQ4tIM6Hohu3eFYPGzvmz17TAsQM0JL6H3gYUPADYpmrPT+sN lVXnJbLJ82xiyx73H0Fw2MzRYObt8BazRVH6CFiVaSuspAh2xGdW7ntjCQmvyL+HWt q05VQ+LzWf625RTYwC7QrtJ7mUfqPVI+27gJSzR4wHFfN+lDPfn3O4Cxs3XGIeHHmW dEcpuw+n17kEiBJpToh0KwMAuFt11AAqH1SEM8HvA53gVLuDZ5I8pvqig1i1jzsQxI u5Jn+o3CvWuQA== Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On 1/24/19 1:04 AM, Jan Kara wrote: > This is a joint proposal with Dan Williams, John Hubbard, and J=C3=A9r=C3= =B4me > Glisse. >=20 > Last year we've talked with Dan about issues we have with filesystems and > GUP [1]. The crux of the problem lies in the fact that there is no > coordination (or even awareness) between filesystem working on a page (su= ch > as doing writeback) and GUP user modifying page contents and setting it > dirty. This can (and we have user reports of this) lead to data corruptio= n, > kernel crashes, and other fun. >=20 > Since last year we have worked together on solving these problems and we > have explored couple dead ends as well as hopefully found solutions to so= me > of the partial problems. So I'd like to give some overview of where we > stand and what remains to be solved and get thoughts from wider community > about proposed solutions / problems to be solved. >=20 > In particular we hope to have reasonably robust mechanism of identifying > pages pinned by GUP (patches will be posted soon) - I'd like to run that = by > MM folks (unless discussion happens on mailing lists before LSF/MM). We > also have ideas how filesystems should react to pinned page in their > writepages methods - there will be some changes needed in some filesystem= s > to bounce the page if they need stable page contents. So I'd like to > explain why we chose to do bouncing to fs people (i.e., why we cannot jus= t > wait, skip the page, do something else etc.) to save us from the same > discussion with each fs separately and also hash out what the API for > filesystems to do this should look like. Finally we plan to keep pinned > page permanently dirty - again something I'd like to explain why we do th= is > and gather input from other people. >=20 > This should be ideally shared MM + FS session. >=20 > [1] https://lwn.net/Articles/753027/ >=20 Yes! I'd like to attend and discuss this, for sure.=20 Meanwhile, as usual, I'm a bit late on posting an updated RFC for the page identification part, but that's coming very soon. thanks, --=20 John Hubbard NVIDIA