Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751959AbdGaIiC (ORCPT ); Mon, 31 Jul 2017 04:38:02 -0400 Received: from merlin.infradead.org ([205.233.59.134]:34504 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751264AbdGaIiB (ORCPT ); Mon, 31 Jul 2017 04:38:01 -0400 Date: Mon, 31 Jul 2017 10:37:46 +0200 From: Peter Zijlstra To: Avi Kivity Cc: Mathieu Desnoyers , "Paul E. McKenney" , maged michael , Andrew Hunter , gromer , linux-kernel Subject: Re: Udpated sys_membarrier() speedup patch, FYI Message-ID: <20170731083746.mggdh7pcdycjte2c@hirez.programming.kicks-ass.net> References: <20170727181250.GA20183@linux.vnet.ibm.com> <5c8c6946-ce3a-6183-76a2-027823a9948a@scylladb.com> <20170727194322.GL3730@linux.vnet.ibm.com> <5fe39d32-5fc1-3a59-23fc-9bdb1d90edf9@scylladb.com> <20170727203706.GO3730@linux.vnet.ibm.com> <1035920775.29109.1501189118277.JavaMail.zimbra@efficios.com> <1546253326.29115.1501189344518.JavaMail.zimbra@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 327 Lines: 6 On Mon, Jul 31, 2017 at 09:03:09AM +0300, Avi Kivity wrote: > I remembered that current->mm does not change when switching to a kernel > task, but my Kernlish is very rusty, or maybe it has changed. kernel threads do indeed preserve the mm of the old userspace task, but we track that in ->active_mm. Their ->mm will be NULL.