Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6001398ybe; Tue, 10 Sep 2019 12:00:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqxIqfJW2pEM28SzVfjgwd3Km558aAivBI06YQvJgp3JtW1pIaASezkWEqXT0+Br704P+UC8 X-Received: by 2002:a17:906:235a:: with SMTP id m26mr26742988eja.297.1568142010963; Tue, 10 Sep 2019 12:00:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568142010; cv=none; d=google.com; s=arc-20160816; b=laCliiHHfiSXzAdixOE8NSgT77BV0V3+jp4CXpmuCkwkO6vrRRd83L8klKgiaJEFTH +509+mTRbYtjZhJApcmp8JxdmEd/4/02fDT5ryc5c0uF6Q+1YsahVNKZkQjFre3C76TQ vrqvbd/xEfdbUbfv4869d3wyDhajiHUb70c0+48eqY4gva/KF91/VyWY/yAV6XRSrGB7 6VxD8zdM9Q25jCRUw3PY87cwT2bbCN82jGbJ0A9kDkzVRVWAKxBLELy96DRoyO61XWHN jMKXcmmbQSTbRP+nnyDb2VnQ3K3kNgDHK02AE4iFn7YZ8mv/6qhN2fKcBM4o6yZwxkFL 3WLg== 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; bh=Q7p2fIxqUqnQH1n3Qc4/DFtMCAKovg7VKbuR+aj6owQ=; b=U10cDtkd/ImVB/J6AiZIwD61Gcijile87zVJCZZ6c1nZ19zfKQ22lvJxY2xjFDYXwN Y91UAxaZmtEHR0ucJC9FIeVIj0i4nvPxiHq7BVVPbBSRgAwdjavvtSoaswh4R1Rr8fFI 7PBkSRv3F5sKDzj0zpJf+ArxuXtylkZswrYG/jj8HjCo76GhFO2jLcYlbz+OFNRXsI5o giAbMiPoZ85aF5dBEKk7a0qStfIPyGSNXg7ip3OKzO7AX2CpuqxUUwTy2ltQL4w8CmbI +fV8ySWojO/RxBJH3mcaCWHjADLRlwMaupPl5ZPocIpxEHxelDPbEcwgg7RAZf3gmBXq 3QOA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rl2si1718912ejb.230.2019.09.10.11.59.46; Tue, 10 Sep 2019 12:00:10 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733198AbfIJMLd (ORCPT + 99 others); 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