Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263241AbUCTHhu (ORCPT ); Sat, 20 Mar 2004 02:37:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263243AbUCTHhu (ORCPT ); Sat, 20 Mar 2004 02:37:50 -0500 Received: from ns.suse.de ([195.135.220.2]:27551 "EHLO Cantor.suse.de") by vger.kernel.org with ESMTP id S263241AbUCTHht (ORCPT ); Sat, 20 Mar 2004 02:37:49 -0500 To: Roland Dreier Cc: linux-kernel@vger.kernel.org Subject: Re: Fast 64-bit atomic writes (SSE?) References: <874qskl5ca.fsf@love-shack.home.digitalvampire.org.suse.lists.linux.kernel> From: Andi Kleen Date: 20 Mar 2004 08:37:47 +0100 In-Reply-To: <874qskl5ca.fsf@love-shack.home.digitalvampire.org.suse.lists.linux.kernel> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 645 Lines: 13 Roland Dreier writes: > > General question: > What's the best way to do this? Definitely not how you do it ;-) You corrupt the user space FPU context. Also you didn't do a CPUID check, so it would just crash on machines The RAID code has some examples on how to use SSE2 in the kernel correctly. Better is probably to use CMPXCHG8, which avoids all of this. -Andi - 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/