From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Howells Subject: Re: [RFC] Add support for semaphore-like structure with support for asynchronous I/O Date: Sat, 16 Apr 2005 12:12:08 +0100 Message-ID: <17130.1113649928@redhat.com> References: <20050415234213.GC11761@kvack.org> <20050331161350.0dc7d376.akpm@osdl.org> <1112318537.11284.10.camel@lade.trondhjem.org> <20050401141225.GA3707@in.ibm.com> <20050404155245.GA4659@in.ibm.com> <20050404162216.GA18469@kvack.org> <1112637395.10602.95.camel@lade.trondhjem.org> <20050405154641.GA27279@kvack.org> <20050407114302.GA13363@infradead.org> <29082.1113581624@redhat.com> <1113604974.27810.75.camel@lade.trondhjem.org> Cc: Trond Myklebust , Christoph Hellwig , Suparna Bhattacharya , Andrew Morton , linux-kernel@vger.kernel.org, Linux Filesystem Development , linux-aio@kvack.org Return-path: Received: from mx1.redhat.com ([66.187.233.31]:5023 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S262209AbVDPLMW (ORCPT ); Sat, 16 Apr 2005 07:12:22 -0400 In-Reply-To: <20050415234213.GC11761@kvack.org> To: Benjamin LaHaise Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Benjamin LaHaise wrote: > > What about the use of atomic operations on frv? Are they more lightweight > than a semaphore, making for a better fastpath? What do you mean? Atomic ops don't compare to semaphores. On FRV atomic ops don't disable interrupts; they reserve one of the eight conditional execution flags at compile time and that flag is cleared by entry to an exception, thus aborting the write instruction. See: Documentation/fujitsu/frv/atomic-ops.txt I could try and improve the fastpath on the semaphores for FRV - and perhaps should - but I implemented the semaphores before I'd thought of the clever way to do atomic ops. David