From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC18EC4740A for ; Tue, 10 Sep 2019 12:11:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8249E2089F for ; Tue, 10 Sep 2019 12:11:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568117494; bh=9t/uxNlMq1chAbSJNg0XPICF3Vb8vlNP48o5k9NwMds=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=AwYA6m2RHmA3SgPIfdrVXb4zZGL0l4DD0ZLN531dmd5OtbT8IAQKCTAFeZN4b26z7 v21u18/Rc6ghISurtjmJyL/+iIxJpWRiX10fjCTanKzhLlNxZL9uApdBMYcLJeH6B7 haaVMMBo/JZ9n1caxQHMP/kaKyX+vPtDgw/iiWQ8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733303AbfIJMLd (ORCPT ); Tue, 10 Sep 2019 08:11:33 -0400 Received: from mx2.suse.de ([195.135.220.15]:36502 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732482AbfIJMLd (ORCPT ); Tue, 10 Sep 2019 08:11:33 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 668EEB150; Tue, 10 Sep 2019 12:11:31 +0000 (UTC) Date: Tue, 10 Sep 2019 14:11:30 +0200 From: Michal Hocko To: Alexander Duyck Cc: David Hildenbrand , Alexander Duyck , virtio-dev@lists.oasis-open.org, kvm@vger.kernel.org, mst@redhat.com, catalin.marinas@arm.com, dave.hansen@intel.com, linux-kernel@vger.kernel.org, willy@infradead.org, linux-mm@kvack.org, akpm@linux-foundation.org, will@kernel.org, linux-arm-kernel@lists.infradead.org, osalvador@suse.de, yang.zhang.wz@gmail.com, pagupta@redhat.com, konrad.wilk@oracle.com, nitesh@redhat.com, riel@surriel.com, lcapitulino@redhat.com, wei.w.wang@intel.com, aarcange@redhat.com, ying.huang@intel.com, pbonzini@redhat.com, dan.j.williams@intel.com, fengguang.wu@intel.com, kirill.shutemov@linux.intel.com Subject: Re: [PATCH v9 1/8] mm: Add per-cpu logic to page shuffling Message-ID: <20190910121130.GU2063@dhcp22.suse.cz> References: <20190907172225.10910.34302.stgit@localhost.localdomain> <20190907172512.10910.74435.stgit@localhost.localdomain> <0df2e5d0-af92-04b4-aa7d-891387874039@redhat.com> <0ca58fea280b51b83e7b42e2087128789bc9448d.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0ca58fea280b51b83e7b42e2087128789bc9448d.camel@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 09-09-19 08:11:36, Alexander Duyck wrote: > On Mon, 2019-09-09 at 10:14 +0200, David Hildenbrand wrote: > > On 07.09.19 19:25, Alexander Duyck wrote: > > > From: Alexander Duyck > > > > > > Change the logic used to generate randomness in the suffle path so that we > > > can avoid cache line bouncing. The previous logic was sharing the offset > > > and entropy word between all CPUs. As such this can result in cache line > > > bouncing and will ultimately hurt performance when enabled. > > > > So, usually we perform such changes if there is real evidence. Do you > > have any such performance numbers to back your claims? > > I'll have to go rerun the test to get the exact numbers. The reason this > came up is that my original test was spanning NUMA nodes and that made > this more expensive as a result since the memory was both not local to the > CPU and was being updated by multiple sockets. What was the pattern of page freeing in your testing? I am wondering because order 0 pages should be prevailing and those usually go via pcp lists so they do not get shuffled unless the batch is full IIRC. -- Michal Hocko SUSE Labs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A02ECC3A5A2 for ; Tue, 10 Sep 2019 12:11:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 745A12089F for ; Tue, 10 Sep 2019 12:11:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="XJSIZbJV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 745A12089F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cJzRhYHtya+XoBik9jx4TYxPBdTeq6AqwzShlXmFwLk=; b=XJSIZbJVz9ejn8 QUws2YiRticxk7OiYYMArD6y/M2o4UTwKcFxiLkrb4QasA8DDNbp0r0aCXYMHoLyC5+Ud6R3Mh33Y LmbpzbM+YOZ43oXRSgLaroeZ0o+FLO6TW9/WI2ZKnLMo1YqyTIe8lklwCxKsOLS2tMIJLMTuk+x2O L3M+2BvYCpfnYTxfWs09q9SfUB5GUPEYjPrI+wnfonBPFG8mnNs8oAsxe+TpxTUWV/SH9LOFBb/wv GijXtvQbC5OsQU0FCZSUYMSaSPLOROMoZb+jL9wHVgTWHrUcCYaLoyeBg0kcPk7ERLb++j7cgmZM1 rIKswtMTj2HXrDooZ8tQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i7ezi-0006k1-8Q; Tue, 10 Sep 2019 12:11:38 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i7ezd-0006j6-Q5 for linux-arm-kernel@lists.infradead.org; Tue, 10 Sep 2019 12:11:35 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 668EEB150; Tue, 10 Sep 2019 12:11:31 +0000 (UTC) Date: Tue, 10 Sep 2019 14:11:30 +0200 From: Michal Hocko To: Alexander Duyck Subject: Re: [PATCH v9 1/8] mm: Add per-cpu logic to page shuffling Message-ID: <20190910121130.GU2063@dhcp22.suse.cz> References: <20190907172225.10910.34302.stgit@localhost.localdomain> <20190907172512.10910.74435.stgit@localhost.localdomain> <0df2e5d0-af92-04b4-aa7d-891387874039@redhat.com> <0ca58fea280b51b83e7b42e2087128789bc9448d.camel@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <0ca58fea280b51b83e7b42e2087128789bc9448d.camel@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190910_051134_601896_70B6F2AA X-CRM114-Status: GOOD ( 12.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: yang.zhang.wz@gmail.com, pagupta@redhat.com, kvm@vger.kernel.org, mst@redhat.com, catalin.marinas@arm.com, Alexander Duyck , lcapitulino@redhat.com, linux-mm@kvack.org, will@kernel.org, aarcange@redhat.com, virtio-dev@lists.oasis-open.org, David Hildenbrand , willy@infradead.org, wei.w.wang@intel.com, ying.huang@intel.com, riel@surriel.com, dan.j.williams@intel.com, linux-arm-kernel@lists.infradead.org, osalvador@suse.de, nitesh@redhat.com, konrad.wilk@oracle.com, dave.hansen@intel.com, linux-kernel@vger.kernel.org, pbonzini@redhat.com, akpm@linux-foundation.org, fengguang.wu@intel.com, kirill.shutemov@linux.intel.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon 09-09-19 08:11:36, Alexander Duyck wrote: > On Mon, 2019-09-09 at 10:14 +0200, David Hildenbrand wrote: > > On 07.09.19 19:25, Alexander Duyck wrote: > > > From: Alexander Duyck > > > > > > Change the logic used to generate randomness in the suffle path so that we > > > can avoid cache line bouncing. The previous logic was sharing the offset > > > and entropy word between all CPUs. As such this can result in cache line > > > bouncing and will ultimately hurt performance when enabled. > > > > So, usually we perform such changes if there is real evidence. Do you > > have any such performance numbers to back your claims? > > I'll have to go rerun the test to get the exact numbers. The reason this > came up is that my original test was spanning NUMA nodes and that made > this more expensive as a result since the memory was both not local to the > CPU and was being updated by multiple sockets. What was the pattern of page freeing in your testing? I am wondering because order 0 pages should be prevailing and those usually go via pcp lists so they do not get shuffled unless the batch is full IIRC. -- Michal Hocko SUSE Labs _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel