From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751078AbXDDLzG (ORCPT ); Wed, 4 Apr 2007 07:55:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S2992879AbXDDLzG (ORCPT ); Wed, 4 Apr 2007 07:55:06 -0400 Received: from pfx2.jmh.fr ([194.153.89.55]:60516 "EHLO pfx2.jmh.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753149AbXDDLzE (ORCPT ); Wed, 4 Apr 2007 07:55:04 -0400 Date: Wed, 4 Apr 2007 13:54:58 +0200 From: Eric Dumazet To: Nick Piggin Cc: Peter Zijlstra , Andrew Morton , Jakub Jelinek , Ulrich Drepper , Andi Kleen , Rik van Riel , Linux Kernel , linux-mm@kvack.org, Hugh Dickins Subject: Re: missing madvise functionality Message-Id: <20070404135458.4f1a7059.dada1@cosmosbay.com> In-Reply-To: <46137882.6050708@yahoo.com.au> References: <46128051.9000609@redhat.com> <46128CC2.9090809@redhat.com> <20070403172841.GB23689@one.firstfloor.org> <20070403125903.3e8577f4.akpm@linux-foundation.org> <4612B645.7030902@redhat.com> <20070403202937.GE355@devserv.devel.redhat.com> <20070403144948.fe8eede6.akpm@linux-foundation.org> <4612DCC6.7000504@cosmosbay.com> <46130BC8.9050905@yahoo.com.au> <1175675146.6483.26.camel@twins> <461367F6.10705@yahoo.com.au> <20070404113447.17ccbefa.dada1@cosmosbay.com> <46137882.6050708@yahoo.com.au> X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.6; i686-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 X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 04 Apr 2007 20:05:54 +1000 Nick Piggin wrote: > > > @@ -1638,7 +1652,7 @@ find_extend_vma(struct mm_struct * mm, u > > unsigned long start; > > > > addr &= PAGE_MASK; > > - vma = find_vma(mm,addr); > > + vma = find_vma(mm,addr,¤t->vmacache); > > if (!vma) > > return NULL; > > if (vma->vm_start <= addr) > > So now you can have current calling find_extend_vma on someone else's mm > but using their cache. So you're going to return current's vma, or current > is going to get one of mm's vmas in its cache :P This was not a working patch, just to throw the idea, since the answers I got showed I was not understood. In this case, find_extend_vma() should of course have one struct vm_area_cache * argument, like find_vma() One single cache on one mm is not scalable. oprofile badly hits it on a dual cpu config.