Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755255Ab3FKRdK (ORCPT ); Tue, 11 Jun 2013 13:33:10 -0400 Received: from e31.co.us.ibm.com ([32.97.110.149]:57451 "EHLO e31.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754660Ab3FKRdI (ORCPT ); Tue, 11 Jun 2013 13:33:08 -0400 Date: Tue, 11 Jun 2013 10:30:47 -0700 From: "Paul E. McKenney" To: Linus Torvalds Cc: Lai Jiangshan , LKML , Ingo Molnar , Dipankar Sarma , Andrew Morton , Mathieu Desnoyers , Josh Triplett , niv@us.ibm.com, Thomas Gleixner , Peter Zijlstra , Steven Rostedt , Valdis Kletnieks , David Howells , Eric Dumazet , Darren Hart , =?iso-8859-1?Q?Fr=E9d=E9ric?= Weisbecker , Silas Boyd-Wickizer Subject: Re: [PATCH RFC ticketlock] Auto-queued ticketlock Message-ID: <20130611173047.GO5146@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <20130609193657.GA13392@linux.vnet.ibm.com> <20130611164807.GJ5146@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13061117-7282-0000-0000-0000182C0F57 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1370 Lines: 30 On Tue, Jun 11, 2013 at 10:17:52AM -0700, Linus Torvalds wrote: > On Tue, Jun 11, 2013 at 9:48 AM, Paul E. McKenney > wrote: > > > > Another approach is to permanently associate queues with each lock, > > but that increases the size of the lock -- something that has raised > > concerns in the past. But if adding 32 bytes to each ticketlock was OK, > > this simplifies things quite a bit. > > Yeah, no. The spinlocks need to be small. We have them in > size-conscious data structures like "struct dentry" and "struct page", > and they really must not be bigger than an "int" in the non-debug > case. > > In fact, I've occasionally thought about combining a spinlock with a > refcounter if that could make things fit in 32 bits on smaller > machines, because we also have ops like "atomic_dec_and_lock()" that > could possibly be optimized if they fit in one word. That is probably > not worth it, but spinlocks do need to remain small. I was afraid of that. On the other hand, I guess that this means that I sent out the correct patch of the two that I prepared. ;-) Thanx, Paul -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/