From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Paul E. McKenney" Subject: Re: [PATCH 7/7] x86/mm: Switch to generic get_user_page_fast() implementation Date: Thu, 16 Mar 2017 12:11:02 -0700 Message-ID: <20170316191102.GM3637@linux.vnet.ibm.com> References: <20170316152655.37789-1-kirill.shutemov@linux.intel.com> <20170316152655.37789-8-kirill.shutemov@linux.intel.com> <20170316172046.sl7j5elg77yjevau@hirez.programming.kicks-ass.net> Reply-To: paulmck@linux.vnet.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20170316172046.sl7j5elg77yjevau@hirez.programming.kicks-ass.net> Sender: owner-linux-mm@kvack.org To: Peter Zijlstra Cc: "Kirill A. Shutemov" , Linus Torvalds , Andrew Morton , x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Dave Hansen , "Aneesh Kumar K . V" , Steve Capper , Dann Frazier , Catalin Marinas , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org List-Id: linux-arch.vger.kernel.org On Thu, Mar 16, 2017 at 06:20:46PM +0100, Peter Zijlstra wrote: > On Thu, Mar 16, 2017 at 06:26:55PM +0300, Kirill A. Shutemov wrote: > > +config HAVE_GENERIC_RCU_GUP > > + def_bool y > > + > > Nothing immediately jumped out to me; except that this option might be > misnamed. > > AFAICT that code does not in fact rely on HAVE_RCU_TABLE_FREE; it will > happily work with the (x86) broadcast IPI invalidate model, as you show > here. > > Architectures that do not do that obviously need HAVE_RCU_TABLE_FREE, > but that is not the point I feel. > > Also, this code hard relies on IRQ-disable delaying grace periods, which > is mostly true I think, but has always been something Paul didn't really > want to commit too firmly to. That is quite true! The only case where IRQ-disable is guaranteed to delay grace periods is when you are using RCU-sched, in other words synchronize_sched() and call_rcu_sched(). And even then, the CPU cannot be in the idle loop, cannot be offline, and cannot be a nohz_full CPU on its way to/from userspace execution. Thanx, Paul -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:44211 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753717AbdCPTLN (ORCPT ); Thu, 16 Mar 2017 15:11:13 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v2GJ4DfM071821 for ; Thu, 16 Mar 2017 15:11:07 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 297we8h2af-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 16 Mar 2017 15:11:07 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 16 Mar 2017 15:11:06 -0400 Date: Thu, 16 Mar 2017 12:11:02 -0700 From: "Paul E. McKenney" Subject: Re: [PATCH 7/7] x86/mm: Switch to generic get_user_page_fast() implementation Reply-To: paulmck@linux.vnet.ibm.com References: <20170316152655.37789-1-kirill.shutemov@linux.intel.com> <20170316152655.37789-8-kirill.shutemov@linux.intel.com> <20170316172046.sl7j5elg77yjevau@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170316172046.sl7j5elg77yjevau@hirez.programming.kicks-ass.net> Message-ID: <20170316191102.GM3637@linux.vnet.ibm.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Peter Zijlstra Cc: "Kirill A. Shutemov" , Linus Torvalds , Andrew Morton , x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Dave Hansen , "Aneesh Kumar K . V" , Steve Capper , Dann Frazier , Catalin Marinas , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Message-ID: <20170316191102.mI-zo0G4-2_Nt9DdewSLwBFIxvg48rDlSHn5XOV1Whc@z> On Thu, Mar 16, 2017 at 06:20:46PM +0100, Peter Zijlstra wrote: > On Thu, Mar 16, 2017 at 06:26:55PM +0300, Kirill A. Shutemov wrote: > > +config HAVE_GENERIC_RCU_GUP > > + def_bool y > > + > > Nothing immediately jumped out to me; except that this option might be > misnamed. > > AFAICT that code does not in fact rely on HAVE_RCU_TABLE_FREE; it will > happily work with the (x86) broadcast IPI invalidate model, as you show > here. > > Architectures that do not do that obviously need HAVE_RCU_TABLE_FREE, > but that is not the point I feel. > > Also, this code hard relies on IRQ-disable delaying grace periods, which > is mostly true I think, but has always been something Paul didn't really > want to commit too firmly to. That is quite true! The only case where IRQ-disable is guaranteed to delay grace periods is when you are using RCU-sched, in other words synchronize_sched() and call_rcu_sched(). And even then, the CPU cannot be in the idle loop, cannot be offline, and cannot be a nohz_full CPU on its way to/from userspace execution. Thanx, Paul