Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3030983imj; Mon, 11 Feb 2019 12:36:45 -0800 (PST) X-Google-Smtp-Source: AHgI3IZzdkjFpC5mCvhgPFnX8Ls41EdQ8I9V1ifHCy2HY6BVYbbo0nhzJa/Jzf0EtqpeNnPs6jEw X-Received: by 2002:a17:902:2867:: with SMTP id e94mr105644plb.264.1549917405457; Mon, 11 Feb 2019 12:36:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549917405; cv=none; d=google.com; s=arc-20160816; b=WFEUNYDu2tle0MGvpg3r0jh4hVCezm1lEH3GfRRSPm/0RGkd1qEyVIE3XqrUw/m8TO LoKZQIU3Ahoo4m9SPs+Q56DG8J8eZjdXoQPnXkYydtvaTTcH3/20g7xQZzJqj8ZpNgsz 4iOYm4Krc6aMYRkP47xlWupx1WXVk12C7t5dypf9AJF2dyj2WgUigUrfOF0M3gSvrsaQ 22ysZGP5doiE7Xz+e4OtOEdR+s8INnwUK24Nsl6o5xyi6mrPqoDoLrDks/VetA4x3Yz0 Bw60576NzkrOzuiPlk1X55LCNEtdIZF2QDt3UelIc4fa85HGRarFp7D0pY+R4S+TN8zK vvwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ul5thXc6++/JQFU35y5jSqKTerpNjS/zr14LWC0b/Yo=; b=GFzn69s2IJsjlVWolHcX2HDOBuTPm/Fqh78WcTWC0SUiQ+wYBd6lUIGYWBwK283h0W h+Ya8hbdGUSsCxFfXF8WTnCk++xCNRQQpKPv5t5ib+z/TtxWVKyUKY5m4Rcy3mU9zF3l yFVkXpFITjFm6JLv0xHsNSufVgevUIy3jnKzTmbeV3L9B4fJmHhH9vyPjsacSOLAsjnQ NHuLZ7rplkD8HYhJiiQS/EBZlkWQ0rl84+2U17LPvSPCGLmltpNA8cokOxMsWbAfFGcP 0qgJCiqCtC18tb8n/VPhbbpug6BK9hKlMCen+T4UiIf2dcYZd30U+kxZunnhhkNk0ixn Jbeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=EtoIsmNk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f18si10107640pgl.457.2019.02.11.12.36.29; Mon, 11 Feb 2019 12:36:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=EtoIsmNk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730993AbfBKSPq (ORCPT + 99 others); Mon, 11 Feb 2019 13:15:46 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:46654 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727007AbfBKSPp (ORCPT ); Mon, 11 Feb 2019 13:15:45 -0500 Received: by mail-ot1-f66.google.com with SMTP id w25so19044694otm.13 for ; Mon, 11 Feb 2019 10:15:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ul5thXc6++/JQFU35y5jSqKTerpNjS/zr14LWC0b/Yo=; b=EtoIsmNkDKQpRH9ypOI5wOHAdlLYheZn+QoXMnH9j3ESgJ+H9ofHEeQ2+z0WgQiKEr x9nF4ZYK4if03fgMSHrIocO7JgQkq8nUlENbhQkgchPEbtsIq8nWqKuoL+Jovt6l77PC N7xGDCZnhMddxom8jz7HGzV8UCnt66iV8NXbA1KODSySGADwC0E5Y6CoZ4HYts0xJDyd 4crFfr0dStfGbzratLctbDnEN4KBjQvGMpQEabs0lF0hrPbIYi4QZy7IEaBYhZer3x73 HknObt5JsH4ENZsCqWCBSk5ZIQ9H6iR5krsJEj/meW/V3iGfAGNFHjvjw7Qs3eii4g1d XMYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ul5thXc6++/JQFU35y5jSqKTerpNjS/zr14LWC0b/Yo=; b=QrPd+SIbX4a6wkEENaoI9/ivrZanQ609uhbkNi3Drf55vK0/XnUCzlJYGdyIYABzDp tf4YDJEBoobZQS6jc3WjdPHkHDlbA8G87ECPoQ48B63AGu2vg1+c428zi/pkY+31wBBa eQ39+uPIMIt53A7NTpejAo0WxFPPJ0ct57nSLRTXkIST07sCy/6KL0FfmfN3b3oTMnBS ODJtLHuAF4RaGE3TbIJvhq6wfD+r5p4Ne5sM10+PZ+fgaqHf9aie+J29LVUrKpUhE0Ij VQnIrfwY5XvyDfOVl46TBoaZ5gLjolmu9gclUXgPriQP6o0Q0/XsJnbFlPnr8bCcisUp BPLw== X-Gm-Message-State: AHQUAuZhxuQTPtF1eTKuQNnJtPIy5iV8rxob+Y7DRXWwK+4fJadlAsRt GSkzxoHYz63kyjQN1BgWIzAcS4fwvwhQuo8VLe6KZA== X-Received: by 2002:a9d:6a50:: with SMTP id h16mr14708887otn.95.1549908944982; Mon, 11 Feb 2019 10:15:44 -0800 (PST) MIME-Version: 1.0 References: <20190206220828.GJ12227@ziepe.ca> <0c868bc615a60c44d618fb0183fcbe0c418c7c83.camel@redhat.com> <01000168c8e2de6b-9ab820ed-38ad-469c-b210-60fcff8ea81c-000000@email.amazonses.com> <20190208044302.GA20493@dastard> <20190208111028.GD6353@quack2.suse.cz> <20190211102402.GF19029@quack2.suse.cz> <20190211180654.GB24692@ziepe.ca> In-Reply-To: <20190211180654.GB24692@ziepe.ca> From: Dan Williams Date: Mon, 11 Feb 2019 10:15:33 -0800 Message-ID: Subject: Re: [LSF/MM TOPIC] Discuss least bad options for resolving longterm-GUP usage by RDMA To: Jason Gunthorpe Cc: Jan Kara , Dave Chinner , Christopher Lameter , Doug Ledford , Matthew Wilcox , Ira Weiny , lsf-pc@lists.linux-foundation.org, linux-rdma , Linux MM , Linux Kernel Mailing List , John Hubbard , Jerome Glisse , Michal Hocko Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 11, 2019 at 10:07 AM Jason Gunthorpe wrote: > > On Mon, Feb 11, 2019 at 09:22:58AM -0800, Dan Williams wrote: > > > I honestly don't like the idea that random subsystems can pin down > > file blocks as a side effect of gup on the result of mmap. Recall that > > it's not just RDMA that wants this guarantee. It seems safer to have > > the file be in an explicit block-allocation-immutable-mode so that the > > fallocate man page can describe this error case. Otherwise how would > > you describe the scenarios under which FALLOC_FL_PUNCH_HOLE fails? > > I rather liked CL's version of this - ftruncate/etc is simply racing > with a parallel pwrite - and it doesn't fail. > > But it also doesnt' trucate/create a hole. Another thread wrote to it > right away and the 'hole' was essentially instantly reallocated. This > is an inherent, pre-existing, race in the ftrucate/etc APIs. If options are telling the truth with a potentially unexpected error, or lying that operation succeeded when it will be immediately undone, I'd choose the former.