Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp313899pxf; Thu, 1 Apr 2021 01:39:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzO9eHNc+6G9yPHNzYcvIjQsc0S5BUAysjp8p0l33j+CMXaE+othysqEHtg4i0rvN0JkDH4 X-Received: by 2002:a17:906:1a44:: with SMTP id j4mr8049182ejf.401.1617266386365; Thu, 01 Apr 2021 01:39:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617266386; cv=none; d=google.com; s=arc-20160816; b=HtqH5MePmwRCc0URxmCsi9HnW/ggNFC1lD7/me/pmPQCSpU/wJEex038EISwrRLWT7 MwL6F0DNLfobL52XH95b9Xzq+nCRZvoTETKpfFcPnpyxwRsXza32oD6PdowpUQzejojJ OsE54+LNYZTynj8wd6whxXa65ZgaSlDlgF+LUDmaPfORf5zpMmqwesyHv1AKDeyrfMjB 1Ax1Nzim+pXblrvKxwJmy76bWOIdDJI8EiGK+enWYVUuCuYvuMIKdgEnrOW1ddfoxQvs 2iZEj6ilLq+Lv+ScG7wPYD8Xr+5irkwIkuxGcsZfr6DiQygQ1aaiYkohYTtyDuBpz0Fv psxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=ZPqKGxRzyC78sn2YJXXabjGJrhRzLBscX0dvv6MAXvI=; b=gK4gcpLpyPT06jPq0p904AwjGNuxec91IeuWSgNTYiPrHOnQq1/bQLDOTzQr7vjiGW xsfPrf8s8RzdLeXruvNYPO6njnP00ks3BeH4gT72FW3EAtk9qUtGh8OwbrEVcTad80RX A/FLE/iR3rJuNxQCZ8PVijgcDG61twtRHBVqZD/t5Ugq2oBfH2iTdXX4DYgldXKMx5j+ Mf9DEoGSYepiFuzJVRETLidBvAOE8o5hJtcRzwIwoij+oJOqhaLOxIyjHIWVLmzvUrbT SHBgcYerFUe3bL+CJXs8q6xKGBIfHMXwDQvXgxKsp8B7u8ouDFiVUUCRoei8VJI1sxX0 CM/w== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ga16si3760195ejc.102.2021.04.01.01.39.23; Thu, 01 Apr 2021 01:39: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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233641AbhDAIia (ORCPT + 99 others); Thu, 1 Apr 2021 04:38:30 -0400 Received: from mx2.suse.de ([195.135.220.15]:48198 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233050AbhDAIiN (ORCPT ); Thu, 1 Apr 2021 04:38:13 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id CA413AE92; Thu, 1 Apr 2021 08:38:11 +0000 (UTC) Date: Thu, 1 Apr 2021 09:38:09 +0100 From: Mel Gorman To: Nadav Amit Cc: "Huang, Ying" , Linux-MM , Andrew Morton , LKML , Peter Zijlstra , Peter Xu , Johannes Weiner , Vlastimil Babka , Matthew Wilcox , Will Deacon , Michel Lespinasse , Arjun Roy , "Kirill A. Shutemov" Subject: Re: [RFC] NUMA balancing: reduce TLB flush via delaying mapping on hint page fault Message-ID: <20210401083809.GX15768@suse.de> References: <20210329062651.2487905-1-ying.huang@intel.com> <20210330133310.GT15768@suse.de> <87a6qj8t92.fsf@yhuang6-desk1.ccr.corp.intel.com> <20210331131658.GV15768@suse.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8GpibOaaTibBMecb" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --8GpibOaaTibBMecb Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 31, 2021 at 09:36:04AM -0700, Nadav Amit wrote: >=20 >=20 > > On Mar 31, 2021, at 6:16 AM, Mel Gorman wrote: > >=20 > > On Wed, Mar 31, 2021 at 07:20:09PM +0800, Huang, Ying wrote: > >> Mel Gorman writes: > >>=20 > >>> On Mon, Mar 29, 2021 at 02:26:51PM +0800, Huang Ying wrote: > >>>> For NUMA balancing, in hint page fault handler, the faulting page wi= ll > >>>> be migrated to the accessing node if necessary. During the migratio= n, > >>>> TLB will be shot down on all CPUs that the process has run on > >>>> recently. Because in the hint page fault handler, the PTE will be > >>>> made accessible before the migration is tried. The overhead of TLB > >>>> shooting down is high, so it's better to be avoided if possible. In > >>>> fact, if we delay mapping the page in PTE until migration, that can = be > >>>> avoided. This is what this patch doing. > >>>>=20 > >>>=20 > >>> Why would the overhead be high? It was previously inaccessibly so it's > >>> only parallel accesses making forward progress that trigger the need > >>> for a flush. > >>=20 > >> Sorry, I don't understand this. Although the page is inaccessible, the > >> threads may access other pages, so TLB flushing is still necessary. > >>=20 > >=20 > > You assert the overhead of TLB shootdown is high and yes, it can be > > very high but you also said "the benchmark score has no visible changes" > > indicating the TLB shootdown cost is not a major problem for the worklo= ad. > > It does not mean we should ignore it though. >=20 > If you are looking for a benchmark that is negatively affected by NUMA > balancing, then IIRC Parsec???s dedup is such a workload. [1] >=20 Few questions; Is Parsec imparied due to NUMA balancing in general or due to TLB shootdowns specifically? Are you using "gcc-pthreads" for parallelisation and the "native" size for Parsec? Is there any specific thread count that matters either in absolute terms or as a precentage of online CPUs? --=20 Mel Gorman SUSE Labs --8GpibOaaTibBMecb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEElcbIJ2qkxLDKryriKjSY26pIcMkFAmBlhnEACgkQKjSY26pI cMkZqwf/eRNLVsSneirGm6M0609dSk2Vg3k6VeqVCLyJCJu4kVFS3HRiG61MyUsv S0edPNITHFcJFpql9Tf7U7Z1tjQQ8oUZR2KJjIw/lrPBqJu+rW4hu1F1VYfeJHqG Q6zMR2rsFBNe6kR0hW64e3I8A1rUFVzLrc+HyPQN33UkOjuLZzptUOhXOgVC+80s KBIPdyAhmDpk80MHy0hwKufbyCH3PcJa1pQ6XIKDQ/na+eTPOgliZayQtKGPs4iV yghAaPdSNeYftM0NJ4M3WaizOgRTQGQFA6mTaOC+MMuN5h4fEPTcQgwxWbEhQBh4 4mOTvXRbxvhpkcirFa7DuOhsEO+mMw== =gTdL -----END PGP SIGNATURE----- --8GpibOaaTibBMecb--