Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161223AbWKJPTn (ORCPT ); Fri, 10 Nov 2006 10:19:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1161829AbWKJPTn (ORCPT ); Fri, 10 Nov 2006 10:19:43 -0500 Received: from smtp3-g19.free.fr ([212.27.42.29]:32471 "EHLO smtp3-g19.free.fr") by vger.kernel.org with ESMTP id S1161223AbWKJPTm (ORCPT ); Fri, 10 Nov 2006 10:19:42 -0500 Message-ID: <45549889.5000300@legoater.org> Date: Fri, 10 Nov 2006 16:19:37 +0100 From: Cedric Le Goater User-Agent: Thunderbird 1.5.0.7 (X11/20061027) MIME-Version: 1.0 To: Kirill Korotaev CC: Andrew Morton , Linux Kernel Mailing List , Alan Cox , xemul@openvz.org, devel@openvz.org, oleg@tv-sign.ru, hch@infradead.org, matthltc@us.ibm.com, ckrm-tech@lists.sourceforge.net Subject: Re: [PATCH 1/13] BC: atomic_dec_and_lock_irqsave() helper References: <45535C18.4040000@sw.ru> <45535CFA.5080601@sw.ru> In-Reply-To: <45535CFA.5080601@sw.ru> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 847 Lines: 26 Hello Kirill, Hello Pavel, Kirill Korotaev wrote: > Oleg Nesterov noticed to me that the construction like > (used in beancounter patches and free_uid()): > > local_irq_save(flags); > if (atomic_dec_and_lock(&refcnt, &lock)) > ... > > is not that good for preemtible kernels, since with preemption > spin_lock() can schedule() to reduce latency. However, it won't schedule > if interrupts are disabled. > > So this patch introduces atomic_dec_and_lock_irqsave() as a logical > counterpart to atomic_dec_and_lock(). You should probably send that one independently from the BC patchset. C. - 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/