Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2284733pxp; Fri, 18 Mar 2022 07:23:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrGdE56fM/oU1uaXvq1Xj28etS1+CKtdl3jKsA/ZkupcunVBpKOhZxKhCdH42KvuPvasSX X-Received: by 2002:a63:7216:0:b0:382:3f32:cdb2 with SMTP id n22-20020a637216000000b003823f32cdb2mr865959pgc.253.1647613416766; Fri, 18 Mar 2022 07:23:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647613416; cv=none; d=google.com; s=arc-20160816; b=RHxHwFCCHMFfJ49A6ufZV0MeRrp/coVK3c0tdX/WMqIcIr5pstIdSysU9c3/0DOOTA MIwn3DeOsBYlO1om2HqYDOx6WBqUBPiNM/ag2o+hvQxHkigp46O/B4OksK2147Yr57Ag fKIcjKnWzNFpu58pyPogXdYCUtslaFj/CWu08A9iXl3zi5dLFGu4CL489MFaX1ggnmt3 eX4ejY8QzJ25aWS307V45p+CrQahDU7pQBJBK2Ix6Q4D4pCuV9+xll2tlKu/w57eV/aD ekcDqI8iZbrx6qZwMj4V/f+hCV6twbedGwDoKdORE6GWZjootr5XwkcjRNdj2AsdnzAX Gl5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9QCcpNkDMmy8WarV6TWNsU1p+/IGAtNQ1g1Iawnak2g=; b=jLy1rhpokYxgDbaDfJ1BGh+MmD9G/03RDdxg8KGx0dI6ZpsXmfbE142uHpc6MWR/t9 pmtef+GptptNj9Ml5JfyOE99E/uYo/rwtah/+foebOIDsvgquSUarFVaJUlEByQCMgDx VBASBZy3d0wAokzcMq5C+1r4IilJlB28kOG9ew5MwBeV7dWCwc/BbdI6x1htnQMjNUmE 1bO5YNm+hmhgL+yx2K6ZlV8f98qtf/cLeuCdAITtjDRYmXe2dK91eMXKXc4oyF1ED57C 8p0xwHKyb5/B2vXrdMpfYkLZ13bC+DotYFr8wXDX3U8vlFEzQpeRrALyD3ig03cyfBbo g3uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=in9ZKghm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a22-20020a1709027d9600b00153b2d16503si2045314plm.267.2022.03.18.07.23.19; Fri, 18 Mar 2022 07:23:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=in9ZKghm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236864AbiCRNvh (ORCPT + 99 others); Fri, 18 Mar 2022 09:51:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236847AbiCRNvf (ORCPT ); Fri, 18 Mar 2022 09:51:35 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E69AEF4606; Fri, 18 Mar 2022 06:50:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=9QCcpNkDMmy8WarV6TWNsU1p+/IGAtNQ1g1Iawnak2g=; b=in9ZKghmvV/js8WUDCBEqSIEsU lfVjU8AWwKk2roGiPFZgB43IcUrfyYE2GKnRlWqu8W07uN2aUYlhafO5NUeA12Yr1TcrvTDLvsKLt go7mYV5WTwNHNxZ6Hmk8xtZd0talGlWPXanK2yLzYZ8xTkEgNtnN6IbG6kMJziyJ8RcG4jHfDCgFk Hf9yS8lVqKPAzoQVgv9ZYmXL5OxDHARGz7JieQDheJk8O2EEZHaHcDdwBenoth0gN+qWdohDixK4l EZ+oSj/QYfbvyyioYe9W/wHs/6ZbLsYbIoT3ZI+pUHkMPz8nKw+DR1QTZ+sc0lxewcYQ+BDk4dDL2 /zPgRArQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nVCzb-007z9p-MV; Fri, 18 Mar 2022 13:50:11 +0000 Date: Fri, 18 Mar 2022 13:50:11 +0000 From: Matthew Wilcox To: David Laight Cc: 'Baoquan He' , "linux-kernel@vger.kernel.org" , "kexec@lists.infradead.org" , "yangtiezhu@loongson.cn" , "amit.kachhap@arm.com" , "hch@lst.de" , "linux-fsdevel@vger.kernel.org" , "viro@zeniv.linux.org.uk" Subject: Re: [PATCH v4 4/4] fs/proc/vmcore: Use iov_iter_count() Message-ID: References: <20220318093706.161534-1-bhe@redhat.com> <20220318093706.161534-5-bhe@redhat.com> <1592a861bd9e46e5adf1431ad6bbd25c@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1592a861bd9e46e5adf1431ad6bbd25c@AcuMS.aculab.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 18, 2022 at 01:48:07PM +0000, David Laight wrote: > For some definition of 'cleaner' :-) > > iter->count is clearly a simple, cheap structure member lookup. > OTOH iov_iter_count(iter) might be an expensive traversal of > the vector (or worse). > > So a quick read of the code by someone who isn't an expert > in the iov functions leaves them wondering what is going on > or having to spend time locating the definition ... Thank you for having an opinion. Al's opinion, as the iov_iter maintainer, trumps yours.