From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH -v4 1/2] lib, Make gen_pool memory allocator lockless Date: Wed, 17 Nov 2010 12:53:16 +0100 Message-ID: <1289994796.2109.722.camel@laptop> References: <1289868791-16658-1-git-send-email-ying.huang@intel.com> <1289868791-16658-2-git-send-email-ying.huang@intel.com> <20101116135038.fcaa90ca.akpm@linux-foundation.org> <1289960281.8719.1218.camel@yhuang-dev> <1289990458.2109.675.camel@laptop> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Return-path: Received: from canuck.infradead.org ([134.117.69.58]:59292 "EHLO canuck.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934581Ab0KQLx2 convert rfc822-to-8bit (ORCPT ); Wed, 17 Nov 2010 06:53:28 -0500 In-Reply-To: Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: huang ying Cc: Huang Ying , Andrew Morton , Len Brown , "linux-kernel@vger.kernel.org" , Andi Kleen , "linux-acpi@vger.kernel.org" , Linus Torvalds , Thomas Gleixner , Ingo Molnar , Mauro Carvalho Chehab On Wed, 2010-11-17 at 19:47 +0800, huang ying wrote: > On Wed, Nov 17, 2010 at 6:40 PM, Peter Zijlstra wrote: > > On Wed, 2010-11-17 at 10:18 +0800, Huang Ying wrote: > >> > >> cmpxchg has been used in that way by ftrace and perf for a long time. So > >> I agree to make it a requirement on future architecture ports. > > > > Neither mandate an architecture do this though, only that when an > > architecture wants to support either feature and has NMIs (not all archs > > have NMI equivalents) it has to be safe. > > So we can make sure cmpxchg can be used in lock-less code on > architectures with perf, irq_work or ftrace enabled? It had better, otherwise stuff is broken.