From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753862AbbBXSpj (ORCPT ); Tue, 24 Feb 2015 13:45:39 -0500 Received: from smtprelay0126.hostedemail.com ([216.40.44.126]:34203 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753636AbbBXSpg (ORCPT ); Tue, 24 Feb 2015 13:45:36 -0500 X-Session-Marker: 6E657665747340676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:981:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3871:3874:4250:5007:6261:7875:7901:7903:10004:10400:10848:10967:11026:11232:11658:11914:12043:12296:12438:12517:12519:12663:12740:13019:13069:13161:13229:13255:13311:13357:14096:14097:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: fuel49_4da7ab3e0b73a X-Filterd-Recvd-Size: 2246 Date: Tue, 24 Feb 2015 13:45:32 -0500 From: Steven Rostedt To: LKML Cc: Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Clark Williams , linux-rt-users , Mike Galbraith , "Paul E. McKenney" , =?UTF-8?B?SsO2cm4=?= Engel Subject: Re: [RFC][PATCH v2] sched/rt: Use IPI to trigger RT task push migration instead of pulling Message-ID: <20150224134532.1c7c5060@gandalf.local.home> In-Reply-To: <20150224133946.3948c4b7@gandalf.local.home> References: <20150224133946.3948c4b7@gandalf.local.home> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; 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 Tue, 24 Feb 2015 13:39:46 -0500 Steven Rostedt wrote: > +static void tell_cpu_to_push(int cpu, struct rq *rq, int prio) > +{ > + /* We should never be here if the IPI is already out. */ > + BUG_ON(rq->rt.push_csd_pending); > + > + rq->rt.push_csd_pending = 1; > + rq->rt.push_csd_cpu = cpu; > + /* Save the prio that we used to find this CPU */ > + rq->rt.push_csd_prio = prio; > + > + /* Make sure csd_cpu is visible before we send the ipi */ > + smp_mb(); > + > + smp_call_function_single_async(cpu, &rq->rt.push_csd); > +} > + rt_rq->push_csd_cpu = next_cpu; > + rt_rq->push_csd_prio = next_prio; > + > + /* Make sure the next cpu is seen on remote CPU */ > + smp_mb(); BTW, would a smp_wmb() be enough here. I was a little paranoid about the irq work and smp_call_functon above some how leaking before the barrier. I'm probably just being too paranoid, and these can be switched to smp_wmb(). But for now I'll just keep being a freak. -- Steve > + > + irq_work_queue_on(&rt_rq->push_csd_work, next_cpu); > + > + return; > +