Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp473074imm; Sat, 8 Sep 2018 02:39:55 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbLqCEapDC3JMhMMUi6UtvgN746rnCZd8WfRulz3fKwB72akJCvCPBSA/KW0uMV6Lm+G5Qb X-Received: by 2002:a63:f:: with SMTP id 15-v6mr12738663pga.430.1536399595912; Sat, 08 Sep 2018 02:39:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536399595; cv=none; d=google.com; s=arc-20160816; b=eFPWFqqp44j3zN8B8PcQFdbmSw3YHN9rD4yP1US//r8hYHuzp1JxQ4wlmvJRRzuP1Z HRE6nvA29zrTW436CA54KP5Smzy1Y9hCF5Lli1q5AWCbewsuHHzjtjLPjhKlwaKb9Pci RtEzpOyJ/rYQvMg/YceZ0+t7G6BdU8JBH/VN6wjup8wbj2IPMncVmyOickhQXpL+aOPd Vl5dtKZ/m8AQclBKP/PUIg5YAV/r/Y5LUY9z0+ICciMU+v1oXDkMriyRRslfTm5pyIv4 ma43ve+dm+FJ3+qZPQTQTgKBfoxiqcPlEf/MdJ/Pj8aYkFy58NxTh/o006DgPQjbuqyx tgsg== 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; bh=arSLLkz4x4r5ZOaLr/shpRPAdoQhpUrAAuhtA1wLLIg=; b=UbJIvfvtVV/ykzsifnlYnxcv2bU0P0E9YucImPpbCJL0mKIwwPfmknsDW46UPzbq2G zbuRhldmQ14yOJUKd1KU4cGKlS0zqvWSihxD0MiUAK7wmHTfyiKKn+apuB7W3BIr2GFz kO1a+DuPRbaM/T/+REKwhl8lmipED2WCpGjGAFjZs5YmISdiAFXtqU72731zyz8hXEIf ibB0r5PyzmL4F8mOMSUNeFojwLvRH485ediu14AgWZLySlOiYCzIRyWVXSL0Et/9jfng yEY210WaNbEnC8yilJIWgiqEtqOomqq5ZMWkCTMRaO6Q3Uoe4NEp0cJX7CBPr/cOsU88 LnRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Az0mgWn8; 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 c17-v6si10947023pge.273.2018.09.08.02.39.40; Sat, 08 Sep 2018 02:39:55 -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=Az0mgWn8; 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 S1726687AbeIHOXZ (ORCPT + 99 others); Sat, 8 Sep 2018 10:23:25 -0400 Received: from merlin.infradead.org ([205.233.59.134]:34750 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726444AbeIHOXZ (ORCPT ); Sat, 8 Sep 2018 10:23:25 -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=arSLLkz4x4r5ZOaLr/shpRPAdoQhpUrAAuhtA1wLLIg=; b=Az0mgWn8hDo9fm8+uxhioq/vi w050KsCMIBCqTM457hjCP0p5fLKslVwWeXWymJLB7QZs6EKrljV2m5IbH3LGSzd0tUkodB4nFpW0m E1+9iGiCeQgpcAAA5gu24llVa2j8Mx/OCArJYN9AyVt4GGOYDWH4o8ldxRbU2B5+8cNE4tjzYKOil 7iMultp0Mw1N+ASr9BjZMlINWxvsQWCHoa/5E5pByyMta6tNWuh5I7/tuCfLOrFj3TG85uovZkgD2 Y0o5cFczxRkdIQoGWe4C/MyFjMk7PkHuN324eCdu1nz788rvLsCAY6h5C/HX/f5teo6AGUzGB+A8H 3xt6q/EWg==; 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 1fyZgv-0003jI-2t; Sat, 08 Sep 2018 09:38:09 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id EE8C42027331B; Sat, 8 Sep 2018 11:38:05 +0200 (CEST) Date: Sat, 8 Sep 2018 11:38:05 +0200 From: Peter Zijlstra To: Dave Hansen Cc: linux-kernel@vger.kernel.org, sean.j.christopherson@intel.com, tglx@linutronix.de, x86@kernel.org, luto@kernel.org Subject: Re: [RFC][PATCH 3/8] x86/mm: break out user address space handling Message-ID: <20180908093805.GO24082@hirez.programming.kicks-ass.net> References: <20180907194852.3C351B82@viggo.jf.intel.com> <20180907194857.93621ACE@viggo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180907194857.93621ACE@viggo.jf.intel.com> 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 Fri, Sep 07, 2018 at 12:48:57PM -0700, Dave Hansen wrote: > +static noinline void > +__do_page_fault(struct pt_regs *regs, unsigned long hw_error_code, > + unsigned long address) > +{ > + prefetchw(¤t->mm->mmap_sem); > + > + if (unlikely(kmmio_fault(regs, address))) > + return; > + > + /* Was the fault on kernel-controlled part of the address space? */ > + if (unlikely(fault_in_kernel_space(address))) > + do_kern_addr_space_fault(regs, hw_error_code, address); > + else > + do_user_addr_space_fault(regs, hw_error_code, address); > +} How about: do_{user,kernel}_fault() ? That _addr_space_ is just a lot of typing for no real benefit imo.