Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S267186AbUFZQqM (ORCPT ); Sat, 26 Jun 2004 12:46:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S267188AbUFZQqM (ORCPT ); Sat, 26 Jun 2004 12:46:12 -0400 Received: from fw.osdl.org ([65.172.181.6]:52879 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S267186AbUFZQqL (ORCPT ); Sat, 26 Jun 2004 12:46:11 -0400 Date: Sat, 26 Jun 2004 09:44:44 -0700 (PDT) From: Linus Torvalds To: James Bottomley cc: Andrew Morton , Paul Jackson , PARISC list , Linux Kernel Subject: Re: [PATCH] Fix the cpumask rewrite In-Reply-To: Message-ID: References: <1088266111.1943.15.camel@mulgrave> 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: 1011 Lines: 29 On Sat, 26 Jun 2004, Linus Torvalds wrote: > > Why not? The thing is, the bitmap operators are supposed to work on > volatile data, ie people are literally using them for things like > > while (test_bit(TASKLET_STATE_SCHED, &t->state)); Ahh. That one is part of a "do while ()" loop, and grep mis-identifies it. So parisc gets it right, because the whole loop is do yield(); while (test_bit(TASKLET_STATE_SCHED, &t->state)); so at least the compiler didn't get to optimize it away. Hopefully we don't have any other busy loops either - even if it is a busy loop, we should have a "cpu_relax()" or something there just to keep power levels down, and that should also tell the compiler not to do anything silly. But the conceptual point stands. Linus - 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/