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=-3.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 834B2C28CF6 for ; Wed, 1 Aug 2018 10:03:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 42CEA208A2 for ; Wed, 1 Aug 2018 10:03:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 42CEA208A2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=surriel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389109AbeHALsC (ORCPT ); Wed, 1 Aug 2018 07:48:02 -0400 Received: from shelob.surriel.com ([96.67.55.147]:55884 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389005AbeHALsC (ORCPT ); Wed, 1 Aug 2018 07:48:02 -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 1fkny6-00010M-8b; Wed, 01 Aug 2018 06:02:58 -0400 From: Rik van Riel To: linux-kernel@vger.kernel.org Cc: kernel-team@fb.com, mingo@kernel.org, peterz@infradead.org, luto@kernel.org, x86@kernel.org, efault@gmx.de, dave.hansen@intel.com Subject: [PATCH v2 0/11] x86,tlb,mm: more lazy TLB cleanups & optimizations Date: Wed, 1 Aug 2018 06:02:44 -0400 Message-Id: <20180801100255.4278-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. V2 of the series uses Peter's logic flow in context_switch(), and is a step in the direction of completely getting rid of ->active_mm.