From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759442AbZCaNay (ORCPT ); Tue, 31 Mar 2009 09:30:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757678AbZCaNam (ORCPT ); Tue, 31 Mar 2009 09:30:42 -0400 Received: from smtp.ultrahosting.com ([74.213.174.254]:49537 "EHLO smtp.ultrahosting.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757330AbZCaNal (ORCPT ); Tue, 31 Mar 2009 09:30:41 -0400 Date: Tue, 31 Mar 2009 09:26:26 -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 1/3] slub: add per-cache slab thrash ratio 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 Mon, 30 Mar 2009, David Rientjes wrote: > @@ -3833,7 +3830,9 @@ static ssize_t order_store(struct kmem_cache *s, > if (order > slub_max_order || order < slub_min_order) > return -EINVAL; > > + thrash_ratio = s->min_free_watermark * 100 / oo_objects(s->oo); > calculate_sizes(s, order); > + s->min_free_watermark = oo_objects(s->oo) * thrash_ratio / 100; > return length; > } > Hmmm.. Still calculating the trash ratio based on existing objects per slab and then resetting the objects per slab to a different number. Shouldnt the trash_ratio simply be zapped to an initial value if the number of objects per slab changes?