From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752680AbdKUECL (ORCPT ); Mon, 20 Nov 2017 23:02:11 -0500 Received: from smtprelay0094.hostedemail.com ([216.40.44.94]:43242 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752322AbdKUECK (ORCPT ); Mon, 20 Nov 2017 23:02:10 -0500 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::,RULES_HIT:41:355:379:541:599:800:973: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:3353:3622:3865:3866:3867:3868:3870:3872:3873:3874:5007:6117:6261:7875:7901:7903:10004:10400:10848:10967:11026:11232:11658:11914:12296:12663:12740:12760:12895:13069:13255:13311:13357:13439:14096:14097:14180:14181:14659:14721:21060:21063:21080:21451:21627:30054:30060:30070: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:2,LUA_SUMMARY:none X-HE-Tag: beam76_87202d0e93514 X-Filterd-Recvd-Size: 2321 Date: Mon, 20 Nov 2017 23:02:07 -0500 From: Steven Rostedt To: joe.korty@concurrent-rt.com Cc: Thomas Gleixner , Peter Zijlstra , Linux Kernel Mailing List Subject: Re: [PATCH] 4.4.86-rt99: fix sync breakage between nr_cpus_allowed and cpus_allowed Message-ID: <20171120230207.19a4bc14@vmware.local.home> In-Reply-To: <20171120163040.GA25993@zipoli.concurrent-rt.com> References: <20171115192529.GA14158@zipoli.concurrent-rt.com> <20171117174851.2a253785@gandalf.local.home> <20171120163040.GA25993@zipoli.concurrent-rt.com> X-Mailer: Claws Mail 3.15.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, 20 Nov 2017 11:30:40 -0500 joe.korty@concurrent-rt.com wrote: > Hi Steve, > A quick perusal of 4.11.12-rt16 shows that it has an > entirely new version of migrate_disable which to me appears > correct. > > In that new implementation, migrate_enable() recalculates > p->nr_cpus_allowed when it switches the task back to > using p->cpus_mask. This brings the two back into sync > if anything had happened to get them out of sync while > migration was disabled (as would happen on an affinity > change during that disable period). > > 4.9.47-rt37 has the old implementation and it appears to > have same bug as 4.4-rt though I have yet to test 4.9-rt. > > The fix in these older versions could take one of two > forms: either we recalculate p->nr_cpus_allowed when > migrate_enable goes back to using p->cpus_allowed, > as the 4.11-rt version does, or the one place where we > allow p->nr_cpus_allowed to diverge from p->cpus_allowed > be fixed. The patch I submitted earlier takes this second > approach. > Ideally, I would like to stay close to what upstream -rt does. Would you be able to backport the 4.11-rt patch? I'm currently working on releasing 4.9-rt and 4.4-rt with the latest backports. I could easily add this one too. -- Steve