Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753422AbZFEV3R (ORCPT ); Fri, 5 Jun 2009 17:29:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752285AbZFEV3G (ORCPT ); Fri, 5 Jun 2009 17:29:06 -0400 Received: from smtp3.ultrahosting.com ([74.213.175.254]:50804 "EHLO smtp.ultrahosting.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752015AbZFEV3F (ORCPT ); Fri, 5 Jun 2009 17:29:05 -0400 X-Amavis-Alert: BAD HEADER, Header field occurs more than once: "Cc" occurs 4 times Message-Id: <20090605191819.376530498@gentwo.org> User-Agent: quilt/0.46-1 Date: Fri, 05 Jun 2009 15:18:19 -0400 From: cl@linux-foundation.org To: linux-kernel@vger.kernel.org Cc: Tejun Heo Cc: mingo@elte.hu Cc: rusty@rustcorp.com.au Cc: davem@davemloft.net Subject: [this_cpu_xx 00/11] Introduce this_cpu_xx operations Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1485 Lines: 37 The patchset introduces various operations to allow efficient access to per cpu variables for the current processor. Currently there is no way in the core to calcualte the address of the instance of a per cpu variable without a table lookup through per_cpu_ptr(x, smp_processor_id()) The patchset introduces a way to calculate the address using the offset that is available in arch specific ways (register or special memory locations) using this_cpu_ptr(x) In addition operations are provided that can operate on per cpu pointers. This is necessary to be able to use the addresses generated by the new per cpu allocator with per cpu RMW instructions. The arch provided RMW instructions can be used to avoid having to switch off preemption and interrupts for per cpu counter updates. One caveat with this patchset is that it currently does not work on S/390. Tejun Heo has a patchset that fixes the SHIFT_PERCPU_PTR issues on that platform. That patch is required before S/390 will work. Patchset will reduce the code size and increase speed of operations for dynamically allocated per cpu based statistics. Patch shows how this could be done. There are many other places in the code where these macros could be beneficial. --- -- 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/