From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936315AbdEWTkJ (ORCPT ); Tue, 23 May 2017 15:40:09 -0400 Received: from smtprelay0102.hostedemail.com ([216.40.44.102]:50584 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933210AbdEWTkH (ORCPT ); Tue, 23 May 2017 15:40:07 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2553:2559:2562:2691:2693:3138:3139:3140:3141:3142:3353:3622:3743:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:5007:6261:7875:8957:10004:10400:10848:10967:11232:11658:11914:12050:12295:12296:12740:12760:12895:13069:13137:13150:13230:13231:13311:13357:13439:14039:14096:14097:14181:14659:14721:21080:21324:21433:21627:30012:30051:30054:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: grip08_38569f46abc16 X-Filterd-Recvd-Size: 2588 Date: Tue, 23 May 2017 15:39:39 -0400 From: Steven Rostedt To: "Paul E. McKenney" Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Peter Zijlstra , Thomas Gleixner Subject: Re: Use case for TASKS_RCU Message-ID: <20170523153939.7122e892@vmware.local.home> In-Reply-To: <20170523000036.GA13506@linux.vnet.ibm.com> References: <20170515182354.GA25440@linux.vnet.ibm.com> <20170516062233.tyz7ze7ilmbkxtjc@gmail.com> <20170516122354.GB3956@linux.vnet.ibm.com> <20170519062331.52dhungzvcsdxdgo@gmail.com> <20170519133550.GD3956@linux.vnet.ibm.com> <20170519100421.27298063@gandalf.local.home> <20170519102331.0d5a8536@gandalf.local.home> <20170519190609.GE3956@linux.vnet.ibm.com> <20170523000036.GA13506@linux.vnet.ibm.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 22 May 2017 17:00:36 -0700 "Paul E. McKenney" wrote: > > > > Hmmm... The goal is to make sure that any task that was preempted > > or running at a given point in time passes through a voluntary > > context switch (or userspace execution, or, ...). > > > > What is the simplest way to get this job done? To Ingo's point, I > > bet that there is a simpler way than the current TASKS_RCU > > implementation. > > > > Ingo, if I make it fit into 100 lines of code, would you be OK with > > it? I probably need a one-line hook at task-creation time and > > another at task-exit time, if that makes a difference. > > And please see below for such a patch, which does add (just barely) > fewer than 100 lines net. > > Unfortunately, it does not work, as I should have known ahead of time > from the dyntick-idle experience. Not all context switches go through > context_switch(). :-/ Wait. What context switch doesn't go through a context switch? Or do you mean a user/kernel context switch? -- Steve > > I believe this is fixable, more or less like dyntick-idle's > half-interrupts were fixable, but it will likely be a few days. Not > clear whether the result will be simpler than current TASKS_RCU, but > there is only one way to find out. ;-) >