From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2A63C43381 for ; Wed, 27 Jan 2021 18:33:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9A96464DAB for ; Wed, 27 Jan 2021 18:33:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236864AbhA0Scs (ORCPT ); Wed, 27 Jan 2021 13:32:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236221AbhA0Sci (ORCPT ); Wed, 27 Jan 2021 13:32:38 -0500 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3DD1C06174A; Wed, 27 Jan 2021 10:31:57 -0800 (PST) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94 #2 (Red Hat Linux)) id 1l4pbc-006j0L-K3; Wed, 27 Jan 2021 18:31:52 +0000 Date: Wed, 27 Jan 2021 18:31:52 +0000 From: Al Viro To: Pavel Begunkov Cc: David Laight , "linux-fsdevel@vger.kernel.org" , Jens Axboe , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] iov_iter: optimise iter type checking Message-ID: <20210127183152.GP740243@zeniv-ca> References: <6e795064-fdbd-d354-4b01-a4f7409debf5@gmail.com> <54cd4d1b-d7ec-a74c-8be0-e48780609d56@gmail.com> <20210109170359.GT3579531@ZenIV.linux.org.uk> <1783c58f-1016-0c6b-be7f-a93bc2f8f2a4@gmail.com> <20210116051818.GF3579531@ZenIV.linux.org.uk> 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 Wed, Jan 27, 2021 at 03:48:10PM +0000, Pavel Begunkov wrote: > On 16/01/2021 05:18, Al Viro wrote: > > On Sat, Jan 09, 2021 at 10:11:09PM +0000, Pavel Begunkov wrote: > > > >>> Does any code actually look at the fields as a pair? > >>> Would it even be better to use separate bytes? > >>> Even growing the on-stack structure by a word won't really matter. > >> > >> u8 type, rw; > >> > >> That won't bloat the struct. I like the idea. If used together compilers > >> can treat it as u16. > > > > Reasonable, and from what I remember from looking through the users, > > no readers will bother with looking at both at the same time. > > Al, are you going turn it into a patch, or prefer me to take over? I'll massage that a bit and put into #work.iov_iter - just need to dig my way from under the pile of ->d_revalidate() review...