Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S269346AbUIIFlQ (ORCPT ); Thu, 9 Sep 2004 01:41:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S269351AbUIIFlQ (ORCPT ); Thu, 9 Sep 2004 01:41:16 -0400 Received: from ozlabs.org ([203.10.76.45]:61107 "EHLO ozlabs.org") by vger.kernel.org with ESMTP id S269346AbUIIFlP (ORCPT ); Thu, 9 Sep 2004 01:41:15 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16703.60725.153052.169532@cargo.ozlabs.ibm.com> Date: Thu, 9 Sep 2004 15:42:13 +1000 From: Paul Mackerras To: Zwane Mwaikambo Cc: Linux Kernel , Andrew Morton , Linus Torvalds , William Lee Irwin III , Matt Mackall , Anton Blanchard Subject: Re: [PATCH][5/8] Arch agnostic completely out of line locks / ppc64 In-Reply-To: References: X-Mailer: VM 7.18 under Emacs 21.3.1 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1227 Lines: 26 Zwane, Just got a chance to look at the new out-of-line spinlock stuff (better late than never :). I see a couple of problems there. First, we now go two levels deep on SMP && PREEMPT: spin_lock is _spin_lock, which is out of line in kernel/sched.c. That calls __preempt_spin_lock, which is out of line in kernel/sched.c, and isn't in the .text.lock section. So if we get a timer interrupt in there, we won't attribute the profile tick to the original caller. The second problem is that __preempt_spin_lock doesn't do the yield to the hypervisor which we need to do on shared processor systems. This is actually a long-standing problem, not one you have just introduced, but I have only just noticed it. I can't make cpu_relax do the yield because the yield is a directed yield to a specific other virtual cpu (it says "give the rest of my timeslice to that guy over there") and I need the value in the lock variable in order to know who is holding the lock. Regards, 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/