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 F24F0C433DB for ; Wed, 27 Jan 2021 18:31:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B376864DA9 for ; Wed, 27 Jan 2021 18:31:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236838AbhA0Sbd (ORCPT ); Wed, 27 Jan 2021 13:31:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236079AbhA0Sb0 (ORCPT ); Wed, 27 Jan 2021 13:31:26 -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 E6316C061573; Wed, 27 Jan 2021 10:30:45 -0800 (PST) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94 #2 (Red Hat Linux)) id 1l4paM-006izX-MG; Wed, 27 Jan 2021 18:30:35 +0000 Date: Wed, 27 Jan 2021 18:30:34 +0000 From: Al Viro To: David Laight Cc: 'Pavel Begunkov' , "linux-fsdevel@vger.kernel.org" , Jens Axboe , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] iov_iter: optimise iter type checking Message-ID: <20210127183034.GO740243@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> <6f7ba1dbbc4749f09ae44aafc6ada284@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6f7ba1dbbc4749f09ae44aafc6ada284@AcuMS.aculab.com> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 27, 2021 at 04:28:38PM +0000, David Laight wrote: > I'd definitely leave the type as a bitmap. What the hell for? Microoptimizations in places where we have much heavier stuff to be done are bloody pointless. It's already overcomplicated. And compiler is _not_ going to be able to prove that we'll only ever have one bit set, so you would be making it harder to optimize, not to mention reason about.