Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755317AbWKRSr0 (ORCPT ); Sat, 18 Nov 2006 13:47:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755318AbWKRSr0 (ORCPT ); Sat, 18 Nov 2006 13:47:26 -0500 Received: from host-233-54.several.ru ([213.234.233.54]:51343 "EHLO mail.screens.ru") by vger.kernel.org with ESMTP id S1755317AbWKRSrZ (ORCPT ); Sat, 18 Nov 2006 13:47:25 -0500 Date: Sat, 18 Nov 2006 21:46:24 +0300 From: Oleg Nesterov To: "Paul E. McKenney" Cc: Jens Axboe , Alan Stern , Linus Torvalds , Thomas Gleixner , Ingo Molnar , LKML , john stultz , David Miller , Arjan van de Ven , Andrew Morton , Andi Kleen , manfred@colorfullife.com Subject: Re: [patch] cpufreq: mark cpufreq_tsc() as core_initcall_sync Message-ID: <20061118184624.GA163@oleg> References: <20061117065128.GA5452@us.ibm.com> <20061117092925.GT7164@kernel.dk> <20061117183945.GA367@oleg> <20061118002845.GF2632@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061118002845.GF2632@us.ibm.com> User-Agent: Mutt/1.5.11 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 851 Lines: 31 On 11/17, Paul E. McKenney wrote: > > Oleg, any thoughts about Jens's optimization? He would code something > like: > > if (srcu_readers_active(&my_srcu)) > synchronize_srcu(); > else > smp_mb(); Well, this is clearly racy, no? I am not sure, but may be we can do smp_mb(); if (srcu_readers_active(&my_srcu)) synchronize_srcu(); in this case we also need to add 'smp_mb()' into srcu_read_lock() after 'atomic_inc(&sp->hardluckref)'. > However, he is doing ordered I/O requests rather than protecting data > structures. Probably this makes a difference, but I don't understand this. Oleg. - 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/