Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 29 Jul 2002 20:06:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 29 Jul 2002 20:06:52 -0400 Received: from jalon.able.es ([212.97.163.2]:3058 "EHLO jalon.able.es") by vger.kernel.org with ESMTP id ; Mon, 29 Jul 2002 20:06:52 -0400 Date: Tue, 30 Jul 2002 02:09:12 +0200 From: "J.A. Magallon" To: Rik van Riel Cc: Andrea Arcangeli , Alan Cox , Andrew Theurer , linux-kernel@vger.kernel.org, Marcelo Tosatti Subject: Re: Linux 2.4.19-rc3 (hyperthreading) Message-ID: <20020730000912.GA6406@714-cm.cps.unizar.es> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: 7BIT In-Reply-To: ; from riel@conectiva.com.br on mar, jul 30, 2002 at 01:51:51 +0200 X-Mailer: Balsa 1.3.6 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 971 Lines: 29 On 20020730 Rik van Riel wrote: > On Tue, 30 Jul 2002, Andrea Arcangeli wrote: > > > and the new one had a bug too :). Please merge the fix I posted to l-k > > too thanks. > > Judging from the patch the code seems incredibly subtle and > I'd be amazed if it doesn't break again every few weeks... > How about this version (gcc-3.2 generates the same amount of assembler): int find(int this_cpu) { int i; for ( i = (this_cpu+1)%smp_num_cpus; i != this_cpu; i = (i+1)%smp_num_cpus ) { int physical = cpu_logical_map(i); int sibling = cpu_sibling_map[physical]; if (idle_cpu(physical) && idle_cpu(sibling)) return physical; } return -1; } - 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/