From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751203AbeFCBiN (ORCPT ); Sat, 2 Jun 2018 21:38:13 -0400 Received: from shelob.surriel.com ([96.67.55.147]:51404 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751005AbeFCBiL (ORCPT ); Sat, 2 Jun 2018 21:38:11 -0400 Message-ID: <1527989886.7898.96.camel@surriel.com> Subject: Re: [PATCH] x86,switch_mm: skip atomic operations for init_mm From: Rik van Riel To: Song Liu , Andy Lutomirski Cc: Mike Galbraith , LKML , Kernel Team , Ingo Molnar , Thomas Gleixner , X86 ML , Peter Zijlstra Date: Sat, 02 Jun 2018 21:38:06 -0400 In-Reply-To: References: <20180601082811.4c0d33ba@imladris.surriel.com> <1527877328.7898.80.camel@surriel.com> <1527878882.4448.11.camel@gmx.de> <1527882207.7898.86.camel@surriel.com> <1527885324.7898.88.camel@surriel.com> <20180601181327.367f0fe3@imladris.surriel.com> <1527915842.7898.93.camel@surriel.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-h3yk7JwEJZpzw9XdwCzk" X-Mailer: Evolution 3.26.6 (3.26.6-1.fc27) Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-h3yk7JwEJZpzw9XdwCzk Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, 2018-06-03 at 00:51 +0000, Song Liu wrote: > > Just to check: in the workload where you're seeing this problem, > > are > > you using an mm with many threads? I would imagine that, if you > > only > > have one or two threads, the bit operations aren't so bad. >=20 > Yes, we are running netperf/netserver with 300 threads. We don't see > this much overhead in with real workload.=20 We may not, but there are some crazy workloads out there in the world. Think of some Java programs with thousands of threads, causing a million context switches a second on a large system. I like Andy's idea of having one cache line with a cpumask per node. That seems like it will have fewer downsides for tasks with fewer threads running on giant systems. I'll throw out the code I was working on, and look into implementing that :) --=20 All Rights Reversed. --=-h3yk7JwEJZpzw9XdwCzk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAlsTRn4ACgkQznnekoTE 3oPaMQgAq5xPTacrYUKSsta96lHdwFuAwwbsm3sLmSAj88nkB2afKkUMV/GNpTY8 owFFxx6vpTsxFSiOSSlYhUS0LStpkDRZMAJkYO/zU1IZHlL5k9prnZ6EuldHepSO 6ayoeI1MgVqbE1dWSDUclmiMywDJHbRjIrDYn6h0h8jAu0p4wNS2StFv2c73gstm V6eD6m3ZWPR8H6g0IdWX/owpC/rau85FHuhJ/GMzIOk6J2oDxuepIyAUNFV3BVZ/ XbIIK+mE5QE5gsK0HFKZNdwbFefcGDCK20EFjy/BJSMoCcuqDSlxLEyU4uGIS06g Y90baRuPnHxUTQv74gIT0Q4d2EgORw== =zqPx -----END PGP SIGNATURE----- --=-h3yk7JwEJZpzw9XdwCzk--