Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262409AbTEFGnq (ORCPT ); Tue, 6 May 2003 02:43:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262410AbTEFGnq (ORCPT ); Tue, 6 May 2003 02:43:46 -0400 Received: from [12.47.58.20] ([12.47.58.20]:8722 "EHLO pao-ex01.pao.digeo.com") by vger.kernel.org with ESMTP id S262409AbTEFGnp (ORCPT ); Tue, 6 May 2003 02:43:45 -0400 Date: Mon, 5 May 2003 23:57:58 -0700 From: Andrew Morton To: "David S. Miller" Cc: rusty@rustcorp.com.au, dipankar@in.ibm.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kmalloc_percpu Message-Id: <20030505235758.25f769fc.akpm@digeo.com> In-Reply-To: <20030505.223944.23027730.davem@redhat.com> References: <20030505.211606.28803580.davem@redhat.com> <20030505224815.07e5240c.akpm@digeo.com> <20030505234248.7cc05f43.akpm@digeo.com> <20030505.223944.23027730.davem@redhat.com> X-Mailer: Sylpheed version 0.8.11 (GTK+ 1.2.10; i586-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 06 May 2003 06:56:12.0309 (UTC) FILETIME=[9475F450:01C3139C] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1130 Lines: 28 "David S. Miller" wrote: > > From: Andrew Morton > Date: Mon, 5 May 2003 23:42:48 -0700 > > Can't think of anything very clever there, except to go and un-percpuify the > disk stats. I think that's best, really - disk requests only come in at 100 > to 200 per second - atomic_t's or int-plus-per-disk-spinlock will be fine. > > Use some spinlock we already have to be holding during the > counter bumps. Last time we looked at that, q->lock was already held in almost all the right places so yes, that'd work. > Frankly, these things don't need to be %100 accurate. Using > a new spinlock or an atomic_t for this seems rediculious. The disk_stats structure has an "in flight" member. If we don't have proper locking around that, disks will appear to have -3 requests in flight for all time, which would look a tad odd. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/