From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751225AbdJDVhm (ORCPT ); Wed, 4 Oct 2017 17:37:42 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:43510 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751133AbdJDVhl (ORCPT ); Wed, 4 Oct 2017 17:37:41 -0400 Date: Wed, 4 Oct 2017 14:37:34 -0700 From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com, oleg@redhat.com Subject: [PATCH tip/core/rcu 0/3] Updates to sys_membarrier for v4.14 to add registration Reply-To: paulmck@linux.vnet.ibm.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17100421-0056-0000-0000-000003D3C882 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007843; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000233; SDB=6.00926536; UDB=6.00466102; IPR=6.00706748; BA=6.00005620; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017395; XFM=3.00000015; UTC=2017-10-04 21:37:37 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17100421-0057-0000-0000-0000080AD85A Message-Id: <20171004213734.GA11463@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-04_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710040299 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! This post-merge-window series fixes a problem that arose when designing requested extensions to sys_membarrier() to allow JITs to efficiently flush old code from instruction caches. Several potential algorithms are much less painful if the user register intent to use this functionality early on, for example, before the process spawns the second thread. Registering at this time removes the need to interrupt each and every thread in that process at the first expedited sys_membarrier() system call. However, if we let the current function out, then user programs might be written without registration, which would make it more difficult to add required registration after the fact. Hence the late-in-merge-window request. (Ingo, pull request on its way as well.) 1. Provide register expedited private command. 2. Test private expedited cmd. 3. Document scheduler barrier requirements. All courtesy of Mathieu Desnoyers. Thanx, Paul ------------------------------------------------------------------------ MAINTAINERS | 2 arch/powerpc/Kconfig | 1 arch/powerpc/include/asm/membarrier.h | 43 +++++++ arch/powerpc/include/asm/thread_info.h | 3 arch/powerpc/kernel/Makefile | 2 arch/powerpc/kernel/membarrier.c | 45 +++++++ arch/powerpc/mm/mmu_context.c | 7 + arch/x86/mm/tlb.c | 5 fs/exec.c | 1 include/linux/mm_types.h | 3 include/linux/sched/mm.h | 55 +++++++++ include/uapi/linux/membarrier.h | 23 ++-- init/Kconfig | 3 kernel/fork.c | 2 kernel/sched/core.c | 47 ++++---- kernel/sched/membarrier.c | 25 +++- tools/testing/selftests/membarrier/membarrier_test.c | 109 ++++++++++++++++--- 17 files changed, 329 insertions(+), 47 deletions(-)