Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp470033rdb; Fri, 17 Nov 2023 04:19:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IEQw5JXhghUuuhT+eiSBOwXk+eIFlISnjkP6UR7OHOh1yEasGoM+1Wq+a794EYzv1jp3VI/ X-Received: by 2002:a17:90b:38c2:b0:27d:1376:3ae1 with SMTP id nn2-20020a17090b38c200b0027d13763ae1mr17754953pjb.0.1700223553891; Fri, 17 Nov 2023 04:19:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700223553; cv=none; d=google.com; s=arc-20160816; b=zapk3XqXNz4GEZVMJPRVkDdrTd+xqivSZSeP/ZeyC8WTzCSGxcLQShLcXA50yycUM+ KmAkBqiczcTOcL5/yTywIqv/tdShm8iIPG+38U8SHaNeqTuIFE9CoOAQWG6SEDVdbm59 1qYvYCQWrOeteLgtgdJGhUQB9xk/C71PuFUbIpNaOkOpzBNnGFjAWsaMw/+3mKDtltls lv7urIx5nMiNw5iGG8jW4hwObGVjwWysOrAEA90sVSxofjX3GEwawvfT4IBxUj9R92U2 DyM2nmHnX18+Y2NhcVlxXai1jhOHMHuekCgyJ/JbMHdPxLy37X6CyemGa6L/5g5uUwIN fDuA== 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=uhqSMbAQ6tKqqSsHNkN4uyWbdflMXxxQkEYG27efuk0=; fh=Mg6v1eN4JhlD4VXZwMW9FBT9S7yDogrqwvCM51MvAxQ=; b=KwW8mPcI/gLJb3dVXw2TvBhoSOZGFuSLJrWnVgYyIKKgI7J1wcQLBkgY3/LTUpTqRm u32vut5vAL15JyKDt8VB84WRvbd/XWmge+94i7mNnw8lK65jeFw7d46jYo81JXPIDFXr vQqr1LM4D4y1QHiD19NJrl5gzwmnIL1RO7VZhbrN7bybVUhzRHazvyOHg7eOVnNLKcog 1hFPuNUsKyGFAJgS6pW+8yap5wzO153BXtp5YXFeF3PK3EynHe3RNg0FvQhsEUyQQaPM bFjU15NsAiFo96sxk/ZIgMOO73J9gnuURq4ykhNLNO2aCVkTOHSlexjIbRaegD8vyONX lB1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=TYfdUEeX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id q2-20020a170902edc200b001cdfbd8790esi1721415plk.173.2023.11.17.04.19.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 04:19:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=TYfdUEeX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 EF7C18304EEE; Fri, 17 Nov 2023 04:19:10 -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 S235798AbjKQMS7 (ORCPT + 99 others); Fri, 17 Nov 2023 07:18:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235776AbjKQMSu (ORCPT ); Fri, 17 Nov 2023 07:18:50 -0500 Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EF131BDC; Fri, 17 Nov 2023 04:18:36 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id A684240E0032; Fri, 17 Nov 2023 12:18:33 +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 6UHlTXeIIHUw; Fri, 17 Nov 2023 12:18:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1700223508; bh=uhqSMbAQ6tKqqSsHNkN4uyWbdflMXxxQkEYG27efuk0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TYfdUEeXscHP0Wfu7zGGHOAUc211uhIaY+OTbQcF9SWKsdU2+J4dftB1lAvWxGkr+ XDFiY9DOps5b4H4avJA/sMA1O9E38LPy0XtrVFPdCggIQEEns82iasP/gMpJ75O8Bq +6IYu22DjziXl+MTzldfmfjTG8inMP/1QEN2ndd1ijcdUHun7zYNhuYIdwgxN/rcxR 8c6WC9naejeLD4dgr3+rEk23kZJgqQIUfzJeY0O6uOzbBldhDf7ela/gO5MAwcbqQe 6ujT/ISyZQTGR8wpjbegYHrrd2z+W/OkjiN5ixRwRmDjzIlUfzMOlUu50g4T6vUg5S tMA/WNSJOJEOUl4nPfma4gbMiDFLt99fqq+GLIl+l7i3prbqJy3UMoCAiajTlxxDIG ezBc8/PU0PIqc1pIM6wNIwKearLHhR3u7+zVfjkH4xHRcAm3g6IP6XCZcGZ4RJ0nR4 uFgILE6GfgKTCvZCAOlTjm+8sd4wxlBmhouFv3r0DNf9mEziAImd4XJqwDgtL4odKC F/oMHkh/2kzhrp1OrpSaWQxUyqXfaMXDNpZhIUA6CL1TfkxwiBZ1H9SJAkizcr3rmu QIBrBrdZqIchep1+guL6vofXMwGG4uY6vjN07dVoCiYlxQ9dqDNNVVfk+6JyJZWVED kdaDj5Z29pmb9jhrWOriCNT0= 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 B3F4440E0030; Fri, 17 Nov 2023 12:18:06 +0000 (UTC) Date: Fri, 17 Nov 2023 13:18:05 +0100 From: Borislav Petkov To: Jakub Jelinek Cc: Linus Torvalds , 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, linux-toolchains ML , Richard Biener , Michael Matz , Jan Hubicka Subject: Re: [linus:master] [iov_iter] c9eec08bac: vm-scalability.throughput -16.9% regression Message-ID: <20231117121805.GEZVdZ/QhoeBytHf5o@fat_crate.local> References: <3865842.1700061614@warthog.procyon.org.uk> <20231115190938.GGZVUXcuUjI3i1JRAB@fat_crate.local> <20231116154406.GDZVY4xmFvRQt0wGGE@fat_crate.local> <20231117114421.GCZVdSFZ7DKtBol821@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]); Fri, 17 Nov 2023 04:19:11 -0800 (PST) + SUSE gcc folks. On Fri, Nov 17, 2023 at 01:09:55PM +0100, Jakub Jelinek wrote: > Sure. -mstringop-strategy affects only x86 expansion of the stringops > from GIMPLE to RTL, while for small constant sizes some folding can happen > far earlier in generic code. Similarly, the copy/store by pieces generic > handling (straight-line code expansion of the builtins) is done in some > cases without invoking the backend optabs which is the only expansion > affected by the strategy. > Note, the default strategy depends on the sizes, -mtune= in effect, > whether it is -Os or -O2 etc. And the argument for -mmemcpy-strategy= > or -mmemset-strategy= can include details on what sizes should be handled > by which algorithm, not everything needs to be done the same. Good to know, I might experiment with those. Thx. > > > IOW, my assumption was just broken, and using > > > "-mstringop-strategy=libcall" may well be the right thing to do. > > > > And here's where I'm wondering whether we should enable it for x86 only > > or globally. I think globally because those stringop heuristics happen, > > AFAIU, in the general optimization stage and thus target agnostic. > > -mstringop-strategy= option is x86 specific, so I don't see how you could > enable it on other architectures. Yeah, Richi just explained to me the same on another thread. To which I had the question: "Ah, it even says so in the manpage: x86 Options ... -mstringop-strategy=alg Ok, so how would the same option be implemented for ARM or some other backend? Also -mstringop-strategy=alg but it would have effect when generating ARM code, right? Which means, if I have it in the generic Makefile, it'll get automatically used on ARM too when gcc implements it. Which then begs the question whether we want that or we should let ARM folks decide when that time comes." I.e., what happens if we have this option in the generic Makefile and -mstringop-strategy starts affecting ARM expansion of the stringops from GIMPLE to RTL? Does that even make sense? > Anyway, if you are just trying to work-around bugs in specific compilers, > please limit it to the affected compilers, overriding kernel makefiles > forever with the workaround would mean you force perhaps suboptimal > expansion in various cases. Yeah, perhaps a good idea. gcc 13 for now, I guess... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette