From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758027AbZC3UXu (ORCPT ); Mon, 30 Mar 2009 16:23:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755870AbZC3UXm (ORCPT ); Mon, 30 Mar 2009 16:23:42 -0400 Received: from smtp-out.google.com ([216.239.45.13]:33911 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752268AbZC3UXl (ORCPT ); Mon, 30 Mar 2009 16:23:41 -0400 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=date:from:x-x-sender:to:cc:subject:in-reply-to:message-id: references:user-agent:mime-version:content-type:x-system-of-record; b=GeCB+2X7h7h8tUxoT7cSSAZapN/tMbWFIUXs3ko5Bp0B25eSg8hlk43IS91kdYNRm 2pq8KbQO47SPi+WuFSpIw== Date: Mon, 30 Mar 2009 13:22:55 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Christoph Lameter cc: Pekka Enberg , Nick Piggin , Martin Bligh , linux-kernel@vger.kernel.org Subject: Re: [patch 2/3] slub: scan partial list for free slabs when thrashing In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 30 Mar 2009, Christoph Lameter wrote: > > Whenever a cpu cache satisfies a fastpath allocation, a fastpath counter > > is incrememted. This counter is cleared whenever the slowpath is > > invoked. This tracks how many fastpath allocations the cpu slab has > > fulfilled before it must be refilled. > > That adds fastpath overhead and it shows for small objects in your tests. > Indeed, which is unavoidable in this case. The only other way of tracking the "thrashing history" I can think of would be bitshifting a 1 for slowpath and 0 for fastpath, for example, into an unsigned long. That, however, requires a hamming weight calculation in the slowpath and doesn't scale nearly as well as simply an incrementing a counter. If there's other approaches on tracking such instances, I'd be interested to hear them. Btw, is cl@linux.com your new email address or are all linux-foundation.org emails going to eventually migrate to the new domain?