Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758033AbZJSX7F (ORCPT ); Mon, 19 Oct 2009 19:59:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755889AbZJSX7E (ORCPT ); Mon, 19 Oct 2009 19:59:04 -0400 Received: from tomts36-srv.bellnexxia.net ([209.226.175.93]:65446 "EHLO tomts36-srv.bellnexxia.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755149AbZJSX7E (ORCPT ); Mon, 19 Oct 2009 19:59:04 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgcFAOeZ3EpMRdQp/2dsb2JhbACBUthehDEEhFA Date: Mon, 19 Oct 2009 19:59:05 -0400 From: Mathieu Desnoyers To: Pavel Machek Cc: Pierre Habouzit , Steven Munroe , rp@svcs.cs.pdx.edu, linux-kernel@vger.kernel.org, Josh Triplett , ltt-dev@lists.casi.polymtl.ca, Jon Bernard , "Paul E. McKenney" , Jan Blunck Subject: Userspace RCU 0.2.4 Message-ID: <20091019235905.GA11980@Krystal> References: <20091014223657.GC6458@Krystal> <20091015000225.GG6763@linux.vnet.ibm.com> <20091015023925.GA27959@Krystal> <20091015090042.GA7677@feather> <4AD75EA6.8080809@polymtl.ca> <20091017171615.GD1526@ucw.cz> <20091018220243.GA32405@Krystal> <20091018225234.GA9164@elf.ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <20091018225234.GA9164@elf.ucw.cz> X-Editor: vi X-Info: http://krystal.dyndns.org:8080 X-Operating-System: Linux/2.6.27.31-grsec (i686) X-Uptime: 19:47:11 up 62 days, 10:36, 4 users, load average: 0.47, 0.20, 0.12 User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3209 Lines: 83 * Pavel Machek (pavel@ucw.cz) wrote: > On Sun 2009-10-18 18:02:43, Mathieu Desnoyers wrote: > > * Pavel Machek (pavel@ucw.cz) wrote: > > > On Thu 2009-10-15 13:40:54, Pierre-Marc Fournier wrote: > > > > Josh Triplett wrote: > > > > > > > > > > Even Debian has given up on real 386 systems at this point, primarily > > > > > because system libraries like glibc have; 486 and better represents the > > > > > bare minimum required at this point. I don't know of any distributions > > > > > supporting real 386 systems at this point, and doing so would represent > > > > > a major undertaking. > > > > > > > > > > > > > What about embedded systems? Anyone know if some 386 chips, perhaps even > > > > in smp configurations, are still in use in those? > > > > > > smp 386: definitely not. > > > > Hrm, so for UP 386, I wonder what's the best approach. > > > > One would be to encapsulate all write accesses to the RCU pointers. If > > we detect that the architecture lacks cmpxchg, _all_ update operations > > (rcu_assign_pointer, rcu_xchg_pointer and rcu_cmpxchg_pointer) would > > have to use the signal-disabled+mutex fall-back. > > > > Does it make sense ? > > Yep, but it sounds expensive. Another option is to ignore the issue > and see how many people still have 386s :-). Few embedded systems > may be affected, but... Well.. I just enhanced liburcu to fully support 386 SMP (even if opinions seems to vary regarding its usefulness...) ;) It adds _no_ overhead whatsoever if building for i486+ or x86 64. What I did is a complete "compatibility mode" for all uatomic_arch_x86.h atomic operations (it's my own user-space reimplementation of the Linux kernel atomic.h). It's in liburcu 0.2.4 (now released). How it works: config x86 64 or x86 32 > i386 : #define to map directly to atomic operations. config i386 : dynamically detect the cpu id, caches it in "cas_avail" variable. If cas_avail is -1 (unset) -> dynamically check, cache result. If cas_avail is 1 -> use atomic operations. If cas_avail is 0 -> use compatibility mode for _all_ uatomic write operations involving signal disabling and a mutex. Only uatomic_read is exempt from locking. So it should be safe to access RCU pointers through the rcu_cmpxchg/xchg/set/assign_pointer() and rcu_dereference() primitives. I tried to force using the compatibility mode by changing the condition in compat_arch_x86.c and building for i386 compatibility. It works fine and passes the test_uatomic test cases. Passes the rcutorture test too. Mathieu > > Pavel > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html > > _______________________________________________ > ltt-dev mailing list > ltt-dev@lists.casi.polymtl.ca > http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev > -- Mathieu Desnoyers OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68 -- 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/