Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2338965imm; Sat, 28 Jul 2018 14:57:23 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfr8CtSaYmclFmgDXfKGOW0wNWXUyufJhNkTqes/GMxMlZzM20YFAVPtoHE03B4GQ3a9cir X-Received: by 2002:a17:902:9a47:: with SMTP id x7-v6mr11030495plv.37.1532815043807; Sat, 28 Jul 2018 14:57:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532815043; cv=none; d=google.com; s=arc-20160816; b=QmWsKGZvciQxXyaDqA1/k9OqnQhCABWXe+v7z24SWpd5tzjQVJxAcb3t1BXlMzbOmM l0f25dfDKV5CjezTFixPxjtb1O2NWAqVmnERrHWhaoxfrL7xX9sdLA+2SZtbHq+PGp8X vEt8sDLk6L/YVfzy2JcyTSgKcKW/uZMK36QFhORh59VyrQpRlgW25Q8gIvQBMaWpe8ei v/Bx/X3jxwLNzGBzrKYS/Nm3UsfRIaEF5Jr7G4MW+0NAoRFRVHCfYpcN8i0ECsT0bMdw WooKwV0bs4Yeh7mpZkg1fTDFTMuqkIi05YEWLocUyi7xsD6rRf+FDWdXjl++voByuiP6 nwWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=KGaHpFscXOysh6UYRQd7h6MGHUixaY/dGhveuKzud+w=; b=i0AxuJoInGR9niwGCYv6g5HGtWJNlScTMNuGyJ9Ut7BRJSuPtBsLI6l7VPXUtJezm8 1eGrBEx1Fnm18Mqou5l7tYs2tnlsxtdgJGad+kWSBCLKqd0vTegxJPlgcrK4TlbeQDuv W1TpQJHMd1KliMmsHMXopfULv3uWVKQN0WMlF2+KjLfqbpGXB6n2hfyIpqQdP2I0Nz5j lXuypeXMXz6jK0L5/LAj7WxNNujNh/pKH4L6jimlyI3vT7FPO74qn8AjhDPXhWbw3N9G DHnP41ZxJUkGDe6uDhwV7C+6Rfndz7PaWpAoLDIS6JzaXatSjAz348CyRkBuMgpK1Wyy HXqQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w14-v6si7174867pgh.14.2018.07.28.14.56.33; Sat, 28 Jul 2018 14:57:23 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731336AbeG1XWN (ORCPT + 99 others); Sat, 28 Jul 2018 19:22:13 -0400 Received: from shelob.surriel.com ([96.67.55.147]:44050 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731299AbeG1XWN (ORCPT ); Sat, 28 Jul 2018 19:22:13 -0400 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1fjXA0-0000QZ-Hg; Sat, 28 Jul 2018 17:54:00 -0400 From: Rik van Riel To: linux-kernel@vger.kernel.org Cc: kernel-team@fb.com, peterz@infradead.org, luto@kernel.org, x86@kernel.org, vkuznets@redhat.com, mingo@kernel.org, efault@gmx.de, dave.hansen@intel.com, will.daecon@arm.com, catalin.marinas@arm.com, benh@kernel.crashing.org Subject: [PATCH 0/10] x86,tlb,mm: more lazy TLB cleanups & optimizations Date: Sat, 28 Jul 2018 17:53:47 -0400 Message-Id: <20180728215357.3249-1-riel@surriel.com> X-Mailer: git-send-email 2.14.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series implements the cleanups suggested by Peter and Andy, removes lazy TLB mm refcounting on x86, and shows how other architectures could implement that same optimization. The previous patch series already seems to have removed most of the cache line contention I was seeing at context switch time, so CPU use of the memcache and memcache-like workloads has not changed measurably with this patch series. However, the memory bandwidth used by the memcache system has been reduced by about 1%, to serve the same number of queries per second. This happens on two socket Haswell and Broadwell systems. Maybe on larger systems (4 or 8 socket) one might also see a measurable drop in the amount of CPU time used, with workloads where the previous patch series does not remove all cache line contention on the mm. This is against the latest -tip tree, and seems to be stable (on top of another tree) with workloads that do over a million context switches a second.