Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753149AbcKHXRb (ORCPT ); Tue, 8 Nov 2016 18:17:31 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:50574 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751564AbcKHXR3 (ORCPT ); Tue, 8 Nov 2016 18:17:29 -0500 Date: Tue, 8 Nov 2016 15:17:27 -0800 From: Andrew Morton To: David Rientjes Cc: Greg Thelen , Aruna Ramakrishna , Christoph Lameter , Joonsoo Kim , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch] mm, slab: faster active and free stats Message-Id: <20161108151727.b64035da825c69bced88b46d@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 790 Lines: 17 On Tue, 8 Nov 2016 15:06:45 -0800 (PST) David Rientjes wrote: > Reading /proc/slabinfo or monitoring slabtop(1) can become very expensive > if there are many slab caches and if there are very lengthy per-node > partial and/or free lists. > > Commit 07a63c41fa1f ("mm/slab: improve performance of gathering slabinfo > stats") addressed the per-node full lists which showed a significant > improvement when no objects were freed. This patch has the same > motivation and optimizes the remainder of the usecases where there are > very lengthy partial and free lists. > > This patch maintains per-node active_slabs (full and partial) and > free_slabs rather than iterating the lists at runtime when reading > /proc/slabinfo. Are there any nice numbers you can share?