Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp2388744pxv; Sat, 24 Jul 2021 14:58:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVyaF532T4YQrazEexUxcRnIhfOYwlB+WoJfcj/Kj1WodV05pD3PLw3498xGjkAc9wNM9P X-Received: by 2002:a5d:8c9a:: with SMTP id g26mr8987329ion.121.1627163939454; Sat, 24 Jul 2021 14:58:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627163939; cv=none; d=google.com; s=arc-20160816; b=w6p6YgCU7VBUS5LP43mCEF7sAKB0Z6jcwa7ot1py+Abu2GzrJFEnozZ+5aFhvjhEPm gCp7Cx0M80+HVuxV2vkOK0WD6JF/txSBb2gNVKKeQSc9sTSUqOudH79cv8mfN2OXpdpU zTCzjlKxT8NZP2ODqJcO8Jti3ptbsr0/qMcNrYid4lhlZKWyNNjLDL0ppO86l5+EADVB AOpfg6WJsi3L234uf1s6Kc+LhQepJkQ+0mIoyhRECI1vWzFTxNjRpXFButxX3TImpnzm PUe0vdiw+wtwzxmSwdeo+iXDEmYgEiWqZLdiPnn5CYBWS3aejgjuqJt5mkq1eR8mMt03 L4sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=uFRr1ttQS1u1RPySpCDdiJZZ6vXUoGSS04zI2vJB970=; b=FXxuH4jLVTqEPR0cEfODm6Qt1BIEOuaEIqW17mlRFdKAprgwTYB6UqP4x1x8H+DzB5 8q6Hco67pYN6DCZq9rYUbYzNCm8VQZ4GlMNBbLPM+5VE/udJTyE5aBHpipj6/1t+fOk5 a8mTWczy8Z0J7ogdjNdr4lvGv6Qk/c5B+lDBKC5EksGNAs6KQEeE3YDwo9/4XJiaq2UN FD8krka9bnvXMTbYbrrE9YnNYaAvGm06/l8gf7Dl8pTPG3n9YyK9IFIBaOE2ObXkhT7v TnADhcCXnunyJiXWy0leVTReSc1t3eqcAdg8gY1luqaOGRXPtCjp0OBZ1gJ8GLHKAE3e TRhg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k19si40094775ion.69.2021.07.24.14.58.47; Sat, 24 Jul 2021 14:58:59 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229964AbhGXVRE (ORCPT + 99 others); Sat, 24 Jul 2021 17:17:04 -0400 Received: from zeniv-ca.linux.org.uk ([142.44.231.140]:52430 "EHLO zeniv-ca.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229549AbhGXVRE (ORCPT ); Sat, 24 Jul 2021 17:17:04 -0400 Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m7PeC-003gMt-NK; Sat, 24 Jul 2021 21:57:28 +0000 Date: Sat, 24 Jul 2021 21:57:28 +0000 From: Al Viro To: Andreas Gruenbacher 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 Subject: Re: [PATCH v4 1/8] iov_iter: Introduce iov_iter_fault_in_writeable helper Message-ID: References: <20210724193449.361667-1-agruenba@redhat.com> <20210724193449.361667-2-agruenba@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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".