Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752993Ab0AGQcl (ORCPT ); Thu, 7 Jan 2010 11:32:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751096Ab0AGQck (ORCPT ); Thu, 7 Jan 2010 11:32:40 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:38388 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750783Ab0AGQcj (ORCPT ); Thu, 7 Jan 2010 11:32:39 -0500 Date: Thu, 7 Jan 2010 08:31:55 -0800 (PST) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Christoph Lameter cc: Arjan van de Ven , Peter Zijlstra , "Paul E. McKenney" , Peter Zijlstra , KAMEZAWA Hiroyuki , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "minchan.kim@gmail.com" , "hugh.dickins" , Nick Piggin , Ingo Molnar Subject: Re: [RFC][PATCH 6/8] mm: handle_speculative_fault() In-Reply-To: Message-ID: References: <20100104182429.833180340@chello.nl> <20100104182813.753545361@chello.nl> <20100105054536.44bf8002@infradead.org> <20100105192243.1d6b2213@infradead.org> 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: 1184 Lines: 26 On Thu, 7 Jan 2010, Linus Torvalds wrote: > > (Side note: I wonder if we should wake up _all_ readers when we wake up > any. Right now, we wake up all readers - but only until we hit a writer. > Which is the _fair_ thing to do, but it does mean that we can end up in > horrible patterns of alternating readers/writers, when it could be much > better to just say "release the hounds" and let all pending readers go > after a writer has had its turn). Btw, this would still be "mostly fair" in the sense that you couldn't starve writers. Any writer on the list is still guaranteed to be woken up next, because now it will be at the front of the queue. So it would be starvation-proof - new readers that come in _after_ we've woken up all the old ones would not get to pass the writers. It might be interesting to test, if somebody has a problematic threaded workload with lots of page faults and allocations mixxed. 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/