From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759578AbYE2VOp (ORCPT ); Thu, 29 May 2008 17:14:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753998AbYE2VOf (ORCPT ); Thu, 29 May 2008 17:14:35 -0400 Received: from mta23.gyao.ne.jp ([125.63.38.249]:22373 "EHLO mx.gate01.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753596AbYE2VOe (ORCPT ); Thu, 29 May 2008 17:14:34 -0400 Date: Fri, 30 May 2008 06:12:07 +0900 From: Paul Mundt To: Pekka J Enberg Cc: David Howells , Christoph Lameter , LKML , cooloney@kernel.org, akpm@linux-foundation.org, mpm@selenic.com Subject: Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB Message-ID: <20080529211207.GB13663@linux-sh.org> Mail-Followup-To: Paul Mundt , Pekka J Enberg , David Howells , Christoph Lameter , LKML , cooloney@kernel.org, akpm@linux-foundation.org, mpm@selenic.com References: <20080528153648.GA27783@linux-sh.org> <483DBA85.2060502@cs.helsinki.fi> <483DBFC3.1070108@cs.helsinki.fi> <29611.1212066517@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 29, 2008 at 04:21:05PM +0300, Pekka J Enberg wrote: > On Thu, 29 May 2008, David Howells wrote: > > ELF-FDPIC is currently using kobjsize() so that it can expand the heap/stack > > segment to fill up the entirety of its allocation. It's probably worth > > dropping that, though. > > > > NOMMU mmap() is using kobjsize()/ksize() to keep track of the number of bytes > > allocated and the amount of dead space. We can probably ditch that too. > > > > However, fs/proc/task_nommu.c uses kobjsize() quite a bit to determine how > > much metadata space a process is carrying around. We could just use sizeof(), > > I suppose, and not bother calculating the slack. > > For short term, we should merge my two nommu patches as-is, no? Not until the page->index bits are killed, otherwise you aren't fixing anything. SLOB on nommu with those page->index tests will automatically oops today, before or after your patches. Until that's resolved, there's no point in pretending like kobjsize() has been "fixed". As no one has come up with a valid reason for those tests existing in the first place, simply having your patches and killing the BUG_ON()'s seems ok. If we're not going to kill the BUG_ON()'s, then your patches are purely cosmetic fixups with no behavioural change -- (ie, nommu is still hosed on SLOB with current git).