Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp2293881pja; Thu, 26 Mar 2020 12:47:41 -0700 (PDT) X-Google-Smtp-Source: ADFU+vth/zMI5NFMJIGKzkT+rkZGl0oLhXq1K6b4wQ8RNVZUJhvDB7VWeO0bSPEjKlBX3k8uCNqf X-Received: by 2002:a9d:6b8b:: with SMTP id b11mr1154224otq.119.1585252061834; Thu, 26 Mar 2020 12:47:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585252061; cv=none; d=google.com; s=arc-20160816; b=VPpJ68bnbeYB6Ov/5UA1x0Nu2Oqo5BYy+5dVjtqxHItWy/1q/AqH+myh081sb/BH5R +CBJCKyJ7sK/zwWluKmQUQDUd3wi4NdwC1ZggUOQShdx7OCh1irTnAjKgWpEzpzTj7w1 LyS/SGfqi+Hp/EYX2qCJYqkYbkc002GiMhI/+PTdqmah8xsg0bhbb92SwynQP3TwcbfE G5RL70D7fKYldwNPWJyBV+tdaJA+SeNuYmryCGieG+1yPap8ok2t58HvUroDRwKgk2Dh kQMw1/kEwODA4B60gerAlunfNMR6l7K6WQXFCHNz4lWi5qZnZpc7qowdNDc5foa5QUJ6 S19g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=5Q75xKuG8dNiikuKrJ6gtT2+XtHbO0iF+mSgFEjuqec=; b=WvRs1wIqwIjVtfTZnSr1R+buRZ5/+8ebXud2BOIMv12mpDWGwHaebPBB+BVATIj0dn FIJDwUxCYgr6yFjbUlF6j4FKKP5s2ewt8m/LKt64p+XeTmF3cKcW/Im0IJubueyg0D7g paX4g+lPWQP7Ofm0+wna9ucHTDUZ1TQgFloca0w98ECj7/dmS7geTgvzTQu7ysYtksTV qtoq5lynH7dPsmU7sqrYWzSymtL1fTxZTvKXI4qCL2VrMgYxHfO6XjvRiMfnses/5Vvq ERaJ/YfdIE6VorEd3HOGrs9+hZPkM8vAnlerUsecD2ltPlaJVZvtAFVB20uUPBNgYDiO 1EKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="I3dsSZ/V"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n3si1359677oib.163.2020.03.26.12.47.28; Thu, 26 Mar 2020 12:47:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="I3dsSZ/V"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727612AbgCZTqR (ORCPT + 99 others); Thu, 26 Mar 2020 15:46:17 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:38782 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726270AbgCZTqQ (ORCPT ); Thu, 26 Mar 2020 15:46:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=5Q75xKuG8dNiikuKrJ6gtT2+XtHbO0iF+mSgFEjuqec=; b=I3dsSZ/VC/OCv4Rf0nN5VG8nW8 HKmro5XNVh59WfmUxeEPZ/wS8t4aUqMHw2+TJs2LszDUeAQZRS18Y/BilQw8+dq0xas1LjFFVnFvw iFquPsMHAyCjziniuC7/bNpzhqbCTfLigz6hlc49eXY4xFZuMPc34TQIeOJmuZ1VBD4wGo/z6Dph7 E19TICePUDuBElBwAwzD/bYa2ht7GYDfmD8KbtIGhM9ThnGraV6RzngBBTD9euLKjDwGDAy5QlH6W 8UgW5aQrcIRLKWfFS6IZCRzx9yObXh/Hx5I7y5K19S567Zzm0f2CUKdWoJbHRgdRKwkRh6vT58Y2s OqT76UeA==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jHYSB-0003Sv-NO; Thu, 26 Mar 2020 19:46:11 +0000 Date: Thu, 26 Mar 2020 12:46:11 -0700 From: Matthew Wilcox To: "Kirill A. Shutemov" Cc: Michal Hocko , Cannon Matthews , Andi Kleen , Mike Kravetz , Andrew Morton , David Rientjes , Greg Thelen , Salman Qazi , linux-mm@kvack.org, linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH] mm: clear 1G pages with streaming stores on x86 Message-ID: <20200326194611.GN22483@bombadil.infradead.org> References: <20200307010353.172991-1-cannonmatthews@google.com> <20200309000820.f37opzmppm67g6et@box> <20200309090630.GC8447@dhcp22.suse.cz> <20200309153831.GK1454533@tassilo.jf.intel.com> <20200309183704.GA1573@bombadil.infradead.org> <20200311005447.jkpsaghrpk3c4rwu@box> <20200316101856.GH11482@dhcp22.suse.cz> <20200316121955.tqmhu57evzafc2cl@box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200316121955.tqmhu57evzafc2cl@box> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 16, 2020 at 03:19:55PM +0300, Kirill A. Shutemov wrote: > On Mon, Mar 16, 2020 at 11:18:56AM +0100, Michal Hocko wrote: > > While this might be true, isn't that easily solveable by the existing > > ALTERNATIVE and cpu features framework. Can we have a feature bit to > > tell that movnti is worthwile for large data copy routines. Probably > > something for x86 maintainers. > > It still need somody to test which approach is better for the CPU. > See X86_FEATURE_REP_GOOD. How about inverting the sense of the bit? Set it on Broadwell-and- earlier CPUs, where it definitely improves performance by a huge amount, and new microarches can set it if it still outperforms rep mov?