Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1496741ybt; Mon, 15 Jun 2020 01:36:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhAWHHqTNtacC1UWgF2herl3EhexiEhd3Do8Jq1c3wUzAhfqmi7M752o7xsADJBGCaX8ba X-Received: by 2002:aa7:d7cc:: with SMTP id e12mr22104161eds.70.1592210206313; Mon, 15 Jun 2020 01:36:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592210206; cv=none; d=google.com; s=arc-20160816; b=pKG8WA6yhuAAOTaHphEY/BrQVkR9XeAR2Wh9TAETQLYydQHppGzZNJ/m346QedE2Ti cX3ejkiOPg4v/GywgFZFcCCvYYkN5XNBeT3Ge7Rpw93nIUJxYBlQDe6fiYjeLsxMfZMI TQKmHdFayZ0yl7mdMrWZifAQ9D0eORBTVn9nkDk41ZH1oj+P0N/23ddOMYFoaDRC5eBq 47wCs1sdtZX5fY2Mi17/+PxmPwHe4d2KoOU0eTi9WL/hSCo3fMdYVqkcGUZdZMICkT4F DqQcJcLmSRA2cjVVj1VGRwZWVajuIppyZFi7pKgyBwtZLe+gwM+8u5qQ+jOqPFdEU25H 7rOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=OsRC3+iculxaym0leFATzB5yQgIdgWWekdQg1luvenA=; b=cPqQcED7C7EWB44vlVqfL5qS2D6QNRdHVn0zCONFM2bn9AiyE2TWn2tEqoNBty+n6N RY7oSmig6SkazSg+giJdGjA3H1L92ovavI59SFJJibEQidRV+iYO2fgQtAOmyZSeZjXd dt25OuLPPQMNe+wRHbTbum4HAFMvGsm14jiEAdGABPYSevr2OTAKOPeLacps454apCDf dt0EQNY1UDdu71MSWrLV5oeiG9FunzwmoADe6a18ouz7gtv3A7yZGwpW+9phKhRJrLqO KpzhmFfR9nOepKUsLscE/mlxMQ+W6eMWjueNK//COqXEAFX7nHti1wYUaiRtLv51E8mJ BvZw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b3si9443889edn.338.2020.06.15.01.36.23; Mon, 15 Jun 2020 01:36:46 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729097AbgFOIeE (ORCPT + 99 others); Mon, 15 Jun 2020 04:34:04 -0400 Received: from mga02.intel.com ([134.134.136.20]:1590 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728603AbgFOIeD (ORCPT ); Mon, 15 Jun 2020 04:34:03 -0400 IronPort-SDR: lAullL/FbvO+TsCEL8v9QCxnA0sCmQGqtUY95hb90btF4mjhXzst0vC2y1KGFk/Sx9+c1yZmiA xWp56ZsjN4AQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2020 01:34:03 -0700 IronPort-SDR: 3aDVkJB6ADSz49M5mWcKTOkpfYjmO9ZBmLCDtKQ1/Uc3dcUfFAL+vxEkPHmSRmCjQhxSATyf3f 9aYueu8o/Ohg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,514,1583222400"; d="scan'208";a="382448845" Received: from shbuild999.sh.intel.com (HELO localhost) ([10.239.146.107]) by fmsmga001.fm.intel.com with ESMTP; 15 Jun 2020 01:34:00 -0700 Date: Mon, 15 Jun 2020 16:33:59 +0800 From: Feng Tang To: Jann Horn Cc: Linus Torvalds , Christoph Hellwig , Oleg Nesterov , Kirill Shutemov , Jan Kara , Andrea Arcangeli , Matthew Wilcox , LKML , lkp@lists.01.org Subject: Re: [LKP] Re: [gup] 17839856fd: stress-ng.vm-splice.ops_per_sec 2158.6% improvement Message-ID: <20200615083359.GC57549@shbuild999.sh.intel.com> References: <20200611040453.GK12456@shao2-debian> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 15, 2020 at 09:32:41AM +0200, Jann Horn wrote: > On Thu, Jun 11, 2020 at 10:24 PM Linus Torvalds > wrote: > > > > On Wed, Jun 10, 2020 at 9:05 PM kernel test robot wrote: > > > > > > FYI, we noticed a 2158.6% improvement of stress-ng.vm-splice.ops_per_sec due to commit: > > > > > > commit: 17839856fd588f4ab6b789f482ed3ffd7c403e1f ("gup: document and work around "COW can break either way" issue") > > > > Well, that is amusing, and seeing improvements is always nice, but > > somehow I think the test is broken. > > > > I can't see why you'd ever see an improvement from that commit, and if > > you do see one, not one by a factor of 20x. > > FWIW, if this is the testcase: > Yes, functionally this is the same file as what is used by 0day, though 0day use a stable release tar ball. Thanks, Feng > then that testcase is essentially testing how fast vmsplice() is when > called in a loop on an uninitialized mmap() mapping. So before that > commit, I think it will create zeropage PTEs in the first iteration > (and zeropage PTEs are _PAGE_SPECIAL, see do_anonymous_page()). And > get_user_pages_fast() bails out in gup_pte_range() if pte_special(). > So that testcase was always hitting the GUP slowpath. > But now the first iteration will force the creation of a normal RW > PTE, so all following iterations can go through the GUP fastpath. > > So in summary I guess the test was just really slow up until now > because it was hitting a slowpath that you wouldn't hit during normal > usage? At least for vmsplice(), writing uninitialized pages doesn't > really make a whole lot of sense... > _______________________________________________ > LKP mailing list -- lkp@lists.01.org > To unsubscribe send an email to lkp-leave@lists.01.org