Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp702818pxb; Thu, 5 Nov 2020 10:39:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJy6BGD3qeuHsL68Y+Foob0M6ukSIvllnnjebmi21w9GkMarCKTbZu0q46jBQvjciCg7/QqK X-Received: by 2002:a17:906:a14c:: with SMTP id bu12mr3799732ejb.444.1604601580551; Thu, 05 Nov 2020 10:39:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604601580; cv=none; d=google.com; s=arc-20160816; b=pkoY6mD7b7tMrBtqVHPQdLOata21w8RWpSM9a7H7otz8Jss9XhL4FpKWSYOJMGxRuU Q5PA6dRvFzyMeTUDOMtmQyrFZwv01XUuFZNtxhc5ym/X1t3h6GsYELxOJAoIMPO6I3YB NzzwXDzutr6FzDmAo6hr8+XdY14EzX0MRQYJyR8GTTx6hKaX92+JjzFWKRziqgHsgtxX dmGBOMhFqTKvjS+yxfgoJdoB2s3cEutDmL+NMTiQ0WRgjcR6jk9gDan6wKzxN0UsCYe7 M3ntYLcrLsN49A+ZLsP11ZPudVjMtmssA4A/b0bSlrVbOCFjjBo1kJcU2ja0DU8U2OGW bTIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=R2JqSxD5FeNpFchLmibpz22i5tPINLMs1s3cxayerRk=; b=waPuWnBz1IUlZyywfOZfwT+WvjXZgRbJJ1FT11+ep17kxRsKxY2t+D4BKpBwwQXpf3 6AOKTDUiN0RrURkauYx/TPSG892EzrrTBvlUUEOorXybU4CWGO7t8/wvXCAqqHjkLZ4u LbrO+jnpsRv/Ss0chWQ+ZIgi1Ra8jmpZeZZtHgYbuYXDYrmysKgjFgnEeaLMOX9jxDkv 45yi9IjYSBt3dCjFyiULlxrghZaw6231rExpUQNl4GNYRD3ZV00FQZ0U0rcZXShWBTEv ywmWGxbq7jNwPrV6SO+tiuLUFo+V/Ov1j/zbcjJHJvjliBZmRRo+PxxbymbjyGxb34/3 eObw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=ZsWfXSph; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n3si1770052ejd.44.2020.11.05.10.39.17; Thu, 05 Nov 2020 10:39:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=ZsWfXSph; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731060AbgKESh3 (ORCPT + 99 others); Thu, 5 Nov 2020 13:37:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726801AbgKESh3 (ORCPT ); Thu, 5 Nov 2020 13:37:29 -0500 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A07DC0613CF for ; Thu, 5 Nov 2020 10:37:29 -0800 (PST) Received: by mail-lf1-x142.google.com with SMTP id s30so3757514lfc.4 for ; Thu, 05 Nov 2020 10:37:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=R2JqSxD5FeNpFchLmibpz22i5tPINLMs1s3cxayerRk=; b=ZsWfXSphEsFaPJLgC3WwNOJfG8aDtTfiIcsV3aoJbQ2jC9sOmi+LZ/UEBZeeBDv92m LXI0C5GeUu80b50KVyt2Phe35u4qkf0XjgOsc5XDS+XUocZPPRRufFeZ+9DPG4D9Q36b ssBxXHGcfyK3pFSdVmzxKCp4kNWMAw/ugIcP0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=R2JqSxD5FeNpFchLmibpz22i5tPINLMs1s3cxayerRk=; b=GyDNswWlZyJIgNXeDKGSG2KmZTRxz18JyjwOfGHrb+E0MtxMr6QfnoJyGu49LIXl/j BCAt6VTizSkHY0jrZQvPgyTacoC0dyFMxEKgoH61mc2F8tD1ESXq+7D9PL6EmAHnP+Eo DpDlKE8ICCsXkoBN55n7phFDDICPZJfFpEcoR5BgekTTNCzMcV520/ZVsbW5FPwptFiw TV5pf/Xk/dnnc5eihSH8c97go/4dR2LnGQ8zNAIY0w6YzM2Lg96zMlzWSdMwNIpcWdkH WKZ/IUApo4JKtn3h7shGp4BsW6mrmHbt1wCvhw4+khO6QJMgj0evrUwPmo9/yskYgetP YJzg== X-Gm-Message-State: AOAM5316TRII6WAEMbSZUpDtTEAw+7Awo9ArALcUYckl+nR/p4aRQjQZ JtLTHngXeJi92TT5s4BFIw2bVixIB7nlfw== X-Received: by 2002:a19:ec11:: with SMTP id b17mr1434450lfa.521.1604601447032; Thu, 05 Nov 2020 10:37:27 -0800 (PST) Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com. [209.85.208.173]) by smtp.gmail.com with ESMTPSA id d26sm214304ljj.102.2020.11.05.10.37.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Nov 2020 10:37:25 -0800 (PST) Received: by mail-lj1-f173.google.com with SMTP id v18so801899ljc.3 for ; Thu, 05 Nov 2020 10:37:24 -0800 (PST) X-Received: by 2002:a05:651c:110:: with SMTP id a16mr1488334ljb.285.1604601444134; Thu, 05 Nov 2020 10:37:24 -0800 (PST) MIME-Version: 1.0 References: <20201102091428.GK31092@shao2-debian> In-Reply-To: From: Linus Torvalds Date: Thu, 5 Nov 2020 10:37:08 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [LKP] Re: [mm/gup] a308c71bf1: stress-ng.vm-splice.ops_per_sec -95.6% regression To: Xing Zhengjun Cc: kernel test robot , Jann Horn , Peter Xu , LKML , lkp@lists.01.org, kernel test robot , zhengjun.xing@intel.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 5, 2020 at 12:29 AM Xing Zhengjun wrote: > > > Rong - mind testing this? I don't think the zero-page _should_ be > > something that real loads care about, but hey, maybe people do want to > > do things like splice zeroes very efficiently.. > > I test the patch, the regression still existed. Thanks. So Jann's suspicion seems interesting but apparently not the reason for this particular case. For being such a _huge_ difference (20x improvement followed by a 20x regression), it's surprising how little the numbers give a clue. The big changes are things like "interrupts.CPU19.CAL:Function_call_interrupts", but while those change by hundreds of percent, most of the changes seem to just be about them moving to different CPU's. IOW, we have things like 5652 =C2=B1 59% +387.9% 27579 =C2=B1 96% interrupts.CPU13.CAL:Function_call_interrupts 28249 =C2=B1 32% -69.3% 8675 =C2=B1 50% interrupts.CPU28.CAL:Function_call_interrupts which isn't really much of a change at all despite the changes looking very big - it's just the stats jumping from one CPU to another. Maybe there's some actual change in there, but it's very well hidden if so. Yes, some of the numbers get worse: 868396 =C2=B1 3% +20.9% 1050234 =C2=B1 14% interrupts.RES:Rescheduling_interrupts so that's a 20% increase in rescheduling interrupts, But it's a 20% increase, not a 500% one. So the fact that performance changes by 20x is still very unclear to me. We do have a lot of those numa-meminfo changes, but they could just come from allocation patterns. That said - another difference between the fast-cup code and the regular gup code is that the fast-gup code does if (pte_protnone(pte)) goto pte_unmap; and the regular slow case does if ((flags & FOLL_NUMA) && pte_protnone(pte)) goto no_page; now, FOLL_NUMA is always set in the slow case if we don't have FOLL_FORCE set, so this difference isn't "real", but it's one of those cases where the zero-page might be marked for NUMA faulting, and doing the forced COW might then cause it to be accessible. Just out of curiosity, do the numbers change enormously if you just remove = that if (pte_protnone(pte)) goto pte_unmap; test from the fast-cup case (top of the loop in gup_pte_range()) - effectively making fast-gup basically act like FOLL_FORCE wrt numa placement.. I'm not convinced that's a valid change in general, so this is just a "to debug the odd performance numbers" issue. Also out of curiosity: is the performance profile limited to just the load, or is it a system profile (ie do you have "-a" on the perf record line or not). Linus