Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3366051rdb; Thu, 16 Nov 2023 07:44:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IHtD6R5j84RWIeMOry0hQu0jAkc4X+FElUsREY6dYNCURvYVpE/fKDLyA30pBkzMhg7A+gm X-Received: by 2002:a17:902:db06:b0:1cc:47e7:5d5e with SMTP id m6-20020a170902db0600b001cc47e75d5emr3434902plx.19.1700149488057; Thu, 16 Nov 2023 07:44:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700149488; cv=none; d=google.com; s=arc-20160816; b=APMLLpVGB1V0d69+koz7FtiStsFW6lDHeioJ51zKTq9b8n4gIMpmFSk5R+VXrpLPxz 6VhoNkozAUotkb+Kqqzetehs9o9l+sunQB31dJodwSNie70fUB8HEwbAXdYly7vunAZr w7U7ucR9IfMAiPsVrH1KTFgRCpLNmxk7/JqIrMAnyKOsIF6gknzieNJRx00MVIGPaEyY bdctkZIoVT2kMDsXSBybHVhvtNt99shs1g6bEUCnKy0mIUUdhOvTc+Xp9yj8qjyYUT+Z diI6TkMlsphPsbKnq0t2Q0K1hK9NEnrrTlh4hwB7P6BegtF1aCvADFWDXTDAPjGV9OhO DqTw== 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=jpCy4psk+nUXJweH0L0uiKhQyDuBDi2Ykp2k2WbbHI8=; fh=4yJc638SGTPkGLwkNFQgIu8eHqmCdxukUJVwHLahvLU=; b=alDrMUYzkWaN2oMTn2UKP3bV26vuPLpD4uaa9buav2ToushcKbFEnrij0zVDRmpd18 5zbLJeGEJrbAN01yR3cLzRSXR/efdS4o0flHUxpMAos+1y1l1VQo9vaqqMvqEnYAI7IL 6GNNC60sUayn35jZDaj8wiG/XbCn4JpulvO5qNal/Kj1ZWnJvDsIqVsF48FVa/U1+XUc 3cMiTktxY7GIfZ4B5HUSvdc6N0wPBx6vi4HUqd43BxmYcdSWrsmjJGvgpnchSxhlveQ7 2ufzHrvkJGybRRDeoRfA1gNxm4RlA96Bn7fm3BuWutK5pV4pG9/uM1TzYuciaEqqxbdz 4KBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=CXYY0ltL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id bn21-20020a056a02031500b005b92cefe42csi13784595pgb.97.2023.11.16.07.44.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 07:44:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=CXYY0ltL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 83CEF80D6AF9; Thu, 16 Nov 2023 07:44:45 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345202AbjKPPoh (ORCPT + 99 others); Thu, 16 Nov 2023 10:44:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230019AbjKPPog (ORCPT ); Thu, 16 Nov 2023 10:44:36 -0500 Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6A4C101 for ; Thu, 16 Nov 2023 07:44:32 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 0F83340E0176; Thu, 16 Nov 2023 15:44:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id HXWmMaMJPo2s; Thu, 16 Nov 2023 15:44:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1700149467; bh=jpCy4psk+nUXJweH0L0uiKhQyDuBDi2Ykp2k2WbbHI8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CXYY0ltLQtkXtptWPuwhGxhbdNuu7QJFs8t/4zZK0CUpFvSXiBpNTyUTCB3AnS+pw mfC24fKiJrlEJa+69OXs50hvFfg/MGFtzF/97PrcnyxXz1l+V6kAUYrzGxX2iWly9T mbGLhua+20VPF2bjwJQRhZBOwanbFbjZXCAr0NWRv3ENHbHoDSOQB5JE9bbl9p3uPW 65+JynYGQuT7+nt4GWQfhFsROFbt9aFjcCUxGqq4nyaT1lmA/4EGMMBnYdYuxQCd0H 4X6urr0t2/myhd4TixCPcqRaBgq5r/RQadrfj3XzD9nc+/ZlahH5b1frr7DEKiyf6G EjvdWlfAVu92DfufzO88SshyOVxG88Sfqrq2i5jmxkq4feg/66xs+TgaCgrXP1oVv8 bG+nUq1i0A7Cp4Qh2F698eNYxFXCjzA9SfEAk0iAdwwXdlV5yVQ6pU4GBejy/HcWkF xbUowGsn7Wo8ADygjqbc0bDIgvYkWI7fVJLuTEWOqI//mBlIwTLVTFpcXGkHGCY1Hz 98bsRHPenJ1FGK4cVZXkJw9fI7nKGsWeHXcqecEDZSQQI80cwet1YgyzAqwV2wsUqs yRmpUOZjL3545n+5h+HqoPbSS4criBG3lQ2/3rSeKqTcAQq/l71hBdJ/lZJnGYORsq poSd3A7X3sAvwH9WYiv0jelM= Received: from zn.tnic (pd95304da.dip0.t-ipconnect.de [217.83.4.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 92D1A40E0032; Thu, 16 Nov 2023 15:44:11 +0000 (UTC) Date: Thu, 16 Nov 2023 16:44:06 +0100 From: Borislav Petkov To: Linus Torvalds Cc: David Howells , 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 Subject: Re: [linus:master] [iov_iter] c9eec08bac: vm-scalability.throughput -16.9% regression Message-ID: <20231116154406.GDZVY4xmFvRQt0wGGE@fat_crate.local> References: <202311061616.cd495695-oliver.sang@intel.com> <3865842.1700061614@warthog.procyon.org.uk> <20231115190938.GGZVUXcuUjI3i1JRAB@fat_crate.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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 groat.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 (groat.vger.email [0.0.0.0]); Thu, 16 Nov 2023 07:44:45 -0800 (PST) On Wed, Nov 15, 2023 at 02:26:02PM -0500, Linus Torvalds wrote: > So the real issue is that we don't want an inlined memcpy at all, > unless it's the simple constant-sized case that has been turned into > individual moves with no loop. > > Or it's a "rep movsb" with FSRM as a CPUID-based alternative, of course. Reportedly and apparently, this pretty much addresses the issue at hand. However, I'd still like for the compiler to handle the small length cases by issuing plain MOVs instead of blindly doing "call memcpy". Lemme see how it would work with your patch... diff --git a/Makefile b/Makefile index ede0bd241056..94d93070d54a 100644 --- a/Makefile +++ b/Makefile @@ -996,6 +996,8 @@ endif # change __FILE__ to the relative path from the srctree KBUILD_CPPFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=) +KBUILD_CFLAGS += $(call cc-option,-mstringop-strategy=libcall) + # include additional Makefiles when needed include-y := scripts/Makefile.extrawarn include-$(CONFIG_DEBUG_INFO) += scripts/Makefile.debug -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette