Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp2392981pxv; Sat, 24 Jul 2021 15:08:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzP80FFwl/+OvFPQ4MxPGJ5w9pffH4oIj/aHjScwNDCoLCEtnkyi5Rsf2fPyjFHCvQYQI0n X-Received: by 2002:a17:906:2ac1:: with SMTP id m1mr3737789eje.518.1627164513766; Sat, 24 Jul 2021 15:08:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627164513; cv=none; d=google.com; s=arc-20160816; b=ty8OtQO0WAw2zEf9gEkL/3jAtk24M+4WzZOuKLF0oaOgZDyVh08ZO7atbZYIY3r5SV 9J6gV9D4FVdYJkERqdSyjYJKQHC8YUxdjko/0kbDydmYN6G/cXvUi9uYgS6bTorE+W5k 2wslngYierM+2/6hPFACpJ5TZbZ9susvri5n7Pj52QqfX3H6F7smQD0Psz+6f0AIOL0A YrXh8yV1yYzv0FDUtALjeUGPq8q+Ek0LFPuJPrc7TYg/0SO3Nx5Z4IDZa9/SNajbiY0S QVFpbeRfvalqJPvTAGCPWOezR4vPPkD5pgziC1lVh+bDiFsyap1BM3OzE+h21OD+8ogd H2aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=977uLZZ1MP2YWJkQk/8ziIBF22i/BGM3rYPV0nl730Y=; b=OLWOxsjyUxEAR7VtEOMiM+HXRXYtxAclSAA3SUq9o2MO1V7CqIFNEpt7uRZECsmEJR EQuWV+e9JQWuu+TPT48Vw86Yz91Lh6z/bfx9n1tGXKXFEqOmcJg490SE05ceLaXWGWnw J6iD5tSvBGf/2sBuhXUpKGlZ2Rl2KaWNKkCn0tulaaWQGh+RPCeQcpJp/DFK/62ByX1V 6v5WuO7ixov824pVXXRYDvC9yP/eJsSLgFFxdRCfvFyysOW2sWU7IfFavL6Jwph9g8Wj 3vLyuOuipxoXVdWKhSvJ5Z47vGdIP4UlOWwbr4R6fc8t8jjaNogYbd0LNLbKwYJ/R7W4 wLoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="SvM4a/Oj"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q1si18815673ejn.480.2021.07.24.15.08.10; Sat, 24 Jul 2021 15:08:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="SvM4a/Oj"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229853AbhGXV0Y (ORCPT + 99 others); Sat, 24 Jul 2021 17:26:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:59954 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229549AbhGXV0Y (ORCPT ); Sat, 24 Jul 2021 17:26:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627164414; 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=977uLZZ1MP2YWJkQk/8ziIBF22i/BGM3rYPV0nl730Y=; b=SvM4a/OjaR7IPBQ8HWM4GnA//sM+uEfZ0d0obWIdZWX79DaxLeCP5kAp/1i/RDJsVGoU5b dqSrihC+PjFMETQkh1NkKauGMzkD3SzkwrLOBhexQvPKI4PPd/lBALtpbu2iQdXJLOAHwG e2oPVmPq2Qr17NFevYGUfDsg4PBvTO8= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-345-hSDu2oi1N1ulMSWgjLqsyA-1; Sat, 24 Jul 2021 18:06:53 -0400 X-MC-Unique: hSDu2oi1N1ulMSWgjLqsyA-1 Received: by mail-wr1-f72.google.com with SMTP id d18-20020adfe8520000b02901524df25ad7so2585679wrn.8 for ; Sat, 24 Jul 2021 15:06:53 -0700 (PDT) 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=977uLZZ1MP2YWJkQk/8ziIBF22i/BGM3rYPV0nl730Y=; b=PURVpT6H1quMKPRBCJuIXsckKg/0sodHsEWnzp1gS7jRZIN9y2ZdBWp8xzvckvjmjH BIsqQjjnEv3AA/PSAneR9QcyVYBhQE8ZulbEz+RyV84E0nhDKje2QPyTNn9X8HimSqFI Bkj6h9Ne98TXqRsXcn+Un++l7ECBtlawOa5xT9gqXkhwWdw4ocb6o6DpD7iaYBVcJhcE 0PtG7xIYp7UZvdeRuEIh432SR3r5nWbRqhg8n5PoORCtSWJcU62UErmtTvuy3zgioYLP DnJkuCtv6kbtaOZPJljCYGeqiPHSMGTHNCSVgZ3mG1uL04q5RCAS6Pc8O8//z5s0JZsK QnhQ== X-Gm-Message-State: AOAM532VmFQmoo9LED9QTdstbWR5u8luz0ntjcTnuOFJJBabQ7E23eUM giNF8r0XldMS1jtLlxNEQGQykSONgTdhaBbmwKJKcOZjMLW5H1puZrs4yy2GB3gEzxojaMSuU3i lJWqS9yPAjZr2kspAkBULee8ENYL3Fb/MjPwvuVbl X-Received: by 2002:a5d:540d:: with SMTP id g13mr3472777wrv.329.1627164412499; Sat, 24 Jul 2021 15:06:52 -0700 (PDT) X-Received: by 2002:a5d:540d:: with SMTP id g13mr3472762wrv.329.1627164412331; Sat, 24 Jul 2021 15:06:52 -0700 (PDT) MIME-Version: 1.0 References: <20210724193449.361667-1-agruenba@redhat.com> <20210724193449.361667-2-agruenba@redhat.com> In-Reply-To: From: Andreas Gruenbacher Date: Sun, 25 Jul 2021 00:06:41 +0200 Message-ID: Subject: Re: [PATCH v4 1/8] iov_iter: Introduce iov_iter_fault_in_writeable helper To: Al Viro Cc: Linus Torvalds , Christoph Hellwig , "Darrick J. Wong" , Jan Kara , Matthew Wilcox , cluster-devel , linux-fsdevel , Linux Kernel Mailing List , ocfs2-devel@oss.oracle.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 24, 2021 at 11:57 PM Al Viro wrote: > On Sat, Jul 24, 2021 at 11:38:20PM +0200, Andreas Gruenbacher wrote: > > > Hmm, how could we have sub-page failure areas when this is about if > > and how pages are mapped? If we return the number of bytes that are > > accessible, then users will know if they got nothing, something, or > > everything, and they can act accordingly. > > What I'm saying is that in situation when you have cacheline-sized > poisoned areas, there's no way to get an accurate count of readable > area other than try and copy it out. > > What's more, "something" is essentially useless information - the > pages might get unmapped right as your function returns; the caller > still needs to deal with partial copies. And that's a slow path > by definition, so informing them of a partial fault-in is not > going to be useful. > > As far as callers are concerned, it's "nothing suitable in the > beginning of the area" vs. "something might be accessible". Yes, and the third case would be "something might be accessible, but not all of it". There probably are callers that give up when they don't have it all. Andreas