From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968601AbdADPz1 (ORCPT ); Wed, 4 Jan 2017 10:55:27 -0500 Received: from smtprelay0167.hostedemail.com ([216.40.44.167]:39200 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S968586AbdADPzY (ORCPT ); Wed, 4 Jan 2017 10:55:24 -0500 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:2393:2553:2559:2562:2693:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:5007:6119:6120:6261:7875:10004:10400:10848:10967:11232:11658:11914:12296:12740:12760:12895:13069:13180:13229:13311:13357:13439:14096:14097:14181:14659:14721:21080:21324:21433:30054:30090:30091,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,LFtime:3,LUA_SUMMARY:none X-HE-Tag: week04_2e83dbfab3e43 X-Filterd-Recvd-Size: 2193 Date: Wed, 4 Jan 2017 10:55:18 -0500 From: Steven Rostedt To: Waiman Long Cc: Peter Zijlstra , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 0/7] locking/rtqspinlock: Realtime queued spinlocks Message-ID: <20170104105518.680460cf@gandalf.local.home> In-Reply-To: <57c0a6e1-1fab-b8d4-2a68-02cc1ebf7ce6@redhat.com> References: <1483466430-8028-1-git-send-email-longman@redhat.com> <20170104124929.GI25813@worktop.programming.kicks-ass.net> <57c0a6e1-1fab-b8d4-2a68-02cc1ebf7ce6@redhat.com> X-Mailer: Claws Mail 3.14.0 (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 Wed, 4 Jan 2017 10:25:14 -0500 Waiman Long wrote: > I know that in -RT kernel, all the non-raw spinlocks are replaced by > rtmutex which is a sleeping lock. This can have a real performance > impact on systems with more than a few cores. The rtmutex isn't fair either. We do fine on 80+ CPUs. Is that enough cores for you ;-) Note, it's not a true sleeping lock, because of the adaptive nature. That is, it spins unless the owner of the lock is sleeping, in which case, it too will sleep (why spin waiting for a task that isn't running). But if the owner is running, it will spin too. We also have tricks to keep normal preemption (like SCHED_OTHER tasks running out of their time slot) when they have a lock. This keeps contention down on tasks owning locks while sleeping. > > Do you think it is better to keep the raw spinlocks fair and only have > the non-raw spinlocks use the RT version? Yes. Note, I also want to get rt_mutex into the kernel first for all sleeping locks. That is, get the logic in before we convert spin_locks to sleeping locks. -- Steve