Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2799454rdb; Wed, 15 Nov 2023 10:46:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IGHQhetIBuP8kdzJUGBST9w8nhK0Fqg4OnvCWazqfI+iP42ViS1sQ+lOyQksnpnJLF1e/vz X-Received: by 2002:a05:6a00:3907:b0:6be:43f8:4e0b with SMTP id fh7-20020a056a00390700b006be43f84e0bmr12915605pfb.24.1700073992047; Wed, 15 Nov 2023 10:46:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700073992; cv=none; d=google.com; s=arc-20160816; b=CGohyOAh/D7fWpI14EBeeZoe5p5r3tIpgFmsJEPeyUdpYZ0bApCjsLTSfv/z3SNx9V azvQF+2B7vohs6tra/VYdqm8cQnTR+GP1fjWyFCdnvZE5DXsV00ziqJMzoGMcEwuY57i 4gpDZDeD4jEe+TJbBmFTkuytVzxveSBLaKihtsYwzxooaFtFzC/eeBQhHrrGrNDGYC8I bPnFSyD4PG6bXpMU96d1yrphzL1E/x08KxR91CQKtSXo4QuBkpdNDthq/sAUwP2tyLCw cqc8Di9/GvvZ4yc/oDOXvf4GDwyyJ9X34ajs+P+GF3I14rc0avN3O2whJTFOISAKDCaR bOeQ== 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=G+xxF8an19N64H/pRk8mbK+sEYYkdEuOsGzAOFfR0W0=; fh=RB/ZlumVm972zDIjxZjY7vSMUZow2KSaYK3pIi10DDM=; b=orkjvzlsqzjZMv7j6ABulZpFdyJ8K2kQRgTJaykzL4hxAeJYlNQk30PnX46r1Qo7/j aIAXPCGXAFpbKzHxJpymVOkB+h28AW7L+UDIuzlCx1uSoTXVNRThmCDau2CP5v4yfoFy mdaYj3az9wj5ZtjqV0FUcj1NZn9nMiYODt+BRmpUBVSskoZE5dMR5yNhuzQGnqpfARDG xxj2U1CbJ59uq+S/zdAAvRF5/rp+5nB3onR/Dnq0fLTX7ZWfV9jPB4NMbXgDQAoHl3qe WCdhTij2zTZR69OTDT8nCCtA09OWOxR9RhUZf3aO2Lqg7/t7PjJj7/LCnQt0oZtjXuZ3 KoNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=XHVnmuDu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id q8-20020a63e208000000b00563d9ff5157si10757514pgh.547.2023.11.15.10.46.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 10:46:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=XHVnmuDu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 8910080907BC; Wed, 15 Nov 2023 10:46:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229663AbjKOSqS (ORCPT + 99 others); Wed, 15 Nov 2023 13:46:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229589AbjKOSqQ (ORCPT ); Wed, 15 Nov 2023 13:46:16 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB0CDFA for ; Wed, 15 Nov 2023 10:46:13 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-9e62f903e88so822705066b.2 for ; Wed, 15 Nov 2023 10:46:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1700073972; x=1700678772; 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=G+xxF8an19N64H/pRk8mbK+sEYYkdEuOsGzAOFfR0W0=; b=XHVnmuDuxFhle5ZL2Opso8SQeXdxAe1zy5BpFZJrBttytyN+vzLpDytehGTGA856cY 9My50a+lDgbi3On8jpDyiXQeWt0YPGpZvDsaOWyNdg5sZW7Y6uPGnMbuc1Nwyy1jliZc Ta0WqRz3JRrcrL8evNnGDhnX0rWy4SDWRo+XY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700073972; x=1700678772; 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=G+xxF8an19N64H/pRk8mbK+sEYYkdEuOsGzAOFfR0W0=; b=PrwvYtwNNCUZpDdH7kj8BmB1aE8aT49qZiW3gMPimLQrho/qZtqQYZlieOzMGthAZv vNZ4Ge7NdAelu2tLznzWfitoAWbuBpjjga0imvWVpOFgys9n7s3AAY65OyopvuJuHkm7 cQzBuxjn/dDXX3l7mcpWMk0DUXQmjKT72EAKUtDbWBP5vZtacHRGQ2UyqFK6hIHXPmbv yQlBG+AIPQ0QVacKdI3M8zJjtZdNEmRUtn2svxaSf3OpBaE8EWDkufmuK9Ko003kc3ld ZRL8UxCyqdXSLqBMA3bjrNPxfvF1n3LcFh4aVjRBRIvglL6IVxy/T2LXxvlVBjNqvs2t NiGg== X-Gm-Message-State: AOJu0YxM4C5IqP16TtkCFmWG7CAPHjSlQh8AhgO7XefqW+CcRvTdBoEk C9Hz/WojcMelltb08H0pZ2FPHROVJvfrN1RlTrOSlVv9 X-Received: by 2002:a17:906:f84a:b0:9bd:a75a:5644 with SMTP id ks10-20020a170906f84a00b009bda75a5644mr10245988ejb.16.1700073972210; Wed, 15 Nov 2023 10:46:12 -0800 (PST) Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com. [209.85.208.43]) by smtp.gmail.com with ESMTPSA id ko14-20020a170907986e00b009dd701bb916sm7375201ejc.213.2023.11.15.10.46.11 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Nov 2023 10:46:11 -0800 (PST) Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-53db360294fso11063347a12.3 for ; Wed, 15 Nov 2023 10:46:11 -0800 (PST) X-Received: by 2002:a05:6402:1111:b0:53d:bc68:633a with SMTP id u17-20020a056402111100b0053dbc68633amr10573131edv.5.1700073971308; Wed, 15 Nov 2023 10:46:11 -0800 (PST) MIME-Version: 1.0 References: <202311061616.cd495695-oliver.sang@intel.com> <3865842.1700061614@warthog.procyon.org.uk> <4007890.1700073334@warthog.procyon.org.uk> In-Reply-To: <4007890.1700073334@warthog.procyon.org.uk> From: Linus Torvalds Date: Wed, 15 Nov 2023 13:45:54 -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 agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 15 Nov 2023 10:46:29 -0800 (PST) On Wed, 15 Nov 2023 at 13:35, David Howells wrote: > > That's not what I see. See attached for a dump of _copy_from_iter from my > kernel. It's just using REP MOVSB. Yeah, an unconditional REP MOVSB is not right either. That just means that it performs truly horrendously badly on some machines. Do you perhaps have CONFIG_CC_OPTIMIZE_FOR_SIZE set? That makes gcc use "rep movsb" - even for small copies that most definitely should *not* use "rep movsb". Anyway, you should never use CC_OPTIMIZE_FOR_SIZE as any kind of baseline. I'd actually love to use it in general, but it really makes gcc do silly things when it goes for size optimizations that make no sense at all (because it will go for size over anything else). It turns out that on FSRM machines (ie anything really new), it's ok, because even small constant-sized copies do work ok with "rep movsb", but there are cases where it's absolutely horrendously bad. Linus