Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764084AbZD3Q0O (ORCPT ); Thu, 30 Apr 2009 12:26:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1763004AbZD3QZ5 (ORCPT ); Thu, 30 Apr 2009 12:25:57 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:54197 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761570AbZD3QZ5 (ORCPT ); Thu, 30 Apr 2009 12:25:57 -0400 Date: Thu, 30 Apr 2009 09:16:31 -0700 (PDT) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Ingo Molnar cc: Christoph Lameter , Mathieu Desnoyers , Andrew Morton , Nick Piggin , KOSAKI Motohiro , Peter Zijlstra , thomas.pi@arcor.dea, Yuriy Lalym , Linux Kernel Mailing List , ltt-dev@lists.casi.polymtl.ca, Tejun Heo Subject: Re: [PATCH] Fix dirty page accounting in redirty_page_for_writepage() In-Reply-To: <20090430160606.GA5913@elte.hu> Message-ID: References: <20090430133859.GB8329@elte.hu> <20090430141446.GD14696@elte.hu> <20090430143819.GF14696@elte.hu> <20090430150142.GC20580@elte.hu> <20090430154255.GA3714@elte.hu> <20090430160606.GA5913@elte.hu> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 886 Lines: 25 On Thu, 30 Apr 2009, Ingo Molnar wrote: > > c0436275: 64 83 05 20 5f 6a c0 addl $0x1,%fs:0xc06a5f20 > > There's no atomic instructions at all - the counters here are only > accessed locally. They are local-irq-atomic, but not > cacheline-atomic. On other architectures, you need the whole "disable preemption, load-locked, store-conditional, test-and-loop, enable preemption" thing. Or "disable interrupts, load, store, restore interrupts". There really aren't very many architectures that can do almost unrestricted ALU ops in a single instruction (and thus automatically safe from preemption and interrupts). 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/