Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71448C25B4E for ; Tue, 24 Jan 2023 13:21:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234071AbjAXNVi (ORCPT ); Tue, 24 Jan 2023 08:21:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233490AbjAXNVh (ORCPT ); Tue, 24 Jan 2023 08:21:37 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A5E02710; Tue, 24 Jan 2023 05:21:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=7VDifRwWpYsYHhcQ6fHHUTl8MrzfI7GmqknnA4JY6VE=; b=wYMBDKaGEyC/g4xYvrGHMyXR0Q WsjYAYN9PtOxLTAgD0T/9LexqJJ5uKs6j+feKZ77HSJF4hUYcZbl9HdP4IfeHGEGx3YwtLy8Z727A R1yb0bFbHzn87jRqOk6KMc9lvX/1WLAZyWTE7QTgic5m0h3hkwKJUa5Ql5bDmdSAuqDn1VPPdrSaj UXjbuj3VnAPl+LZMlF1fJn7KpoIdUpo5Zj2u6Q8H/5ab4A+Ax+3sNDWdeu52DybUEgxj7S2A4hXYR libnqhN/Epp6Iy0g7Gh7Q9ELpLGcCi2tzX211faU6XBVUxjhcmVNITFNjNT+Is0BIGhgMF1Uvh2aN XPZwzdTQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKJEu-003wq4-L8; Tue, 24 Jan 2023 13:21:28 +0000 Date: Tue, 24 Jan 2023 05:21:28 -0800 From: Christoph Hellwig To: Jan Kara Cc: Matthew Wilcox , David Howells , John Hubbard , Al Viro , Christoph Hellwig , Jens Axboe , Jeff Layton , Logan Gunthorpe , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 0/8] iov_iter: Improve page extraction (ref, pin or just list) Message-ID: References: <20230120175556.3556978-1-dhowells@redhat.com> <20230123164218.qaqqg3ggbymtlwjx@quack3> <20230124102931.g7e33syuhfo7s36h@quack3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230124102931.g7e33syuhfo7s36h@quack3> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 24, 2023 at 11:29:31AM +0100, Jan Kara wrote: > True but as John said sometimes we need to writeout even pinned page - e.g. > on fsync(2). For some RDMA users which keep pages pinned for days or > months, this is actually crutial... I think we have to distinguish between short term (just FOLL_PIN) and long term (FOLL_PIN | FOLL_LONGERM) pins. For short term ones the proper thing to do in data integrity writeback is to simply wait for the unpin. For the long term pins that obviously can't work. The right answer for that is complicated and I don't have a good answer yet. The best one would probably to probibit them on MAP_SHARED file backed mappings - this might break some existing software, but that software is already so broken that this might be best.