From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756021AbZC3Opm (ORCPT ); Mon, 30 Mar 2009 10:45:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755871AbZC3OpU (ORCPT ); Mon, 30 Mar 2009 10:45:20 -0400 Received: from smtp.ultrahosting.com ([74.213.174.254]:38451 "EHLO smtp.ultrahosting.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755605AbZC3OpT (ORCPT ); Mon, 30 Mar 2009 10:45:19 -0400 Date: Mon, 30 Mar 2009 10:41:03 -0400 (EDT) From: Christoph Lameter X-X-Sender: cl@qirst.com To: David Rientjes cc: Pekka Enberg , Nick Piggin , Martin Bligh , linux-kernel@vger.kernel.org Subject: Re: [patch 3/3] slub: sort parital list when thrashing In-Reply-To: Message-ID: References: User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 29 Mar 2009, David Rientjes wrote: > @@ -1720,6 +1727,15 @@ checks_ok: > if (unlikely(!prior)) { > add_partial(get_node(s, page_to_nid(page)), page, 1); > stat(c, FREE_ADD_PARTIAL); > + } else if (c->slowpath_allocs >= SLAB_THRASHING_THRESHOLD) { > + /* > + * If the cache is actively slab thrashing, it's necessary to > + * move partial slabs to the head of the list so there isn't > + * excessive partial list scanning while holding list_lock. > + */ > + if (!skip_partial(s, page)) > + move_partial_to_head(get_node(s, page_to_nid(page)), > + page); > } > > out_unlock: > This again adds code to a pretty hot path. What is the impact of the additional hot path code?