Received: by 2002:ab2:7407:0:b0:1f4:b336:87c4 with SMTP id e7csp217034lqn; Thu, 11 Apr 2024 21:29:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWku8MpFd+o9V4hHygSaoc+VmdgrAYGfwqABZgtLuBr/KoaQUt9+qd/vdjrFu7zv6iFWLfBOnqA8KKMQ1L29ZfwLtVn7Z95PpqvAllb5A== X-Google-Smtp-Source: AGHT+IEMxksqz1WG55DdVQ9kFiITIxN8AxWx4Z/1xGsaBQzHXFoRuHGDqyXxI/nShcapggGfp2DU X-Received: by 2002:ad4:4e6b:0:b0:69b:5516:966b with SMTP id ec11-20020ad44e6b000000b0069b5516966bmr1237877qvb.18.1712896162972; Thu, 11 Apr 2024 21:29:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712896162; cv=pass; d=google.com; s=arc-20160816; b=lcDD48nXC/eJ5/wdeOngcYBBnc4SXLT17Uy50YjW26Inw568tweOGw45BxJSAtI4zs Whx4aCNc6I3h9iewVzQ3D9iMOXpAh0y3h2Mq+5WXHyjMaKaDFCZAG7hRSZVGYqbZ0w4I e27v0zzAE6ph7TTVSuCZx9lHuQKKrLp74z1b/Qe7J0JaXJ/aMmx2S2QvH7/2MJvVH4mt Ng68AXrizeP7c/xeAACbf58FSTBQNdZaXP9wqA7o0mWhr49lTn+xE+QmWbbTtV0ps8sK N6n9EH4mAzP95rCWsKxNHadzCGxKCkDtsGk0bm/ZckZavk4AHip9iFuuj8Zu8sAqwELT awIA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=SN8hBhDzhEUTSap+6csDB4UNd+5T+CN0+lWmQ/p4FDc=; fh=Vr1Td+7qQ6XtZNcNXq6FkJeLRTopXefc/04D11YiJ1U=; b=UjC0EO9FV9z3kylgzIXC8qR9c45aFpevJOtZDfxpr98fyInKcQdMHYv59DKGjj7BMO JfCMRq84N0kvx+0H60WoBpCLW1eD2tefHrGaqQdW/Q4yBbvLxKiGljIEBuRYADX/nYwZ 4ZN/1zhNO2bro7UBKrizbIUrwghYN7hvkMCJ0bDWOYsqDkEnZb9JDRT0QXB02PnK6k2E CZpst+S2slCbzSnK+bp2znDf6QnMjBz9h+sM9toPgUkyhArgx8pEGCqQkMjWo24MKY/i 4bcghcIcdNO+zHVWx2oeoZleXAHrJyB7LQuodvztR2dzDcvGwi+Rnklc/ts7YqW1W7Av n1JA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=agtHApzR; arc=pass (i=1 dkim=pass dkdomain=linux.org.uk dmarc=pass fromdomain=zeniv.linux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-141927-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141927-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id dn18-20020a056214095200b006993a1f57a3si2839773qvb.151.2024.04.11.21.29.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 21:29:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141927-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=agtHApzR; arc=pass (i=1 dkim=pass dkdomain=linux.org.uk dmarc=pass fromdomain=zeniv.linux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-141927-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141927-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id ACCED1C20B8E for ; Fri, 12 Apr 2024 04:29:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0905118633; Fri, 12 Apr 2024 04:29:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b="agtHApzR" Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [62.89.141.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B8055182C3 for ; Fri, 12 Apr 2024 04:29:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.89.141.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712896155; cv=none; b=jz13QCHmv/4AjmGhqCNDda7zGLqL9AOe4y8q/TZb38CoXl1Z4qR/Cchd+TLGJkT9Z/22wm2vtidvvxqMoR8DS7nEIaJg+dzNv7lrivA7/hAoFH7t7fDJ4KMmRPhcBGLlOdZ28/4Ob+r4XFR9p0Fza3A2UHARjjqc+EeyejT3ZOQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712896155; c=relaxed/simple; bh=DHM6nAj7Jy+55xoiSG9PHnUuCFZzkPIfgyOUGfjMPfI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OD/wVZDUdRdp9c9Q9Bs+A8RWY5VggMlZUGsMdKA+NHy6vYjIny1xSh8j6M5Ka+O0PkqDei6SE55xq0UxrJxWRMZnUXEEg0BefWGJmkfxyl65kuMsah7IeH+QcHAmoboNsw8TZh4x9bPjMc2CQvUulkP/w86YAK3Z3bOon1ZZBHY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zeniv.linux.org.uk; spf=none smtp.mailfrom=ftp.linux.org.uk; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b=agtHApzR; arc=none smtp.client-ip=62.89.141.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zeniv.linux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ftp.linux.org.uk DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=SN8hBhDzhEUTSap+6csDB4UNd+5T+CN0+lWmQ/p4FDc=; b=agtHApzRQofGYkGfLMtOs1d/+m hlYU+4xuzwyVQ3OuNO3ibmzlpuOQDWqWTS/9e8ZWgzm+oWfm/otMmAnqaQ04RGkZ6V4IFRWm5bwPh i2DOVo13NVlZwFkXefjz84zAZ8VhwpqCPN3HnnlYQCvalyfsyYlbs2Dnl7N1tL+r0DpSP1r/8e66x YC1RO1EIQPeMgUSeQRvACcySK3DpNkSpTU+W5t2YZf1FfIRrhRQ6f/srEDN4wVhagRdYNr4bVPfHP EKSIMWETcJx914O80SSxpJFP5W9V4Ozd80f1pXF3zDldTW/d2PEVYpvVuqD9tvIMmEtRaTYQM7h+N JfVwrktA==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1rv8XG-00Avx6-2A; Fri, 12 Apr 2024 04:29:10 +0000 Date: Fri, 12 Apr 2024 05:29:10 +0100 From: Al Viro To: Jens Axboe Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCHSET RFC 0/437] Kill off old fops ->read() and ->write() Message-ID: <20240412042910.GK2118490@ZenIV> References: <20240411153126.16201-1-axboe@kernel.dk> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240411153126.16201-1-axboe@kernel.dk> Sender: Al Viro On Thu, Apr 11, 2024 at 09:12:20AM -0600, Jens Axboe wrote: > Hi, > > This patchset will obviously be split, commit messages updated, and > specific driver patches targeted to where they belong. But I figured > it'd be useful to blast out the full set at least once for reference, > and then I'll continue down the right path for the next one. > > Subject line says it all, really. 10 years ago we added ->read_iter() > and ->write_iter() to struct file_operations. These are great, as they > pass in an iov_iter rather than a user buffer + length, and they also > take a struct kiocb rather than just a file. Since then we've had two > paths for any read or write - one legacy one that can't do per-IO hints > like "This read should be non-blocking", they strictly only work with > O_NONBLOCK on the file, and a newer one that supports everything the > old path does and a bunch more. We've had a few issues with the > iov_iter based path being slower, but those have basically been > resolved with solutions like ITER_UBUF to optimize the single segment > case that is often the fast path. > > There are basically three parts to this series: > > 1) Add generic helpers that we need to convert drivers. > 2) Convert any use of fops->read() and ->write() > 3) Kill off old cruft. > 3a) Profit. The fundamental problem with that is that a bunch of drivers do care about the vector boundaries. Very much so. It's very common to have this kind of situation: write() parses the buffer sloppily, and ignores the junk in the end, claiming that everything that been written. writev() feeds each vector to write(). From a cursory look through that pile, you seem to have broken writev() on at least some (if not all) of those.