Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4501093rdb; Fri, 15 Sep 2023 04:25:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHwN/NyxMyWfzqtpDS2T3TqhBo2ueHo6yJj+i/kNvp1DOY0NYg31VPN2PsqADT2Gr3A4aLn X-Received: by 2002:a05:6a20:5495:b0:133:8784:15f7 with SMTP id i21-20020a056a20549500b00133878415f7mr6276005pzk.14.1694777107971; Fri, 15 Sep 2023 04:25:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694777107; cv=none; d=google.com; s=arc-20160816; b=mLEBysboR8jq8s43LNYoPM0bEn9E4Gbb4Csm0CGouIkZrC0/MdTvC1XX3aSqT2gpz4 aXdp4gzxGiX0e8BR3vXtIn95hVAYeMZpYlQhThpO0Nf3A7tjeRzylU3u5hw/6OBJc8f0 k46qJ2K/utFDDf7X5Pz306mvIUuxKf66HfZ1V5twVNaXsWVxMNK8UjNX4Qh+E/crfjyR zb1Y9hdxWpI4Ct+wZbePM3OhXRQsJSQ9OUIwNC2sLuOBvoFM3ocEa2Wf8OEgpY1aQ1Be SEjJfbh8asLz4kaTRh6NrGwjNo4kCxXNXVRff+08QFlbDecaGkd3/FFr33kWhCqnmllP FJpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=5U61MhzJI73OJTFzPfDsmy/XLiTcwMLxEtjvstIs+RY=; fh=1/H2r+UMnh1lHa0GLAnS3E3+hPDfZnMip7rm4ItSBGQ=; b=qeR90g2Ss0M5X3g6viAUAAX/N18ndko4Rt2FuxFpYugJXz3S1jZ623ONqAeM5IlkhP M3pkKkMF8wrgdgt+kT7YyameYEoFgYRh3V7ASLMdq//3Lj084OwzN3XxwN4+TWUuYB9S yX75RT/F1n+XVly7gx7/ihqXmxKnXk+LelLSOwDlpDiF1/4jW2Ox/KLtI3I1aYcihPyN CznHNS+eI/Yckrnw3jH+/0eLTRVbWcbQLGI00VQOK79rzuGT/DhYXrJjIwF8q7/qFYcl TxlwRNP08TcEowRVOZMlstb3aARPlhS8Qq+YszsXJXw+C7FTpIUxR49GzqetnPfTTo+4 1KXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bDJKujLh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id o25-20020a635a19000000b0056da0ae25d0si3052255pgb.499.2023.09.15.04.25.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 04:25:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bDJKujLh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 35A8883C3AEB; Fri, 15 Sep 2023 03:12:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234232AbjIOKMI (ORCPT + 99 others); Fri, 15 Sep 2023 06:12:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234258AbjIOKMA (ORCPT ); Fri, 15 Sep 2023 06:12:00 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AACBC2D6B for ; Fri, 15 Sep 2023 03:10:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694772637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5U61MhzJI73OJTFzPfDsmy/XLiTcwMLxEtjvstIs+RY=; b=bDJKujLhTL+nZDzKGHc9cWT+eqNcQXsF8Bki/BJbmPdQ2KsU7Wr9XicIOzVV8uLDUOlGev OCMcCkRCbLFVOwgKMlN1opUKoi9hkf/iv48Dt4QMJNIh3+OKARWoPcEo8u+iibO1oOgLrJ MJzmKrlQP4yNpdefFhgVyNIn7dgWmz0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-396-u5N0xklJP8-lgLuGgb9A3w-1; Fri, 15 Sep 2023 06:10:32 -0400 X-MC-Unique: u5N0xklJP8-lgLuGgb9A3w-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B637A85A5A8; Fri, 15 Sep 2023 10:10:31 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id 388F240C2070; Fri, 15 Sep 2023 10:10:28 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <20230914221526.3153402-1-dhowells@redhat.com> <20230914221526.3153402-10-dhowells@redhat.com> To: David Laight Cc: dhowells@redhat.com, Al Viro , Linus Torvalds , Jens Axboe , Christoph Hellwig , "Christian Brauner" , Matthew Wilcox , "Brendan Higgins" , David Gow , "linux-fsdevel@vger.kernel.org" , "linux-block@vger.kernel.org" , "linux-mm@kvack.org" , "netdev@vger.kernel.org" , "linux-kselftest@vger.kernel.org" , "kunit-dev@googlegroups.com" , "linux-kernel@vger.kernel.org" , Andrew Morton , Christian Brauner , David Hildenbrand , John Hubbard Subject: Re: [RFC PATCH 9/9] iov_iter: Add benchmarking kunit tests for UBUF/IOVEC MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3370514.1694772627.1@warthog.procyon.org.uk> Date: Fri, 15 Sep 2023 11:10:27 +0100 Message-ID: <3370515.1694772627@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 15 Sep 2023 03:12:15 -0700 (PDT) David Laight wrote: > > Add kunit tests to benchmark 256MiB copies to a UBUF iterator and an IOVEC > > iterator. This attaches a userspace VM with a mapped file in it > > temporarily to the test thread. > > Isn't that going to be completely dominated by the cache fills > from memory? Yes... but it should be consistent in the amount of time that consumes since no device drivers are involved. I can try adding the same folio to the anon_file multiple times - it might work especially if I don't put the pages on the LRU (if that's even possible) - but I wanted separate pages for the extraction test. > I'd have thought you'd need to use something with a lot of > small fragments so that the iteration code dominates the copy. That would actually be a separate benchmark case which I should try also. > Some measurements can be made using readv() and writev() > on /dev/zero and /dev/null. Forget /dev/null; that doesn't actually engage any iteration code. The same for writing to /dev/zero. Reading from /dev/zero does its own iteration thing rather than using iterate_and_advance(), presumably because it checks for signals and resched. David