Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2727635rdb; Wed, 15 Nov 2023 08:53:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IGulvM8s9qqOWdW/GtBO0FEGsqJTuQhkSTtTYKJpLJewJOLGhTqOgE6S6sVnuxD/Ce4dNlc X-Received: by 2002:a17:902:ce01:b0:1cc:482c:bc46 with SMTP id k1-20020a170902ce0100b001cc482cbc46mr7136344plg.34.1700067232693; Wed, 15 Nov 2023 08:53:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700067232; cv=none; d=google.com; s=arc-20160816; b=oHOqfgH7wvoMSjqHQJilmlWyE6Nvytm9JMMPOqKY15Mkjt40iAjg4Bs9rE7bilfmxP CzCP7n8NBCe7FqLeDTeeP/FrNRnSMOM0j+r1VWogPicidFZNCRjI/C8fYauVVBYxEb3F jAJtJdh/mzpSl6K8zsDVkhJ5p+9oNLaWXhMu3umQigrlYV8cHmmLEKzmgKxMHMfG2uz4 /zisw6oCDaz+1C257QIdfrnlVR6fOXAYNkMFi5h9SzXSnOZWdEDTknBcAQwScwHo0yMB pLcc99BvyadoyouDS8wmPl0Lk8TgECzUpYZHhpWVpGj1AlYGQbYQWw+6f1rELfCPjTuY hNmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=1sF8rVm6qSPjNpZ4MRVa5Fv/0C/XbN0BqIbvH3bfCTs=; fh=RB/ZlumVm972zDIjxZjY7vSMUZow2KSaYK3pIi10DDM=; b=vhGzLKIzbystIkpeTWmEPqQkhotYCyyXNmq8wAVznrcB4vgSRk/TDDOvGvf0hRliGk EvBB29ScVQ7JnU5trwZ54zX47pySLXWeR1DvMMwo2HhpOWnp/D0xd652CeyqOXESlcPL 6A7f/LBQpQt37USIoy55HIGbQELrOTE47kwTXoyy1aoiEJsa/1M+pQuYD79i8YQTMPhY OzRDDcXq4iSwFJPFrQ4T+ma04y1Om/Z2dvNh2CzPm6C061onZ3Zhd0FY1N7V2g1s1/9Z EU9QMOrzaelsrPMnf6Y6W9Wm/T+D1wRb3uSEkNTMRdd6cJqwOFCGehEJnX2rUhmrllZs 6IQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=CittDcDJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id b16-20020a170903229000b001ca4ad86363si10886047plh.390.2023.11.15.08.53.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 08:53:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=CittDcDJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 2DC888111393; Wed, 15 Nov 2023 08:53:50 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232489AbjKOQxd (ORCPT + 99 others); Wed, 15 Nov 2023 11:53:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229570AbjKOQxc (ORCPT ); Wed, 15 Nov 2023 11:53:32 -0500 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ABB4196 for ; Wed, 15 Nov 2023 08:53:29 -0800 (PST) Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-9f2a53704aaso130693666b.3 for ; Wed, 15 Nov 2023 08:53:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1700067207; x=1700672007; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=1sF8rVm6qSPjNpZ4MRVa5Fv/0C/XbN0BqIbvH3bfCTs=; b=CittDcDJ1wVtSCjyL5fWXInFxIdKqCscNgE6EYK44k4QZ/ipZHrR3qytruJT0WAETo dMBZfxKsMhHxi9tztR4OF5e3hjUf3/G9tQPal0JOVDVKngpibDTamOnqHictQpYmuw8O fzNqjrg+oYXVnis1XPxyCNTyMY0opFFdZP1kw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700067207; x=1700672007; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1sF8rVm6qSPjNpZ4MRVa5Fv/0C/XbN0BqIbvH3bfCTs=; b=bspEO+BnREi8+k7B6zALKeY1boOwBLTG1ca3pJoeCs50Id8EcE3Xy4rKWIgYUinuML 6adPNpUTDoR5f9RECvhSCQc1Sbf7B4seiYmz4VmF+56ZoeUes02kxzAKj7xF6A8rNPSr HrlaVqdEHxIlQPcTpAuzCmoTNjd8nob8WQ0iXgeFYF6xS86Vi9hUNyuES2LCCPFYzIkh /W9VNN3RVOXcSioAiqCs9FJGsjllVvw6/ktNG8Nk+BAAeHcNix2n6PjxEZCLoJ2Ezmc7 vDoH1P8jcKsChft/yv7LZe2p9axIr4WymeBKVPa9N9K/jhzItnUOj0hdUiwgUUnrFZiv Fwxg== X-Gm-Message-State: AOJu0YzgS+6WRsUIkk6X22mreced9hNL11fGw0PFloN2lA7lgiSOOtmM T1ZDTyaGky6ctfgrUWjPv8tlyLZBnU+Gg2kLz1GnagbF X-Received: by 2002:a17:906:d9b:b0:9e5:d268:d750 with SMTP id m27-20020a1709060d9b00b009e5d268d750mr9536577eji.60.1700067207347; Wed, 15 Nov 2023 08:53:27 -0800 (PST) Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com. [209.85.208.49]) by smtp.gmail.com with ESMTPSA id l4-20020a1709066b8400b00988e953a586sm7248886ejr.61.2023.11.15.08.53.25 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Nov 2023 08:53:26 -0800 (PST) Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-53df747cfe5so10878391a12.2 for ; Wed, 15 Nov 2023 08:53:25 -0800 (PST) X-Received: by 2002:a05:6402:1052:b0:542:d69d:d075 with SMTP id e18-20020a056402105200b00542d69dd075mr8367028edu.6.1700067205341; Wed, 15 Nov 2023 08:53:25 -0800 (PST) MIME-Version: 1.0 References: <202311061616.cd495695-oliver.sang@intel.com> <3865842.1700061614@warthog.procyon.org.uk> In-Reply-To: <3865842.1700061614@warthog.procyon.org.uk> From: Linus Torvalds Date: Wed, 15 Nov 2023 11:53:08 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [linus:master] [iov_iter] c9eec08bac: vm-scalability.throughput -16.9% regression To: David Howells Cc: kernel test robot , oe-lkp@lists.linux.dev, lkp@intel.com, linux-kernel@vger.kernel.org, Christian Brauner , Alexander Viro , Jens Axboe , Christoph Hellwig , Christian Brauner , Matthew Wilcox , David Laight , ying.huang@intel.com, feng.tang@intel.com, fengwei.yin@intel.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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]); Wed, 15 Nov 2023 08:53:50 -0800 (PST) On Wed, 15 Nov 2023 at 10:28, David Howells wrote: > > But the outcome is a bit variable and the result spaces overlap considerably. > I certainly don't see a 17% performance reduction. Now, this may be due to > hardware differences. The CPU I'm using is an Intel i3-4170 - which is a few > years old at this point. I tried to look at the perf profile changes in the original report, and very little of it makes sense to me. Having looked at quite a lot of those in the past (although certainly less than Oliver) hat's *usually* a result of a test that is unstable. In this case, though, I think the big difference is -11.0 perf-profile.self.cycles-pp.memcpy_orig +14.7 perf-profile.self.cycles-pp.copy_page_from_iter_atomic which is a bit odd. It looks like the old code used to use a regular out-of-line memcpy (and that machine doesn't have FSRM), and the new code for some reason does it inline. I wonder if gcc somehow decided to inline "memcpy()" in memcpy_from_iter() as a "rep movsb" because of other inlining changes? [ Goes out to look ] Yup, I think that's exactly what happened. Gcc seems to decide that it might be a small memcpy(), and seems to do at least part of it directly. So I *think* this all is mainly an artifact of gcc having changed code generation due to the code re-organization. Linus