From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753051Ab1KXGuA (ORCPT ); Thu, 24 Nov 2011 01:50:00 -0500 Received: from e36.co.us.ibm.com ([32.97.110.154]:38886 "EHLO e36.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750832Ab1KXGt7 (ORCPT ); Thu, 24 Nov 2011 01:49:59 -0500 Date: Thu, 24 Nov 2011 12:18:53 +0530 From: Srikar Dronamraju To: Peter Zijlstra , Linus Torvalds Cc: Oleg Nesterov , Andrew Morton , LKML , Linux-mm , Ingo Molnar , Andi Kleen , Christoph Hellwig , Steven Rostedt , Roland McGrath , Thomas Gleixner , Masami Hiramatsu , Arnaldo Carvalho de Melo , Anton Arapov , Ananth N Mavinakayanahalli , tulasidhard@gmail.com, Jim Keniston Subject: Re: Fwd: uprobes: register/unregister probes. Message-ID: <20111124064853.GA28065@linux.vnet.ibm.com> Reply-To: Srikar Dronamraju References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) x-cbid: 11112406-3352-0000-0000-000000F52980 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > On Fri, 2011-11-18 at 16:37 +0530, Srikar Dronamraju wrote: > > +#define UPROBES_HASH_SZ        13 > > +/* serialize (un)register */ > > +static struct mutex uprobes_mutex[UPROBES_HASH_SZ]; > > +#define uprobes_hash(v)        (&uprobes_mutex[((unsigned long)(v)) %\ > > +                                               UPROBES_HASH_SZ]) > > Was there any reason to for using this hasing scheme, say over hash.h? There is no specific reason for choosing this hashing scheme over the current. I just say ext4_aio_mutex in fs/ext4/ext4.h and did something similar. -- Thanks and Regards Srikar