Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3426850imm; Tue, 17 Jul 2018 04:48:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfAUWHfcS/Dls1swzxSXWJdEoP+AuRwEmAoiH7vvfGGkub6M3CZse50LbLdD7Zxxwa59w0s X-Received: by 2002:a62:b917:: with SMTP id z23-v6mr335201pfe.131.1531828139701; Tue, 17 Jul 2018 04:48:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531828139; cv=none; d=google.com; s=arc-20160816; b=KMmkYvrszdVIgL7OwtPcAYbcxoAOogGfd4zidI/WRtQ/xJYsM63bUqBp9NF7BKhXU1 E5NjP0v1WHLQWyIK1QlRrt9LHOs8us37pM54lpbNFWdWtzNYkGTS3OlO5tja08yeAGXt 674BVqz8l5xxEgDkPfcLU8ZuSzLozHxiFz704Oqkc7O26xPlt2b3TTM6kuZTuwYbrw/N gvKZL/UilTLi6bIikiKNM5NqVfZecwSPY9vN9XApFSJhYqHV0XwrlRF1wLi/bg66P2D5 CETaDIk2T0DhBkywQxAyRqhxwY8zbgxXi6b31cNw0MUSb65KEJFGrw2odMaWpCOnwSIe fodw== 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:dkim-signature:arc-authentication-results; bh=AokKbi9g2IwII5/rkW0akHHOVhjABwC9CgfOqBM5VAE=; b=B4c3llt1IoDIVXVuV0v8is3/dFDvK2iKGus0YnZt1dyF/fLZtKuVwtZvH73/9ygt7N G+fXM2uvORIp4HqE/4uBUNrPxu8r1pvVJ8GO44MjtDlaByiwn6O6EaqpVYN4kz7lWchM u6HTVFUzj13M5MFbnmb9FHv6pbkfmjOib6j9JIWPfV1CmwW4EOgWnPGWab50tTI+Dn/M OqGMxRB+zIS+ShogdqGY6SB2+VeYYI+nu+CX430o00kCxHPtXFO6wgTEq0i+k9SPl48C SJm/ST2mFCuDVJ/eAaz9Zc5ejxQfybLQt0PELNYtSeY+pye2u6rhYClYW0kymsebZJDx 30oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=aFTs6OZO; 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 u11-v6si725325pgg.683.2018.07.17.04.48.44; Tue, 17 Jul 2018 04:48:59 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=aFTs6OZO; 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 S1731347AbeGQMTN (ORCPT + 99 others); Tue, 17 Jul 2018 08:19:13 -0400 Received: from merlin.infradead.org ([205.233.59.134]:40264 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730736AbeGQMTN (ORCPT ); Tue, 17 Jul 2018 08:19:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=AokKbi9g2IwII5/rkW0akHHOVhjABwC9CgfOqBM5VAE=; b=aFTs6OZOTgJ0pTBbCgkIrfcdB 1YZzFdQfdYx0UFiCBIlgccut08bS/f9VJVZ7c/PGabR8U/Y2/+yZCuPMoTV7gfogbttLLJsgLg7H6 6nAb/fxA1JUfUTr5XA0aHqhKdexehonvxb5w/cjmt8f7OGMBljl6+VnwvFxSjDuIjCIW8ZymUYuec z5AWY9vKTNXDyjyQ8BmrgARRulXOb1VA8gakfV/gLuHfMyyf6f/0Up+QvEnrL+3IRHDdBgztnuvqc YN75yQOy2fJR+QGJPFXbJzptzHmUenRnXnB/Uaq58QNgWXneOsPeQTYKMCoMmRdkQCF3i9gYOPbYA pC7JIEBZw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1ffORM-0008SY-Us; Tue, 17 Jul 2018 11:46:49 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id AA6B520275F36; Tue, 17 Jul 2018 13:46:47 +0200 (CEST) Date: Tue, 17 Jul 2018 13:46:47 +0200 From: Peter Zijlstra To: tglx@linutronix.de, mingo@kernel.org, songliubraving@fb.com, torvalds@linux-foundation.org, riel@surriel.com, hpa@zytor.com, linux-kernel@vger.kernel.org, dave.hansen@intel.com Cc: linux-tip-commits@vger.kernel.org Subject: Re: [tip:x86/mm] x86/mm/tlb: Leave lazy TLB mode at page table free time Message-ID: <20180717114647.GW2476@hirez.programming.kicks-ass.net> References: <20180716190337.26133-3-riel@surriel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 17, 2018 at 02:34:07AM -0700, tip-bot for Rik van Riel wrote: > diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h > index 3063125197ad..e811ef7b8350 100644 > --- a/include/asm-generic/tlb.h > +++ b/include/asm-generic/tlb.h > @@ -303,4 +303,14 @@ static inline void tlb_remove_check_page_size_change(struct mmu_gather *tlb, > > #define tlb_migrate_finish(mm) do {} while (0) > > +/* > + * Used to flush the TLB when page tables are removed, when lazy > + * TLB mode may cause a CPU to retain intermediate translations > + * pointing to about-to-be-freed page table memory. > + */ > +#ifndef HAVE_TLB_FLUSH_REMOVE_TABLES > +#define tlb_flush_remove_tables(mm) do {} while (0) > +#define tlb_flush_remove_tables_local(mm) do {} while (0) > +#endif Is there a reason these are not inline functions, which gets us type checking and the like?