Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754417Ab0D1OJA (ORCPT ); Wed, 28 Apr 2010 10:09:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3253 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753167Ab0D1OI6 (ORCPT ); Wed, 28 Apr 2010 10:08:58 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <1272430986-20436-1-git-send-email-xiaosuo@gmail.com> <8526.1272447122@redhat.com> To: Changli Gao Cc: dhowells@redhat.com, Ingo Molnar , Alexander Viro , Andrew Morton , "Eric W. Biederman" , Davide Libenzi , Roland Dreier , Stefan Richter , Peter Zijlstra , "David S. Miller" , Eric Dumazet , Christoph Lameter , Andreas Herrmann , Thomas Gleixner , Takashi Iwai , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC] sched: implement the exclusive wait queue as a LIFO queue Date: Wed, 28 Apr 2010 15:06:59 +0100 Message-ID: <6096.1272463619@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 911 Lines: 21 Changli Gao wrote: > I don't know how to do that, as maybe there are non-exclusive and > exclusive wait queues in the same wait queue head. If we want to > enqueue exclusive wait queues at the head of exclusive queues, we have > to know where the head is, otherwise, we have to loop to find the head > when enqueuing. I suspect you really want to have the semantics defined per-queue. _Either_ a queue is FIFO (such as processes waiting for a resource so they can do something with it) _or_ it is LIFO (such as a pool of processes waiting to be given work). How often do the two actually mix? And if they do, is that really an error? David -- 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/