[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <4C2B21D20200007800008BDF@vpn.id2.novell.com>
Date:	Wed, 30 Jun 2010 09:52:02 +0100
From:	"Jan Beulich" <JBeulich@...ell.com>
To:	"Peter Zijlstra" <peterz@...radead.org>
Cc:	<jeremy.fitzhardinge@...rix.com>, <mingo@...e.hu>,
	<tglx@...utronix.de>, "Ky Srinivasan" <KSrinivasan@...ell.com>,
	<linux-kernel@...r.kernel.org>, <hpa@...or.com>
Subject: Re: [PATCH 2/4, v2] x86: enlightenment for ticket spin locks -
	 Xen implementation
>>> On 30.06.10 at 10:05, Peter Zijlstra <peterz@...radead.org> wrote:
> On Tue, 2010-06-29 at 15:32 +0100, Jan Beulich wrote:
>> +static DEFINE_PER_CPU(arch_rwlock_t, spinning_rm_lock) = 
> __ARCH_RW_LOCK_UNLOCKED;
> 
> why is that an arch_ lock?
Because I don't think it is appropriate to use anything higher level
in the callouts from the lock/unlock inline functions. The alternative
would be an open coded lock, which seems much less desirable to
me.
> why is that a rwlock?, those things are useless.
Because potentially each CPU's lock gets acquired for reading during
unlock, while only the locking CPU's one needs to be acquired for
writing during lock.
Jan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists