From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760008AbYGaWNY (ORCPT ); Thu, 31 Jul 2008 18:13:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756591AbYGaWNA (ORCPT ); Thu, 31 Jul 2008 18:13:00 -0400 Received: from out02.mta.xmission.com ([166.70.13.232]:46833 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755195AbYGaWM7 (ORCPT ); Thu, 31 Jul 2008 18:12:59 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: Robin Holt Cc: linux-kernel@vger.kernel.org, Pavel Emelyanov , Oleg Nesterov , Sukadev Bhattiprolu , Paul Menage , Linus Torvalds , Andrew Morton References: <20080731170022.GE9663@sgi.com> <20080731193204.GG9663@sgi.com> <20080731200835.GK9663@sgi.com> Date: Thu, 31 Jul 2008 15:04:56 -0700 In-Reply-To: <20080731200835.GK9663@sgi.com> (Robin Holt's message of "Thu, 31 Jul 2008 15:08:35 -0500") Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SA-Exim-Connect-IP: 24.130.11.59 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-DCC: XMission; sa03 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Robin Holt X-Spam-Relay-Country: X-Spam-Report: * -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.0 T_TM2_M_HEADER_IN_MSG BODY: T_TM2_M_HEADER_IN_MSG * -1.1 BAYES_05 BODY: Bayesian spam probability is 1 to 5% * [score: 0.0307] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa03 1397; Body=1 Fuz1=1 Fuz2=1] * 0.5 XM_Body_Dirty_Words Contains a dirty word * 0.0 XM_SPF_Neutral SPF-Neutral Subject: Re: [Patch] Scale pidhash_shift/pidhash_size up based on num_possible_cpus(). X-SA-Exim-Version: 4.2 (built Thu, 03 Mar 2005 10:44:12 +0100) X-SA-Exim-Scanned: Yes (on mgr1.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Robin Holt writes: > Like so??? > > I have not tested this yet. Looks reasonable to me. In what circumstances was the lookup in the pid hash table with long changes causing a performance slowdown?. We don't perform a lot of lookups. > - pidhash_shift = min(12, pidhash_shift); > + pidhash_shift = min(fls(PID_MAX_LIMIT) - 6, pidhash_shift); > pidhash_size = 1 << pidhash_shift;